Step by step guide: Sonos integration

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

iTDB
Posts: 29
Joined: Friday 29 November 2019 18:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Gent
Contact:

Re: Step by step guide: Sonos integration

Post by iTDB »

rensbr wrote: Wednesday 28 August 2019 22:41 Thank you for all the work! It works like a charm.

I did however changed the dz script from anfelt, so now the played numbers / radio station are displayed in a seperate device. I also updated the icons from dhanjel, so now they don't have white borders anymore.

The script can be found at Github.

I had some problems with the auto-start of pm2, so I followed the steps from junr and that works like a charm. Of course you need pm2 in order for this to work, you can install that the help of this post. And pm2 do also need autostart, you can set that up with.

Sonos.zip
Github > Works for me.
For myself I added the following.

Code: Select all

--How to use: URL change Room - domoticz.devices(Idx) - Make dzVents

...
        currentvolume = jsonStatus['volume']
....
And during playback
 .. "\nVolume: " .. currentvolume
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Step by step guide: Sonos integration

Post by Derik »

Ho tot all..
Is this setup still working? Also for the ikea sonof systems?
Or is sonos now hardcored in to domoticz?
Or are there perhaps other options in to domoticz?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
DickNi
Posts: 4
Joined: Thursday 09 July 2020 15:28
Target OS: -
Domoticz version:
Contact:

Re: Step by step guide: Sonos integration

Post by DickNi »

Hi to all
How can I swicth to or select television
User avatar
RonkA
Posts: 100
Joined: Tuesday 14 June 2022 12:57
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Harlingen
Contact:

Re: Step by step guide: Sonos integration

Post by RonkA »

Can someone tell me how to get this to work on a Synology Nas running Domoticz from a Dockercontainer?
On the nas Node.js v12 is running but dont know what steps to take.
I have downloaded 'node-sonos-http-api' and changed the presets file example.json to my setup:

Code: Select all

{
  "players": [
    {
      "roomName": "Keuken Los",
      "volume": 10
    },
    {
      "roomName": "Keuken Stereo Paar (L)",
      "volume": 10
    },
    {
      "roomName": "Keuken Stereo Paar (R)",
      "volume": 10
    },
    {
      "roomName": "Woonkamer",
      "volume": 10
    },
  ],
  "playMode": {
    "shuffle": true,
    "repeat": "all",
    "crossfade": false
  },
  "pauseOthers": false,

}

I now copyed the 'node-sonos-http-api' folder into \\Nas-1\docker\domoticz\plugins\ and now via Docker using bash terminal looking at

Code: Select all

root@domoticz-domoticz:/opt/domoticz/userdata/userdata/plugins# dir                                       
Domoticz-Home-Connect-Plugin-master  domoticz-solaredge-modbustcp-plugin-master                           
Python-3.9.16.tar                    node-sonos-http-api
i now see the 'node-sonos-http-api' folder within the plugins directory..

but from here i'm stuck at the the 'npm' part.
josimd wrote: Friday 21 September 2018 18:42 I have it running on my synology NAS, instead of PM2 you can run node server.js via another way, see link below.

https://www.youtube.com/watch?v=tkbu3TT5LT8
This tells me it is possible to get it to work on a Synology Nas but leaves me with no solution.

Please someone Help!!
SolarEdge ModbusTCP - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
User avatar
Dutchsea
Posts: 120
Joined: Tuesday 08 December 2015 13:22
Target OS: Raspberry Pi / ODroid
Domoticz version: v2023.2
Location: The Netherlands
Contact:

Re: Step by step guide: Sonos integration

Post by Dutchsea »

Why not follow the same steps as described by Holland? Can’t you use pm2 on the Synology? I installed Sonos http a few weeks ago on a new pi 3B and it works fine.
Raspberry PI 3B on USB drive, Debian version: 12 (bookworm), Domoticz 2024.7
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
User avatar
RonkA
Posts: 100
Joined: Tuesday 14 June 2022 12:57
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Harlingen
Contact:

Re: Step by step guide: Sonos integration

Post by RonkA »

Hi,
thanks for a reply, I stated my question because of this post from Holland:
Holland wrote: Sunday 16 September 2018 21:00
josimd wrote: Sunday 16 September 2018 19:29 yes that did the trick! its working now in Domoticz. Do you also how to run the api continuously, now, when I close the terminal de pipe is broken. Is there an option within synology which I can use?
The solution is PM2, but I have it running on a RPi. See also the first post in this threat.

Don't know if PM2 can run on a synology.
I asked the specific question about a Synology setup, and to be precise a Docker run Domoticz on a Synology.
For Rpi there is an abundance of howto's and wiki's over many items; for Docker not so much.. so thats the cry for help at the end of my post because the video about node.js isnt helpfull to me at all..
SolarEdge ModbusTCP - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest