brendanssound
Posts: 24
Joined: Tue Oct 06, 2015 10:59 am

Re: RPi Information Screen for Official Raspberry Pi Display

Mon Oct 12, 2015 10:36 am

Ha, Silly me.. disabled the template before i even looked at it.. Not too sure why i would have done that.

Waittt a minute.. so if i mixed 9and3r's script for Mopidy with your clock/weather.. that should work.. right?

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Mon Oct 12, 2015 10:39 am

I think the template is disabled by default as it's not useful if you're just using the script.

As for mopidy, yes, there's a way to combine the two. 9and3r would be better placed to help - they may even do it themselves.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

9and3r
Posts: 16
Joined: Mon Aug 26, 2013 11:58 am

Re: RPi Information Screen for Official Raspberry Pi Display

Mon Oct 12, 2015 5:16 pm

I have a initial buggy version of mopidy:

https://github.com/9and3r/RPi-InfoScreen-Kivy

You have to install mopidy and ws4py to use it. Currently you can't add tracks to the tracklist (Search is not working). You will have to use another way to add songs (mpd client...) and after that you can control from the screen.

Take into account that I am testing on my computer as I do not own a Raspberry touchscreen so let me know how it works.

I will make a pull request when I fix some bugs and make search working. I wanted to not edit your files but I finally had to edit some files to get notified when kivy closes to stop the websocket.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Mon Oct 12, 2015 5:36 pm

Thanks, I'll take a look. I don't have any real objections to editing the main code if it's needed for a plugin provided it's kept to a bare minimum.

I might use some of your code too as I'm (eventually) going to add the search functionality to the squeezeplayer screen but I've got a much more fundamental re-write to do on that screen first.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

brendanssound
Posts: 24
Joined: Tue Oct 06, 2015 10:59 am

Re: RPi Information Screen for Official Raspberry Pi Display

Tue Oct 13, 2015 3:11 am

:D Whoopeee!

Sounds like 2 great minds with the same idea could make something very cool.

Also:
https://github.com/elParaguayo/RPi-InfoScreen-Kivy
https://github.com/9and3r/RPi-InfoScreen-Kivy

No wonder i was getting lost while searching for the best solution to my needs.. The pages are identical. So if
someone releases something on git hub other people can create "branches" of there own versions of the same
thing?

I think I'm starting to understand how GitHub works more now..

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Tue Oct 13, 2015 5:45 am

Sounds like 2 great minds with the same idea could make something very cool.
So, as I didn't think of adding mopidy, I guess I'm not one of those "great minds" :D

They're only the same when the "fork" is created. After that, any changes that 9and3r makes will only apply to his fork. This allows people to develop different features or take projects in new directions. That's why his fork has a mopidy screen but mine doesn't.

If 9and3r's mopidy screen is totally awesome then he can send a request to me to add that code to mine.

So, if you're only interested in the mopidy screen then you should watch 9and3r's forked version of my code so you can test any updates as they are added.

