LCD Update Engine - Python Script
I have been using a Python script to display song information on a 20x4 LCD display. This seems to work very well, but I have a small problem.
I wrote a routine that will scroll song names and album names that are longer than 20 characters. The issue I have is that if I skip a track before the scrolling has completed the screen information does not get updated. Skipping the track again and everything is back to normal.
Tim's LCD Update Engine calls the user provided script everytime the song changes. What is the correct way to handle this in the Python script so that the information will not be lost when skipping tracks? How do you end the first program when the second program is called?
Any help with this would be really appreciated.
Cheers, Bryce.
I have been using a Python script to display song information on a 20x4 LCD display. This seems to work very well, but I have a small problem.
I wrote a routine that will scroll song names and album names that are longer than 20 characters. The issue I have is that if I skip a track before the scrolling has completed the screen information does not get updated. Skipping the track again and everything is back to normal.
Tim's LCD Update Engine calls the user provided script everytime the song changes. What is the correct way to handle this in the Python script so that the information will not be lost when skipping tracks? How do you end the first program when the second program is called?
Any help with this would be really appreciated.
Cheers, Bryce.
In MacOS, if an event takes more than 120 seconds, a time out is issued - that's what the 1712 indicates.
Sometimes it's a hidden dialog screen, but it could be something wrong with your SD or the img file.
I use Apple Pi Baker and Etcher - I found Pi Filler a bit poor on error handling.
+1 on Etcher, I've never had any trouble with it at all on MacOS.
Hi,
I fixed a logic bug in the code that processes "click on same Playlist item". The bad logic was causing a 250 ms delay to be added after the play cmd. This could be the cause of the audio drop out in your scenarios.
I'll put out a 3.8.3 bugfix release that will include this fix and any others that are reported and can be fixed in next week or so.
Thanks for keeping the bug reports coming 🙂
-Tim
Hi Tim,
Intro skip on Chord Mojo when re-clicking on the already playing track (from a playlist) are still available. That is, in version 3.8.3 of the delay, nothing has changed after upgrading from 3.8.2.
Sergey.
Hi Adrian,
Pick one of the systems that is experiencing the issue and email me the output from System info and I'll take a look.
-Tim
Hi Tim - email sent - thanks. Adrian
Tim, I have downloaded again from moodeaudio.org and have unzipped. Again I get d0fb4145923d4d088537cb252f50fb9c. Does this suggest that your ZIP file is corrupted and that the issue is not mine?Hi @ICLIP,
The MD5 hash for the 384 zip file is listed in the Purchase section at moodeaudio.org
The hash is: 96ae66303ff8f0486aa330cd5f53b3fc
If you are not getting this then your downloaded zip has somehow been corrupted.
-Tim
Tim, I have downloaded again from moodeaudio.org and have unzipped. Again I get d0fb4145923d4d088537cb252f50fb9c. Does this suggest that your ZIP file is corrupted and that the issue is not mine?
You check the sum against the zip file, not the .img
Ah! OK, the download is good. Thank you very much. Now flashing the card using Etcher instead of Pi Filler.You check the sum against the zip file, not the .img
I have been using a Python script to display song information on a 20x4 LCD display. This seems to work very well, but I have a small problem.
I wrote a routine that will scroll song names and album names that are longer than 20 characters. The issue I have is that if I skip a track before the scrolling has completed the screen information does not get updated. Skipping the track again and everything is back to normal.
Tim's LCD Update Engine calls the user provided script everytime the song changes. What is the correct way to handle this in the Python script so that the information will not be lost when skipping tracks? How do you end the first program when the second program is called?
Any help with this would be really appreciated.
Cheers, Bryce.
+1 BryceJ has been super helpful in getting my 16x2 lcd working with MoOde. Scrolling would be just great for family use of moOde.
With you there @ remy1961 😉
Moode Audio Player for Raspberry Pi
How do I get a few selected radio stations to appear on the source list (Browse tab). I had this with 3.7, but can't see how to replicate it in 3.8.
Probably the same question as mine, but worded differently.Also how do you make a radio station a favourite?
Also how do you make a radio station a favourite?
What os are you using to access MoOde...?
In Ubuntu I do... Filesystem>Connect toServer> Windows shares on moode.local smb://moode.local/ >connect
Then select >Radio > connect
And make a new folder of "Favourites" and move my favourite webradio stations to that.
Then in Moode Ui >Moode>configure>sources>Update MPD database
Last edited:
Also how do you make a radio station a favourite?
I get the station playing and enter its name into the Playlist box (Click the arrow top left to show the box). It then appears under the Browse tab.
Last edited:
@Tim
The system that I successfully updated from 3.8.3 to 3.8.4 shows Mpd version 0.20.10 in the System info. The sd card got corrupted in my other system so I installed a fresh 3.8.4 image. However that system is showing Mpd version 0.20.9. Seems odd?
John
The system that I successfully updated from 3.8.3 to 3.8.4 shows Mpd version 0.20.10 in the System info. The sd card got corrupted in my other system so I installed a fresh 3.8.4 image. However that system is showing Mpd version 0.20.9. Seems odd?
John
I get the station playing and enter its name into the Playlist box. It then appears under the Browse tab.
That sounds straightforward, but I'm struggling to work out how to create a playlist.
That sounds straightforward, but I'm struggling to work out how to create a playlist.
I edited my above post (obviously after you saw it) to indicate that clicking on the arrow top left will display the Playlist box.
Got it! Thanks for that.I edited my above post (obviously after you saw it) to indicate that clicking on the arrow top left will display the Playlist box.
@Tim
The system that I successfully updated from 3.8.3 to 3.8.4 shows Mpd version 0.20.10 in the System info. The sd card got corrupted in my other system so I installed a fresh 3.8.4 image. However that system is showing Mpd version 0.20.9. Seems odd?
John
Hi John,
That is odd. I'll investigate right away.
-Tim
@Tim
The system that I successfully updated from 3.8.3 to 3.8.4 shows Mpd version 0.20.10 in the System info. The sd card got corrupted in my other system so I installed a fresh 3.8.4 image. However that system is showing Mpd version 0.20.9. Seems odd?
John
Hi John,
That is odd. I'll investigate right away.
-Tim
Hi John,
Yes indeed its a regression :-0 and thankfully the cause is known.
I'll have to temporarily remove the download zip and get a new one made and uploaded. It will take several hours.
I'll post an announcement when the updated download zip is available.
-Tim
Last edited:
I have been using a Python script to display song information on a 20x4 LCD display. This seems to work very well, but I have a small problem.
I wrote a routine that will scroll song names and album names that are longer than 20 characters. The issue I have is that if I skip a track before the scrolling has completed the screen information does not get updated. Skipping the track again and everything is back to normal.
Tim's LCD Update Engine calls the user provided script everytime the song changes. What is the correct way to handle this in the Python script so that the information will not be lost when skipping tracks? How do you end the first program when the second program is called?
Any help with this would be really appreciated.
Cheers, Bryce.
Hi, Bryce.
My days of writing serious Python code are behind me and it's possible there is a trivial fix to your problem which I've forgotten.
That said, I'd think the "proper" way to deal with this is to redesign your program so it is an event-handling service rather than a script which is called repeatedly.
I won't say more lest I misinform with facts I think I remember which aren't so. There's lots of tutorial material out there on the Interweb (TM). If I get a moment, I'll look through some of it myself.
Regards,
Kent
- Home
- Source & Line
- PC Based
- Moode Audio Player for Raspberry Pi