-->
Page 1 of 1

Esp8266-01 Switch controlled by Sonos in Arduino

PostPosted: Fri Aug 07, 2020 7:38 pm
by mrlightsman
I need some help.

I have a sonos brand amp that I have an external
powered subwoofer connected to. I would
like to create a switch using an esp8266-01 that will automatically power up the subwoofer amp when the sonos is playing music. To do this, I believe I need to read the state of the sonos and if it is playing, drive gpio-0 low to turn on a ssr to power up the amp for the woofer. If music is not playing, it will drive group-0 high to turn off the ssr.

I’ve tried using an av sensor on the rca output of the sonos amp, but it is erratic and unreliable. I’m hoping by reading the sonos state it will be more reliable.

There are many examples of how to control a sonos speaker with an esp, but I don’t see anything that will point me in the right direction for this specific application. (Or at least that I understand.)

I am not a noob, but am definitely a novice.

Thank you in advance.

Re: Esp8266-01 Switch controlled by Sonos in Arduino

PostPosted: Sun Aug 09, 2020 5:05 am
by Ebolisa
Not familiar with sonos amp but, how about detecting music/frequency to activate your relay?
https://create.arduino.cc/projecthub/lb ... tor-617856

Re: Esp8266-01 Switch controlled by Sonos in Arduino

PostPosted: Wed Aug 12, 2020 8:19 pm
by mrlightsman
I ended up using a sketch called sonosIR as the basis of my work. It uses sonosUPNP as the main library.

I skimmed out all of the IR stuff and replaced it with simple digitalWrites to control the gpio.