Page 5 of 7
Re: Step by step guide: Sonos integration
Posted: Wednesday 31 May 2017 17:09
by leecollings
Yes, you can select just one speaker. Check out the documentation for the full list of commands you can use:
https://github.com/jishi/node-sonos-http-api
E.g.
/{Room name}/clip/{filename}[/{announce volume}]
/clipall/{filename}[/{announce volume}]
Examples:
/clipall/sample_clip.mp3
/clipall/sample_clip.mp3/80
/Office/clip/sample_clip.mp3
/Office/clip/sample_clip.mp3/30
Re: Step by step guide: Sonos integration
Posted: Tuesday 06 June 2017 19:31
by Heursqem
leecollings wrote:Heursqem wrote:This is what I would love to achieve
#1 - Someone pushes my doorbell
#2 - I capture the current state of my sonos player (medium, song, volume etc) and save this for later
#3 - I play my own sound through the sonos player (ding-dong)
#4 - I go back to to captured/saved state and listen to original music again
Would all of this be possible with this solution?
Hey, you can already do this with the clipall command (if you want to play the announcement through all Sonos devices on your network).
You can handle all of the above by using:
Code: Select all
http://localhost:5005/clipall/name-of-your-mp3.mp3
(store your mp3 file in /static/clips/)
Works awesome, thanks!!!!
Re: Step by step guide: Sonos integration
Posted: Sunday 18 June 2017 12:18
by junr
ironrider wrote:Hi,
i have to start server.js after a Domoticz reset.
Is ist possible to make the server.js running as a service.
Thanx
Sven
Sven,
Go to the api directory
Start de pm2 server
Save the process
The pm2 will save the running process.
It works fine now
Greetz JUNR
Re: Step by step guide: Sonos integration
Posted: Friday 15 September 2017 17:40
by RezzZ
Hi guys, I'm trying to get this working for my sonos system and got the api working.
problem now is to create that dummy device and switch:
9. Create a selector switch (create a dummy device and pick selector switch in the list of virtual devices ) according to the below images;
How do I create a dummy device? The device page doesn't allow me to create devices..
I can create new hardware (1-Wire (System)) but it will not create any devices I can use for the selector.
What am I missing?
Re: Step by step guide: Sonos integration
Posted: Sunday 17 September 2017 17:43
by junr
RezzZ
Create a Dummy switch in the hardware tab
Make a virtual sensor with Selector Switch.
in the device tab you select the dummy with
Hope it helps.
Greetz Junr
Re: Step by step guide: Sonos integration
Posted: Monday 18 September 2017 10:30
by RezzZ
thanks Junr! I totally missed the dummy switch as a hardware device but it is really in the list...
thanks again!
Re: Step by step guide: Sonos integration
Posted: Monday 18 September 2017 11:19
by RezzZ
any chance someone has already created a transparant icon set for sonos?
the file from dhanjel (posted 8-6-2016) has white corners, not transparant.
Re: Step by step guide: Sonos integration
Posted: Friday 10 November 2017 21:46
by royson
Hi guys.
Im new here and have tried this great solution, but I have wierd problem.
Im running my domoticz installation with https and the switch sends commands in http. Not sure if this is the problem but it doesnt work. If I send the command directly in the browser with http it works, so the api is active. But if I use the exact same link on a selector in domoticz, nothing happends.
Which log can I start searching in for clues?
Thanks in advance for any help.
Re: Step by step guide: Sonos integration
Posted: Saturday 11 November 2017 9:23
by royson
royson wrote:Hi guys.
Im new here and have tried this great solution, but I have wierd problem.
Im running my domoticz installation with https and the switch sends commands in http. Not sure if this is the problem but it doesnt work. If I send the command directly in the browser with http it works, so the api is active. But if I use the exact same link on a selector in domoticz, nothing happends.
Which log can I start searching in for clues?
Thanks in advance for any help.
Edit:
I figured it out. Nothing to do with the encryption fortunately. Domoticz just wasnt able to convert the space in "dining room". All sorted now =)
Next step is adding TTS.
Sent from my LG-H815 using Tapatalk
Re: Step by step guide: Sonos integration
Posted: Monday 27 November 2017 12:26
by BakSeeDaa
Hi there!
I just had a look at the
node-sonos-http-api. I haven't tried it yet, (still waiting for 2 pcs Sonos One to be delivered) but it looks really nice.
I also had a quick look at the LUA script in the initial post. It seems to be a device triggered script so it will run whenever a device changes in Domoticz. That can happen quite often and will put some burden on the Domoticz server for sure.
Looking a bit closer at
node-sonos-http-api I see that there is support for a web hook. That sounds promising because using that, Domoticz wouldn't have to do polling the API for changes. Instead Domoticz can be "push noticed" whenever there is a status change. It should be much faster and more efficient than polling. One small problem is that Domoticz currently doesn't have a way to trigger a specific script using the API. Therefore to use the web hook functionality we'd need some software to interpret whats coming in and inform Domoticz about it. That wouldn't be so hard to do.
I've started a nodejs project to intercept events from
node-sonos-http-api using web hooks and use them to inform Domoticz. I'll let you know when I have been able to test it in case someone is interested.
Re: Step by step guide: Sonos integration
Posted: Tuesday 02 January 2018 11:18
by MiWa4711
Hi,
I am a beginner started with domoticz 8 weeks ago. Now after all my lights are integrated I am looking for sonos.
Did installation following step by step guide but failed.
Can anyone please help me?
Thanks.
Re: Step by step guide: Sonos integration
Posted: Saturday 06 January 2018 17:22
by MiWa4711
Dear all,
now it runs. Juhu....
Re: Step by step guide: Sonos integration
Posted: Thursday 08 February 2018 19:34
by RedFish
MiWa4711 wrote: ↑Saturday 06 January 2018 17:22
Dear all,
now it runs. Juhu....
How you do it...i've got same problem !!!
EDIT: It's good for me.........It's alive !!!
Re: Step by step guide: Sonos integration
Posted: Friday 14 September 2018 10:49
by AllesVanZelf
Heursqem wrote: ↑Wednesday 31 May 2017 13:22
leecollings wrote:Heursqem wrote:This is what I would love to achieve
#1 - Someone pushes my doorbell
#2 - I capture the current state of my sonos player (medium, song, volume etc) and save this for later
#3 - I play my own sound through the sonos player (ding-dong)
#4 - I go back to to captured/saved state and listen to original music again
Would all of this be possible with this solution?
Hey, you can already do this with the clipall command (if you want to play the announcement through all Sonos devices on your network).
You can handle all of the above by using:
Code: Select all
http://localhost:5005/clipall/name-of-your-mp3.mp3
(store your mp3 file in /static/clips/)
But how could I store the actual state, so I can resume after the clipall command?
leecollings wrote: ↑Wednesday 31 May 2017 14:06
It stores the current state within the command. Try it out and you'll see.
I've tested it, with a Play 1 playing a song, it pauses, plays the mp3 file, and then resumes the previously playing song.
I noticed that this is not always working well. I have two sonos-speakers.
If I send a clipall command to the sonoses, the sounds plays well on both speakers, but afterwards the music does not continue where it was. I think the music starts on the playlist from one of the speakers, not always the right one.
But if I send the command to both speakers separately (two links), it works well.
Just for the record
It might be a coding error?
Re: Step by step guide: Sonos integration
Posted: Saturday 15 September 2018 21:31
by josimd
Gents, installed in on my Synology NAS, and can start / stop my Sonos speakers via the URL in my browser. But is doesn't start with the selector switch in Domoticz when im using the same url... Fout bij verzenden van schakelaar opdracht, controleer apparaat/hardware!
Anyone?
Thanks
Re: Step by step guide: Sonos integration
Posted: Saturday 15 September 2018 23:35
by Holland
@josimd
Should work. Can you share the url that you use to let it start playing
Re: Step by step guide: Sonos integration
Posted: Sunday 16 September 2018 10:13
by josimd
Thanks for reply;
in my browser:
http://192.168.86.136:5005/woonkamer/play
(small think is when I use
http://192.168.86.136:5005/woonkamer/pauze it doesn't stop)
and I use the same in Domoticz;
http://192.168.86.136:5005/woonkamer/play
But then I get the error
Re: Step by step guide: Sonos integration
Posted: Sunday 16 September 2018 12:30
by Holland
The following url should be changed ;
http://192.168.86.136:5005/woonkamer/pauze
to
http://192.168.86.136:5005/woonkamer/pause
What is the version of Domoticz you are running. Because, some time ago there were some issues with the selector switch. But that has been resolved.
Re: Step by step guide: Sonos integration
Posted: Sunday 16 September 2018 13:14
by josimd
I'm running on V4.9700 (synology)
Re: Step by step guide: Sonos integration
Posted: Sunday 16 September 2018 13:30
by Holland
josimd wrote: ↑Sunday 16 September 2018 13:14
I'm running on V4.9700 (synology)
Is new enough.
Can you check again, if your setup similar to the below;