Hi All
I’ve been playing with Habpanel widgets to create a Dashboard for Sonos. Attached are 3 widgets which link to my Sonos system of 7 rooms. All are extensively reworked from other people’s versions for similar things and I’m no expert at coding so I’m quite sure they can be improved on!
There are three widgets: SonosControlWithArt shows AlbumArt and does player controls and volume SonosControlWithArt.widget.json (10.1 KB)
SonosAlbumSelect shows 8 slots which link to Sonos favourite playlists (or stations etc) with a link to png for Album cover SonosAlbumSelect.widget.json (7.0 KB)
SonosSystemVolume groups different speakers (I use the one called SN_DiningRoom as a master) and controls the volume. The top right master one runs buttons called Chill and Loud which run rules which set all speakers to a pre-determined volume for background music and party mode. This one is a bit more complicated and I can post more detailed instructions if helpful to people! SonosSystemVolume.widget.json (18.3 KB)
Hopefully of use to someone - improvements and code tips helpful as learnt from scratch through copying and guesswork!!
Could you please explain how to start Sonos favourite playlists or stations.
Last time I got trouble by playing my favorite tunein radio stations. So I decided to switch to radio.net.
There are no problems using them via sonos app, but for me it is absolutely impossible to start them via openhab.
Note that the playlist must be set up as a Sonos favourite (this confused me for ages). The favourite can be anything - a radio station, playlist etc. As long as the word match.
Thanks for trying this! Bit of a guess but it looks like the widget isn’t big enough - on mine it covers a whole page. Click edit and make the widget taller and wider.
Tried to set it up ,but strungling a bit since i am very new to Openhab.
So have a few questions.
1.Which widget needs to be used ,i cant seem to find where multible buttons can be configured. ?
2. Dont have a /etc/openhab2/html/sonos folder ,Do i need to create it ? what should file be called.
I am by the way talking only about the SonosControlWithArt
Hi @BDE happy to help - there may well be issues with it as a long way from being an expert myself!
To Q1 - I’m not quite sure I understand what you mean - what have you done so far? Have you got as far as installing the custom widget?
To Q2 - The sonos folder you will need to create within the html folder. The rest of the path should already be created as part of your standard openhab installation.
Thank you for offering ,i really need it since i am only a few weeks into Openhab in general.
Well after i posted i played some more with it to gain some more understanding which made understand that my questions were uselees since i seem to have misunderstanded what needed to be done totally.
this unfortunately set me back several steps,so i need to start entirely from start.
I guees i need
Setup Sonos in things, sitemap and item file (paper UI is not enough i guess ?)
Then import the custom widget made ,and fill in items data in below .
am i on the right path now ?
"type": "item",
"id": "media_art",
"label": "Image Art",
"description": "Artwork for video or album covers for music can be shown here and will make up the background image of the widget.",
"default": "SN_DiningRoom_currentalbumart"