New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pydPiper with Moode 4 beta 12 #20
Comments
I am also quite interested in this! |
I'll have to look into it. The code has been significantly modified since I did any Moode testing but it shouldn't be that hard to get it working. The big issue will be whether I can get docker running on the distribution easily as pydPiper is now run out of a container to reduce dependencies on the underlying OS. |
Well moode is now installed on a standard stretch image, there is no longer a precompiled .img to download. I would really like to have this on my player, as I find it looks much nicer then the other display setups available. I hope it will work with the display directly connected to the pi without an i2c backpack as well. |
I also looking into moOde support. Hope this become available. At the moment I using your old one @dhrone |
I've got Moode working again but only for content that uses the MPD daemon. Instructions for installing from fresh Moode 4.1
Next, run the new configure script. Configure.py will produce two files when finished. pydpiper.service to be used by systemd to autostart pydPiper and pydPiper.cfg which is where all of the configuration information for pydPiper now resides. To test the installation you can open up a shell within the docker container and manually run pydPiper... If pydPiper doesn't start up successfully, you may want to change the logging level to debug to see if any messages show up that help determine what the problem is. If it is working correctly, you can enable it within systemd using the following commands. Note, I have not had much time to test this so my apologizes in advance if it fails. Good luck! |
Nice one @dhrone Thank you |
I've been waiting for this to update my Moode install. I'll try it out this weekend hopefully and report back! |
Thanks again for your great code:-) I have been trying to install this but with some errors. Next when testing the installation file I get an error regarding the [STARTUP]: For other users, type "exit" after run of installation test to get back to user pi@moode... Could you please help with this? :-) Regards MIkkel |
A small typo on my part. the test line should read... The difference is at the very end of the line. I accidentally used cfg as the extension when the correct file to run has the py extension. You will need to revert the changes you made to the pydPiper.cfg file. You could also remove it and then re-run the configure program. |
Thanks for your reply:-)
What file is to be enable in the systemd? Your code says it is the I was not able to make the time work with "France/Paris". Instead I used "Europe/. I have set the time24Hours to "TRUE" but still shows 12 hour clock? Should the "LCD update engine" in Moode Audio settings be activated or is pydPiper running something different? Thanks again for this awesome piece of code:-) |
The configure program creates the service file which is named pydpiper.service. It needs to be moved into the appropriate directory for Moode and then enabled (and then started) using the systemctl command. Unfortunately, I don't have a Moode instance running today so can't verify the directory. The correct TZ value for Paris is Europe/Paris No, the LCD update engine works using a completely different mechanism. At the moment, it does not need to be activated for pydPiper. |
That sounds great:-) Let me know if I should test something. I do also get a "no active widgets" when playing from the MPD. Would that also be related to the correct moode directory? I have used default settings from the pydPiper.cfg... I am using a 24x2 display and have used 120 width and 16 in height. The text and clock is off center and sometimes the weather text is rolling and not using the entire length of the display. Should this automatically be adjusted when i specify the dimensions or should I start to change all dimensions in the pages_lcd_16x2.py? Thanks again :-) |
Regarding the pages I have also tried the pages_fixed_moode.py. There is a lot of question marks at a 1/4 of the bottom left of 24x2 HD44780 i2c display. I have tried to change the width to 80 but the same. |
Configuring the page files for an HD44780 is a challenge as the placement of characters has to exactly match the pixel matrix of the underlying display and you can only use the latin1_5x8_lcd.fnt and BigFont_10x16_fixed.fnt fonts. The reason is that pydPiper treats all displays as graphics displays as opposed to character displays. HD44780 displays are character based with each character being represented by a 5x8 pixel sprite that is stored in the display's character generator. pydPiper's HD44780 driver converts from its graphical representation into the HD44780s characters by looking at the display as a set of 5x8 blocks and then seeing if it can match what is inside the block to a character in the HD44780 displays character map. This only works if the pages file is set to draw the characters using a font that exactly matches the HD44780s and that the characters are drawn in alignment with that 5x8 grid. When there is a mismatch between a grid value and what is within the character generator, a custom character is created on the fly, stored in the HD44780s limited custom character memory and then displayed. Unfortunately, you can only have 8 custom characters loaded at a time which means that if you have say a few foreign characters you need to display it works great but if you are trying to create an entirely custom display, you'll run out of custom font memory. At this point you get the ? marks that you are seeing in the display. I have not run across a 24x2 display before. Please send me a link so I can take a look and see if there are any other issues that need to be addressed. FYI, the "no active widgets" message occurs when none of the sequence conditions are being met. You may want to run pydPiper with the --showupdates flag and then see what the values are when you are getting the "no active widgets" message. Most of the time it is a problem with the "state" variable. |
Thanks for that detailed description of how you write to a display:-) That was very useful. I have bought this display: |
I figured out the --showupdates. Sorry :-) Could you give me a hint on what to look after with the showupdates please? I can see that it does read the radiostream I am playing with url and station name under artist. It also read the freq ans so on. |
If you look at the pages file, you'll see condition statements associated with each sequence and also attached to canvases within a sequence. To use the showupdates information, get your player into the state that is displaying the no active widget message and then look at the showupdates variables. See if there is a sequence (and a canvas) that should be displaying, but is not. The labels are not errors. It is just showing what type of variable is being reported. FYI, unicode is a type of string. |
Hi again and once again thanks for helping. I tried to look at the showupdates and noticed the artist line looked different: So I comment out the artist, playartist and playartist_radio in the widget, sequences and canvases but still the same problem with no active widgets. I also tried with the random sequences, still the same. Sorry but I am not that good at coding:-) I did mange to change some of the canvases to display at the 120x16(weather info), but the time canvas is somehow locked to the 70x16 size and I can't shift it further than 80 even through I have made the size 120x16 in the canvas... Thanks again :-) |
I did manage to shift the time further to the right on the display. Now it is at the center. I had forgot to move the AM/PM... :-) |
Ok. I think I see the problem. There is an inconsistency in the music drivers. I'll need to go through and make sure that all of the music sources are using the exact same variable names. In the mean time, you may be able to get it up and running by changing every instance of |
Thanks! That worked for now! :-) |
Hi again. `Job for docker.service failed because the control process exited with error code. docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. I ran the systemctl and journalctl -xe but not sure what to do with this other than the failed in loading: LOAD = Reflects whether the unit definition was properly loaded. 2 loaded units listed. Pass --all to see loaded but inactive units, too. I have also made an update and upgrade command... |
I'm assuming a reboot didn't resolve the issue. The problem is some kind of failure of the docker system. Unfortunately, a reinstall is likely the easiest resolution. |
Thanks once again for helping and you are assuming right that a reboot didn't solve the problem :-) I have been messing a bit around with the "artist" section but i can't make it work. I have tried to change it to actPlayer in the sequences but no success. The [artist]=u'' <type 'unicode'> is empty when I use the --showupdates ... it's the same when running the MPD and Radio. Do you have any good ideas :-)? For others with same issue(backup customized page file first!): |
OK, so I may have some time finally to try this. |
Hi Rikardo You also have to change this in your pages file at “sequences” to make the widgets work: There isn’t a final solution for the auto start of pydpiper yet. Maybe you have a good idea? :-) Regards Mikkel |
Hi Drone I managed to figure out to autostart the pydPiper in Moode. I used some of your code from the volumio install file ;-) And it worked! To stop pydPiper: The display of Artist work when playing from HDD. I can still not get it to work in webradio. I am using Spotify Connect made by RafaPolit: https://github.com/RafaPolit/moode-spotify-connect-web Thanks again for this great code:-) |
My display didn't work after updating to MoOde 4.4. The docker was not running. |
Good evening,
I try to run your python program "pydPiper" with moode 4B12. I tried but it does not work. Is it compatibel with MoOde 4b12?
I own a RaspDAC with rpi3 + AUDIOPHONICS I-Saber V3 DAC ES9023 TCXO + Screen Winstar OLED 16x2 White HD44780.
Do you have any idea how to make it work?
Thank you
The text was updated successfully, but these errors were encountered: