Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Using MoOde with LCDproc/LCDd as Display
#1
Is anyone using lcdproc / LCDd to drive a LCD Line Display and show content of MoOde ? 
Background: I have an old  4 x 20 Display that I now connected to the RPi (via USB) and it currently shows the standard widgets with nice, status etc from the RPi System.
Now I try to setup a new "screen" for lcdproc to show content that is in the lcd.txt file provided by MoOde. As I have never programmed Phyton, I thought maybe somebody has already the script that I could use or adjust ?  

Maybe there is an example script on github that I overlooked ?
Reply
#2
Let ask my question a bit simpler: has anybody a script or know where I need to look for a script that reads out lcd.txt or /var/local/www/currentsong.txt ?
Reply
#3
Have you looked in the FAQ and Guides Forum? There are some threads regarding displays, scripts....

J
 :@
Reply
#4
(01-19-2019, 07:49 PM)JST1963 Wrote: Have you looked in the FAQ and Guides Forum? There are some threads regarding displays, scripts....

J

Thanks for your reply. Yes, I already have looked through them - most concentrate on either pidPiper or via GIO connected LCD's - no one is really using LCDd and lcdproc - which works well with my old 20x4 LCD that is already interfacing with USB. And - to blame myself - I have never coded in python. So I am currently stuck how phyton reads out the file lcd.txt or currentsong.txt and devides key and content into variables to use them in a lcdproc widget. I think I will find a lcdproc python script to build widgets. 

As usual: I thought Mr Google could provide everything for free :Big Grins I don't want to spend a lot more time into the music player itself - it works and sounds good so far. 

