pretty new to Home Assistant so please take it easy with me
I have my entire Sonos System kind of running via Home Assistant. I would like to ad a physical “Switchbox” where I can push buttons and turn a knob.
Like this:
1 button switches entire system on/off
1 button mutes kitchen
1 button mutes living room
1 button switches local radiostation on
1 button switches favorite playlist
1 resistor controls volume in “active” area
Everything stowed in a 3D printed box and place in a easy accessable area in the house.
I was hoping to run it on an Arduino Wifi and connect to Home Assistant.
Hi, I’m not sure why you would want to wire an external switch box rather than use a wireless remote as it seems like a lot more work for less flexibility. Another option would be to use the custom mini media player card on a phone or tablet as per the example below which includes buttons for different stations:
A wall mounted tablet with a custom dashboard for controlling your media might be a better option than a hardwired solution with buttons and switches. If you did want to do go down this route then you could probably do it with a microcontroller like a Wemos D1 Mini or NodeMCU. I remember that 4ative on Youtube did a demo recently https://www.youtube.com/watch?v=_2CSAVYUmnc where he had a potentiometer hooked up to a microcontroller with a small OLED display.
I actually have a simple 8-button remote that my partner uses for the following:
Bedroom light toggle
Sonos Pause/Resume
Sonos volume up/down
Sonos select Sleep playlist
Sonos Next/Prev track
I can share the code if you like but it is probably not what you are after from the sound of it.
I figured already that it sounded so easy in the beginning but turned out to be almost not possible. The idea was to kind of use it also for our kids to switch on/off (They do not have any mobile device, yet ) Like an oldschool kitchen radio device. Just 5 buttons and a volume knob… That was the idea
Since it sounds like too much of a hassle I would try the solution with an old iPad I still have lying around. So it would be awesome if you could share your code. Thank you !
This is my Lovace code which defines a 3-high vertical stack (1 for each of my Sonos players) using the HACS Mini Media Player card. Download the plugin from HACS then just paste the following into a new Manual card and edit it to reference your Sonos entities. Remember to also make sure that the buttons reference valid playlists which must exist in ‘My Sonos’ within the Sonos App:
Note that I use the rfbridge_demux python script to efficiently capture all my RF codes and you and read up on that here Sonoff RF Bridge. Strategies for receiving data. Essentially sensor.remote 5 is either “Button 1” thru “Button 8” if a button has just been pressed otherwise it is “unavailable”.
I was looking at this for months and I finally got around to building it. First time soldering and it was easier than I thought it would be. Now the kids can just scan an NFC card to start music.
I am also thinking of a tabletop volume control for Sonos speakers that is on the HA. It is been a while since I played with HA or ESP, so need some overview. If I simply want to put a button on a Esp32. What is the best way to issue a volume up on the table controller. Can I issue a node.is command from the esp32 using the Sonos api since I assume the Sonos add on for HA maybe has a node.js Sonos integration, or should I issue a command to the HA to initiate the volume change. And ideally I can eventually use the m5 paper that I have.
I apologize as my question is very vague as it is my basic level or recall right now. Basically looking for a macro view of how I should approach this project. Use the ESP to command the Sonos directly or should I use the table top esp to contact the HA then have it issue the command to Sonos? Which ways is easier? Thanks for pointing me in the general direction.