Hi, first I’d like to say thanks for the incredible work of this community. I’m a newbie at home automation but it’s a lot of fun to integrate the Nest thermostat and Sonos. I’ve already gotten the sound to play through VLC on the PC.
So, I can’t seem to get TTS to work for Sonos. I have a pair of Play:1s.
From the device widget, I tried the “Player” tab, then entering some strings in the “Text To Speech” box. When I check the veralite’s /www directory, I don’t see a say.x.mp3. BTW, is X a variable (i.e. the play:X number) or it just represents the string to say?
Then I tried it via a scene, using the following code, and no sound.
I had some problems as well initially with the Sonos. My main issue was the ip address of the Sonos - I made it static and made sure that the ip address was reflected in the advanced tab of the device in Vera. The TTS should work in the player tab of the device - make sure to put in a volume level too for the test. I followed the wiki for the MP3 file so it’s in the directory /etc/cmh-ludl/.
The silence file has to go in one of the two directories.
In the action, specifying the volume is not required. If not, the message will be said at the current volume.
x is the device number, meaning 16 in your case.
Remember that pairing of Sonos devices is not correctly handled by the plugin. This work is in progress but really not easy to reverse-engineered without nothing to test.
TTS is working with Play:1, it was mentioned by at least one user in the forum.
It would be interesting if @ww73 could confirm that the problem is only relative to the pair, I mean that it is working for him when a Play:1 is stand alone.
[quote=“ww73, post:6, topic:178803”]Thanks guys. I can play the music through a set of Play:1s.
The biggest mystery I think is why the say.x.mp3 file is not getting written to /www.
I even tried copying a mp3 over, naming it say.x.mp3. Whether x = [ x, 1, 3, 5], it doesn’t get played.
I also tried reinstalling a new device. So far TTS is still not working.[/quote]
The file is written, then played, and finally deleted. Maybe that’s why you don’t see it.
You have to check that you have not secured the local access of the Vera. I don’t know exactly what is the result in this case but several users said that TTS is not working in this case. That could make sense if this Vera setting is protecting the Vera WEB access.
Copying a MP3 file in /www and testing it is a good idea if the problem is not relative to the production of the file in /www. For a file named “toto.mp3”, you will have to test with URI “x-rincon-mp3radio:toto.mp3”.
Got it to work. So I have a pair of Play:1s, one at 10.0.1.3 and another at 10.0.1.4. In the Sonos Plugin Settings tab, I have 10.0.1.3 selected.
I found this blog
which led me to the Device Spy
While looking at the AVTransport.GetTransportInfo, I noticed that when the music was paused, the GetTransportInfo on 10.0.1.3 said playing while on 10.0.1.4 said paused.
So I wondered if 10.0.1.4 was the “master” of the pair. Once I switched the Settings tab to 10.0.1.4, TTS worked from the Player tab as well as from luup code within a scene.
This is really cool because now my house can talk to me and opens up all kinds of possibilities.
If anyone else gets tripped by this issue, hopefully this will help.