Anyhow, looks I need to either do it by myself or move on without LCD attached
Reply
#5
I cannot imagine that my personal friend, George O. Ogle, is not able to help you. I understand that the results of your search string don't always satisfy you, but there are numerous examples of how to read a text file. They just don't always refer to the specific lcd.txt or currentsong.txt files but the examples given should be able to get you started.
I'm not a programmer myself but I'm pretty sure if I took the time I would get it to work (sorry, don't have that time, nor do I have a display :-)

J
 :@
Reply
#6
(01-20-2019, 01:32 PM)JST1963 Wrote: I cannot imagine that my personal friend, George O. Ogle, is not able to help you. I understand that the results of your search string don't always satisfy you, but there are numerous examples of how to read a text file. They just don't always refer to the specific lcd.txt or currentsong.txt files but the examples given should be able to get you started.
I'm not a programmer myself but I'm pretty sure if I took the time I would get it to work (sorry, don't have that time, nor do I have a display :-)

J

LOL - Sure and I wanted not to pressure somebody to program something just for me. I just thought somebody had had the same challenge in the past and ha now a script as a starting point. Meanwhile I received one example for a different setup , but not soooo complicated as using PidPlayer. So I will try to do so -and I already have bought a python book last year that has now dust on it's top. Time to remove ( the dust Big Grin )

There are other difficulties with that display - no power off when the player sleeps over night. RPi has no sleep function to wake with WOL etc. But I have soem friends in the neck, they want that I build them such a nice Streaming box. So a while to go ...

Thanks for your reply and support
Reply
#7
(01-20-2019, 04:13 PM)UpsiUps Wrote: LOL - Sure and I wanted not to pressure somebody to program something just for me. I just thought somebody had had the same challenge in the past and ha now a script as a starting point. Meanwhile I received one example for a different setup , but not soooo complicated as using PidPlayer. So I will try to do so -and I already have bought a python book last year that has now dust on it's top. Time to remove ( the dust Big Grin )

There are other difficulties with that display - no power off when the player sleeps over night. RPi has no sleep function to wake with WOL etc. But I have soem friends in the neck, they want that I build them such a nice Streaming box. So a while to go ...

Thanks for your reply and support


I'm not sure I understand what the sticking point is here but you haven't given any details about your USB-connected display. Can you write to it as if it's a terminal device, e.g., just squirt characters to it?

Software like PydPiper and LCDproc serve a purpose but they're rather elephantine because they try to cover many use cases with different display types, interfaces, and information sources. Useful if you need all that; an unnecessary distraction if you don't.

moOde does not need a Python script for an LCD Update Engine, despite what the help icon says. Any executable script which parses the currentsong.txt file, etc., and writes suitably formatted information to a device will do. It does have to obey a couple of rules, touched on in Tim's earlier post today (http://moodeaudio.org/forum/showthread.p...28#pid7328)

Last spring I wrote a bash script which connected moOde to a $25 (US) USB "terminal" known as the Odroid Show2 (http://moodeaudio.org/forum/showthread.p...63#pid1563). The end result, lcd-test.sh, was ca 150 lines (including comments) of pedestrian code. Took me a weekend; would have taken less if the Odroid documentation were better and I hadn't forgotten so many bash-isms.

I've posted the script at https://www.dropbox.com/s/irjhnk63h00v02...st.sh?dl=0

It isn't pretty but it does what my post says it does. I got distracted with events in my "real" life and haven't done anything with displays of any kind since then.

As for other difficulties you mention at the end of your post...one step at a time is my motto.

Regards,
Kent
Reply
#8
(01-20-2019, 05:32 PM)TheOldPresbyope Wrote: I'm not sure I understand what the sticking point is here but you haven't given any details about your USB-connected display. Can you write to it as if it's a terminal device, e.g., just squirt characters to it?

Software like PydPiper and LCDproc serve a purpose but they're rather elephantine because they try to cover many use cases with different display types, interfaces, and information sources. Useful if you need all that; an unnecessary distraction if you don't.

moOde does not need a Python script for an LCD Update Engine, despite what the help icon says. Any executable script which parses the currentsong.txt file, etc., and writes suitably formatted information to a device will do. It does have to obey a couple of rules, touched on in Tim's earlier post today (http://moodeaudio.org/forum/showthread.p...28#pid7328)

Last spring I wrote a bash script which connected moOde to a $25 (US) USB "terminal" known as the Odroid Show2 (http://moodeaudio.org/forum/showthread.p...63#pid1563). The end result, lcd-test.sh, was ca 150 lines (including comments) of pedestrian code. Took me a weekend; would have taken less if the Odroid documentation were better and I hadn't forgotten so many bash-isms.

I've posted the script at https://www.dropbox.com/s/irjhnk63h00v02...st.sh?dl=0

It isn't pretty but it does what my post says it does. I got distracted with events in my "real" life and haven't done anything with displays of any kind since then.

As for other difficulties you mention at the end of your post...one step at a time is my motto.

Regards,
Kent
Hey - thanks for your great information !  Yes, I have not mentioned the type of display as LCDproc is handling that stuff - so you are able to use a lot of different LCD's. LCDproc would have the advantage to concentrate on content and not how to get it displayed. Now saying that , my display is indeed one of those you could simple do an echo "blabla" > /dev/ttyUSB0
The problem is, it will show something but not "blabla" as the character coding is different.
I grabbed your bash-script and it would also need some adaption as my display is only 4x20 - but maybe I will do it. Currently I am adapting a python script . I will post the results

Thanks for your reply and help !
Reply
#9
(01-22-2019, 03:03 PM)liv_s Wrote: You may want to read, even it is for different distribution:

https://www.instructables.com/id/MyPIAmp...amplifier/

I use his py file for a vfd display, see attached.

Thanks for your reply and sharing of your source. I will have a look on it.
Reply
#10
Just a final update: I was able to write a (zsh) - script that shows the data on my old LCD. It was a great learning ( don't use shell scripts for text arrangements and don't use it for HW programming where you want to set bits ( using Control-Codes) ) Next time I will use better either LCD proc or a real programming language for doing so.
And for MoOde: use the standard 7" Touch Display - unless you don't want to program a OEM product.

Anyhow: now my display shows partial all data that fit into 20 characters per line Big Grin

Thanks all for your support !
Reply


Forum Jump: