In my quest to remove unnecesaary devices on my network, I created Hubithings Sonos Control.
The only real purpose of this app was to allow me to shutdown my Raspberry Pi that ran njschwartz's smartApp that allowed access to Picos in smartthings. I would then use my ABC app to map buttons and control my Sonos speakers. I suppose I could have waited for Hubitat to integrate Sonos or @krlaframboise to allow button devices to work with Other Hub app, but I'm impatient and this is one of the things I use every day.
Disclaimer: this is a very hacked together solution but works perfectly for me so I thought I'd share it. See steps below.
- Create a Virtual Dimmer device in Hubitat and name appropraitely (eg "Virtual Bathroom Sonos")
- Add virtual device to Other Hub as dimmable light.
- In ST, ensure device now appears in Thing list and then install HubiThings smartApp in ST.
- Configure the HubiThings app with the Other Hub Virtual Device and Sonos Speaker you would like to control.
- Set volume adjustment +- value. (increase/lowers volume by this percent)
- In Hubitat use a button controller app (ABC recommended) to configure Pico so set the dimmer values according to the table below.
Sonos Commands based on dimmer val:
Level 11 - play/pause
Level 21 - increase volume by 5
Level 41 - decrease volume by 5
Level 51 - next track
My Bathroom Sonos ABC config: