I wanted to keep the spirit of the wallbox with a very simple, minimalist user interface - but I also wanted to be able to use the wallbox to play the sonos system without having to resort to another controller (phone or ipad) to do simple things like adjust the volume. This meant adding a control panel that gave basic sonos controller functionality:
I am using a rotary encoder to adjust the volume, and an Adafruit 2 line LCD display with an SPI interface to display the track. Getting the track title and artist information turned out to be a bit of a challenge because the wallbox selects a number of different sources:
There is a soco function to get the track data - but the title and artist is in different places for different sources - in particular the sirius xm data is different. My code generally works but sometimes fails, I trap that and just display "getting title..." etc.
Doing things like getting track information, changing volume, etc takes variable amounts of time, presumably depending on network traffic, I had to build in sleep periods to give time for sonos actions to take place.
I am in process of rewriting the whole program to be fully object based, like my volume control project