Sonos-HDMI by Retired Guy isn't outputting graphics...

  • 11 January 2022
  • 31 replies
  • 452 views


Show first post
This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

31 replies

Did you run the install step for the font?

 

sudo apt install ttf-dejavu

 

 

That library was missing. Thank you.  So now I’m getting a crash without details.

pi@raspberrysonos:~/sonos $ python3 sonos.py

Illegal instruction

This could be because of lack of fonts.  When I add the font library, after updating Debian on the Pi I get: E: Unable to locate package ttf-dejavu

Can I use a default system font that is sans, to be more modern?  Did you pick that because it scales to large format better than system fonts?

Actually, I my have documented that incorrectly. Try:

 

sudo apt install libopenjp2-7-dev

 

Ok, so looks like you didn’t do all the install steps from section 8 of the readme, specifically the jpg library install, which is required by PIL. 
 

Starting here:

sudo apt install libopen-jp2-7-dev

sudo apt install libtiff5

sudo apt install ttf-dejavu

pip3 install soco

pip3 install Pillow

Ok, thank you for the insight on the console view.  I’m getting a break at Image.py; which does exist in that directory.  I do not see libopenjp2.so.7 in the directory however.

  File "/home/pi/sonos/sonos.py", line 20, in <module>

    from PIL import Image

  File "/home/pi/.local/lib/python3.9/site-packages/PIL/Image.py", line 89, in <module>

    from . import _imaging as core

ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory

I don’t have this set up any more, or any Sonos products running at the moment, but a couple of things to check.

Try sudo journalctl -u sonos.service  to see if/why it fails to start.

Run sudo systemctl stop sonos.service, then start it manually from the cmd prompt:

   cd ~ 

   cd sonos

   python3 sonos.py

 

Make sure you’ve done all the steps outlined, including giving the “pi” user membership in video group:

  sudo usermod -a -G video pi

 

Around line 288 in sonos.py: fb = open(“/dev/fb0”, “wb”).  It’s possible that your pi is using fb1 for HDMI vs fb0, especially if there’s another screen installed locally.