Sonos

I am waiting on Sonos, Harmony, and MyQ integrations, but this is the big one!!! Canā€™t wait to get my voice notifications working again! Good job guys!

1 Like

Iā€™m waiting on Google Assistant/Home integration. I have tablets/phones and a shield tv all with google assistant already.

Why not use IFTTT to tie Google Assistant / Home to Hubitat in the mean time?

Like stephack said, as soon as I start messing with workarounds, you guys seem to fix or release what Iā€™m working around, so ā€¦ Iā€™m okay with waiting.

1 Like

@mike.maxwell
Mike, looking at thisā€¦
Does the command ā€˜playTextā€™ do TTS?

Andy

TTS on our end is not implemented, it is currently being worked on as a global hub feature, and once completed will be added to this driver.
Currently this integration supports all the transport, and level commands as well as playtrack and set track. I have not worked out using playtrack to use a play list yet.
We are subscribing to upnp device events, so changes initiated in the sonos app are reflected in the driver.

Once we rollout TTS, Iā€™ll update this driver with playTrackAndResume, and playTextAndResume

:pensive:, I guess I'll resume working on my driver then. It supports TTS somewhat at least but doesn't instantly report updates made from the app (and it makes use of my RPi that was feeling a bit neglected these days). I'll probably use a combination of both drivers till you guys add all the functionality needed to make it a complete driver. Still looking forward to this release though.

1 Like

@mike.maxwell
So if I wanted to play a single mp3 on a webserver, can I use the following command?

speaker.playTrack(uri, duration, volume)

I want to use this for announcements in the home and already have the mp3s hosted on a lan Web server, just waiting for this integration.

Andy

Iā€™ve just fallen at the first hurdle.
Put in command npm install --production on my RPi and got a load of error messages.

pi@raspberrypi:~ $ npm install --production
npm ERR! install Couldnā€™t read dependencies
npm ERR! package.json ENOENT, open ā€˜/home/pi/package.jsonā€™
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm canā€™t find a package.json file in your current directory.

npm ERR! System Linux 4.9.35-v7+
npm ERR! command ā€œ/usr/bin/nodejsā€ ā€œ/usr/bin/npmā€ ā€œinstallā€ ā€œā€“productionā€
npm ERR! cwd /home/pi
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /home/pi/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/npm-debug.log
npm ERR! not ok code 0

Tried to find file package.json and it doesnā€™t exist.

The play track method only accepts one parameter uri, but yes this shoud work.
The easiest way to figure out the uri is to copy it from the trackUri item in the state variable after playing something from the sonos app...
After seeing the uri prefix that sonos uses, it's straightforward to then build custom uris

@mike.maxwell
Thanks Mike
I did think that the standard http://server/file.mp3 would work as the uri so Iā€™m grateful for the info.
Would this be the preferred method or is there an alternative?

Andy

I would attempt to help but my linux skills are next to none and I would probably cause you more problems.

Do you have node installed? I know itā€™s required for this api to work. I already had this installed from previous setups on my Pi from a while back. Unfortunately I donā€™t remember the right way setup node.

That will not work without a sonos style prefix (already tried it with a few radio urls),
Radio prefix: x-rincon-mp3radio://
Another: aac://
You'll see shortly

1 Like

Any luck @bobbles?

Sorry I didnā€™t respond.
Not yet. Googled how to install node.js and have done that.
Watching football so gave up. (Or is that soccer. Depends where your from. :smile:)
Will perhaps have another look tomorrow.

Sonos is now available in latest update .709

3 Likes

Yipeeeeeeeeeeeeee!

Downloading now

1 Like

@mike.maxwell
Mike did you change something with the sonos implimentation?
Http call to mp3 DOES work

Found by accident as an already configured app triggered.

Andy

1 Like

no, turns out it works just fine for mp3ā€™s

1 Like

Sure Doesā€¦
Iā€™ll post a little app for it in about 10 mins :slight_smile:

Andy

1 Like