If you want to design your own screens and then later share them, then you should also create a fork of my (or 9and3r's) repository and work on that.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

brendanssound
Posts: 24
Joined: Tue Oct 06, 2015 10:59 am

Re: RPi Information Screen for Official Raspberry Pi Display

Tue Oct 13, 2015 6:53 pm

Spent the whole night fiddling with this.. Must sleep soon.. nearly 5am.

But here is what iv learned:
I did another fresh install to try out https://github.com/9and3r/RPi-InfoScreen-Kivy

Installed mopidy first and set it up to run as a service (and the dependencies) etc

When i start the main script with that configuration i get the mopidy screen with a very
nicely laid out "now playing" "tracklist" and "search" menu.. no option to play spotify and
i have not yet got it to detect network files (although I'm fairly certain i just need to play
with the timeout settings for that).

Now if i exit out of that and go back to the raspbian desktop, and install https://github.com/9and3r/mopidy-touchscreen
This. When i start mopidy i get a nice touch interface for mopidy - Complete with
finger friendly buttons and the ability to play Spotify (Worth noting btw.. You do need premium for this)

However this is when i launch mopidy from the "desktop" not within the software you built. So
no clock/weather/google calender (*nudge nudge* :)

hrmm... so close

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Tue Oct 13, 2015 9:07 pm

I suspect it's just early days. Give 9and3r a chance to finish it. And if you come across bugs, let them know.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

9and3r
Posts: 16
Joined: Mon Aug 26, 2013 11:58 am

Re: RPi Information Screen for Official Raspberry Pi Display

Tue Oct 13, 2015 9:12 pm

https://github.com/9and3r/mopidy-touchscreen is the extension I developed some time ago. My idea is to replace it with https://github.com/9and3r/RPi-InfoScreen-Kivy .

The one done with kivy is starting and has very limited functionality now, but it would get more functionality in the future (probably the same or more than mopidy-touchscreen).
When i start the main script with that configuration i get the mopidy screen with a very
nicely laid out "now playing" "tracklist" and "search" menu
There are three screens. The one in the middle is the current displayed screen. You can change to the others pressing on them.
no option to play spotify
If you press search and type a song (I have not tested if the keyboard works on touchscreen, only with keyboard) you should be able to add songs to the tracklist and play them.
i have not yet got it to detect network files (although I'm fairly certain i just need to play
with the timeout settings for that).
I have not tried anything like that but you should check in mopidy documentation.

brendanssound
Posts: 24
Joined: Tue Oct 06, 2015 10:59 am

Re: RPi Information Screen for Official Raspberry Pi Display

Wed Oct 14, 2015 6:58 am

9and3r wrote:The one done with kivy is starting and has very limited functionality now, but it would get more functionality in the future (probably the same or more than mopidy-touchscreen).

So i take it it's not as simple as transferring over the python script already there and making it kivy compatible
There are three screens. The one in the middle is the current displayed screen. You can change to the others pressing on them.
Looking back at my post.. I can see how it looks like i wasn't aware of that. But yeah i knew this much
no option to play spotify
Are you talking about Spotify or just local media? If Spotify.. what am i meant to type? if local media.. That makes more sense but actually i tested this out earlier (put a song on USB, transferred it over to the SD Card, scanned media directory to a folder with just that song - Mopidy see's the song and seems happy, Mopidy-touchscreen can play the song happily. But when i open up your 'fork' of Rpi-Information-screen and go to Mopidy screen.. I see no tracks under tracklist. Search does not appear to work for me yet either.. Is there a setting i have to change to enable keyboard?

With just using touch i can select the search field and see it is waiting for an input.. But when i type nothing happens.
I have not tried anything like that but you should check in mopidy documentation.
Thanks, and i hope you both know i really appreciate the patience with me.

9and3r
Posts: 16
Joined: Mon Aug 26, 2013 11:58 am

Re: RPi Information Screen for Official Raspberry Pi Display

Wed Oct 14, 2015 9:47 am

So i take it it's not as simple as transferring over the python script already there and making it kivy compatible
Yes. It must be rewritten to work with kivy and websockets.
Are you talking about Spotify or just local media? If Spotify.. what am i meant to type? if local media.. That makes more sense but actually i tested this out earlier (put a song on USB, transferred it over to the SD Card, scanned media directory to a folder with just that song
This screen calls Mopidy Core API. This makes the screen unaware where the song is coming from (this is handled by mopidy) so it should work with any song that mopidy sees. In my case I am testing with spotify songs (mopidy-spotify installed and configured and spotify premium account).
Mopidy-touchscreen can play the song happily. But when i open up your 'fork' of Rpi-Information-screen and go to Mopidy screen.. I see no tracks under tracklist.
Tracklist is the tracks currently in the queue, not the ones that mopidy detects. So by default should be empty. I think you are thinking tracklist as library. Library is in my next TODO list. I will let you know when is ready. So currently the only way to add tracks is to use search.
Search does not appear to work for me yet either.. Is there a setting i have to change to enable keyboard?
What is not working? Does the input box appear? Are you able to write on the input? Or after the input and tapping on the magnifying glass anything happens?

If the problem is related to the keyboard I am not sure. The problem is that I do not currently own any touchscreen (I broke the little one that I had. I am planning to buy the official one). So I am doing the testing in my laptop and the keyboard works out of the box. It is the first time that I work with kivy but from the documentation I understand that kivy should detect the touchscreen and show onscreen keyboard when you touch on the text input.

So just to be sure grab the latest code from github. Tap on search. Tap on the white input field. It should appear the onscreen keyboard. In case it is not use a regular keyboard. Try to type a song name and press enter or tap on the magnifying glass.

A list of songs should appear. Press any of them and the song should start playing. I put an image on how it looks.
i hope you both know i really appreciate the patience with me
Don't worry and feel free to ask all you need! ;)
Attachments
mopidy.jpg
mopidy.jpg (37.33 KiB) Viewed 5658 times

brendanssound
Posts: 24
Joined: Tue Oct 06, 2015 10:59 am

Re: RPi Information Screen for Official Raspberry Pi Display

Wed Oct 14, 2015 11:04 am

First of all.. what the hell was up with my formatting in my last post? haha.. that's shocking.
9and3r wrote:This screen calls Mopidy Core API. This makes the screen unaware where the song is coming from (this is handled by mopidy) so it should work with any song that mopidy sees. In my case I am testing with spotify songs (mopidy-spotify installed and configured and spotify premium account).
Yeah i took the time last night to sign up for premium as well, Definitely seems worth it and the first month is free! So (assuming it worked.. (read below for more on that)) I would type in a random song in search and it would find that on spotify? Normally i just select a playlist like Discover Weekly and let that play..

I can do that in mopidy (on its own) so maybe i can type "discover weekly" into search inside your search window? Or maybe that's just a work in progress feature? No trouble if it is.. I hope i can be of assistance in bug finding and helping get this complete.
9and3r wrote:What is not working? Does the input box appear? Are you able to write on the input? Or after the input and tapping on the magnifying glass anything happens?
I get 3 screens as you said, Switching between them however is not as simple as tapping search/tracklist etc.. The sweet spot where the screen seems to switch between screens is down the bottom, slightly to the left.

The trouble is that when i get to the search screen tapping the input box does not appear to do anything until i get just the right spot again. And then i just get a flashing line in the input box where it is expecting me to input something.. But no onscreen keyboard appears and when i did attach my keyboard it does not seem to detect input. The magnifying glass is no better.

I'm actually starting to wonder if its a touch calibration issue.. But definitely outside of Kivy screens everything works fine.
9and3r wrote:The problem is that I do not currently own any touchscreen (I broke the little one that I had. I am planning to buy the official one)
Broke one myself while building the case for it.. Apparently epoxy and touch screens are not the best of friends. $90 AUD gone like that but lessons were learned. .

Not sure if this is helpful: Replacement Digitizer Cheaper than buying a screen maybe?

The one i use now
9and3r wrote:I understand that kivy should detect the touchscreen and show onscreen keyboard when you touch on the text input.

Definitely sounds like it will be a sweet setup once its working for me.
9and3r wrote:So just to be sure grab the latest code from github. Tap on search. Tap on the white input field. It should appear the onscreen keyboard. In case it is not use a regular keyboard. Try to type a song name and press enter or tap on the magnifying glass.
Tried removing and re-cloning just to be sure.. Same deal.

Here's an error that may or may not be related

Here's another bit of log that may be interesting.. Happens when i CTRL+C out

Though keep in mind.. Despite these errors.. The screens do seem to keep working.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Wed Oct 14, 2015 11:35 am

9and3r wrote:The problem is that I do not currently own any touchscreen (I broke the little one that I had. I am planning to buy the official one). So I am doing the testing in my laptop and the keyboard works out of the box.
My official screen is broken so I'm also developing on the laptop!
It is the first time that I work with kivy but from the documentation I understand that kivy should detect the touchscreen and show onscreen keyboard when you touch on the text input.
I had a concern about the onscreen keyboard with this program. As the program uses a 50px zone on the left and right of the screen to move between screens, I did wonder if this would cause an issue with the keyboard. I've not tried the onscreen keyboard yet, but do let me know if there's an issue and I'll take a look.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

9and3r
Posts: 16
Joined: Mon Aug 26, 2013 11:58 am

Re: RPi Information Screen for Official Raspberry Pi Display

Wed Oct 14, 2015 11:29 pm

So (assuming it worked.. (read below for more on that)) I would type in a random song in search and it would find that on spotify?
Yes. It should work like that.
Normally i just select a playlist like Discover Weekly and let that play..
The playlists screen is not implemented so this will have to wait. Using search Discover weekly will not work.
I get 3 screens as you said, Switching between them however is not as simple as tapping search/tracklist etc.. The sweet spot where the screen seems to switch between screens is down the bottom, slightly to the left.
Maybe the y axe is inverted. I found this https://github.com/kivy/kivy/issues/265 ... t-63998653. You can check if inverting the axe works.
Not sure if this is helpful: Replacement Digitizer Cheaper than buying a screen maybe?
Thanks for the info but my touchscreen is 2.4 inch so I think I should upgrade to a bigger one.
Here's an error that may or may not be related
Seems related to clipboard. So probably clipboard will not work in kivy but not harmful. The other error I do not know what it means. But I also have some errors related to input and seems to not affect at all.
I had a concern about the onscreen keyboard with this program. As the program uses a 50px zone on the left and right of the screen to move between screens, I did wonder if this would cause an issue with the keyboard. I've not tried the onscreen keyboard yet, but do let me know if there's an issue and I'll take a look.
I was able to use the onscreen keyboard and not issues at all even trying to press on the invisible 50 pixel buttons. It seems that the keyboard is the only one getting inputs until you press outside and the keyboard is hidden again.

I was able to change the keyboard using kivy config: http://kivy.org/docs/api-kivy.config.html

As advice I would make a global conf.json (something similar to what you make with screens configs) to let people choose keyboard mode, full screen or not... and call kivy.config with the values read from the global conf.json.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Thu Oct 15, 2015 8:29 am

9and3r wrote:I was able to use the onscreen keyboard and not issues at all even trying to press on the invisible 50 pixel buttons. It seems that the keyboard is the only one getting inputs until you press outside and the keyboard is hidden again.

I was able to change the keyboard using kivy config: http://kivy.org/docs/api-kivy.config.html

As advice I would make a global conf.json (something similar to what you make with screens configs) to let people choose keyboard mode, full screen or not... and call kivy.config with the values read from the global conf.json.
Good advice. Thanks.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Sun Oct 18, 2015 6:12 pm

Update: I've been trying to update the Squeezeplayer screen so that it relies on receiving notifications from the server as opposed to constantly polling the server. I've done this by creating a new subclass of the Server class in the PyLMS module and also having this run as a separate thread.

I'm pleased to say that this seems to be working pretty well so I'd hope to have this in a form that I'm comfortable in releasing pretty soon.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Wed Oct 21, 2015 9:20 am

I've just uploaded a video of my SqueezePlayer control screen in action.

https://youtu.be/jxYPIW7vlYU

I wanted to have a video of this running on the Pi screen but, to cut a long story short, I had to get a new screen and haven't had time to unpack it yet!
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

brendanssound
Posts: 24
Joined: Tue Oct 06, 2015 10:59 am

Re: RPi Information Screen for Official Raspberry Pi Display

Thu Oct 22, 2015 7:42 am

Touch or normal screen?

The new word clock is pretty awesome, loving it.

9and3r - I don't have the calibration file mentioned in that link. I tried to make one but
it seems to have no effect. Again.. The touch works perfect outside of any kivy screens.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Thu Oct 22, 2015 7:47 am

Yes, these screens use the touch events of the display.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

brendanssound
Posts: 24
Joined: Tue Oct 06, 2015 10:59 am

Re: RPi Information Screen for Official Raspberry Pi Display

Thu Oct 22, 2015 9:24 am

elParaguayo wrote:Yes, these screens use the touch events of the display.
Ha, yeah i realized this.. I meant since you had to go buy a new screen did you go with a touchscreen?

If i remember rightly, I think you said you were stuck using a laptop screen until you got a new one? or maybe
that was somebody else.

For the sake of it, I made a video (it's got pedo style heavy breathing and blair witch project camera shake) but
gives you guys an idea of what's happening on my end. https://youtu.be/VbIC6OvulPY

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Thu Oct 22, 2015 9:29 am

brendanssound wrote:
elParaguayo wrote:Yes, these screens use the touch events of the display.
Ha, yeah i realized this.. I meant since you had to go buy a new screen did you go with a touchscreen?

If i remember rightly, I think you said you were stuck using a laptop screen until you got a new one? or maybe
that was somebody else.

For the sake of it, I made a video (it's got pedo style heavy breathing and blair witch project camera shake) but
gives you guys an idea of what's happening on my end. https://youtu.be/VbIC6OvulPY
Ah! Yes, I've gone for another official display (the glue on the old one was bad so the glass fell off!).
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Thu Oct 22, 2015 7:24 pm

Energenie control screen done.
Image

It's very basic but that's ok as it's just a glorified light switch!
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Sat Oct 24, 2015 11:02 am

Annoyingly, the Squeezeplayer screen has shown a few bugs when I put it on the Pi. Needs some work...

It's disabled by default so I suggest you leave like that for now!
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: RPi Information Screen for Official Raspberry Pi Display

Sun Oct 25, 2015 6:40 pm

Have got rid of the big bugs so it should be in a good state to use now. However, if anyone does come across bugs, please report them to me.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

craighissett
Posts: 10
Joined: Fri Oct 03, 2014 10:12 pm

Re: RPi Information Screen for Official Raspberry Pi Display

Mon Oct 26, 2015 1:43 pm

elParaguayo - this is absolutely amazing!

I am rebuilding my Pi Python Player to be a stationary unit in my son's room, and am going to be using two Pi's; one attached to the touch screen, and one attached to the HDMI out for connection to a projector.

I am hoping to get to grips with how your code works and create a similar, modular system to allow for easy feature addition.
The first one will hopefully be a TV-like service, presenting multiple playlists like a TV.

Here's to wishing! :)

I've made reference to your Github on my Hackaday project page - hope you don't mind!

https://hackaday.io/project/8008-pi-med ... dia-player

Craig

Return to “Other projects”