In our latest blog post we showed you how to make your Sonos device talk to you. Can you do better? Then show us here.
In my project I'm trying to continue playing the radio station played using TuneIn. But the Python script starts playing the Sonos queue. Is there a way to find out what radio station is playing and then continue playing that station?
I've found some info at https://groups.google.com/forum/#!topic/python-soco/1RAz1yQPPZ8 but I'm afraid my lack of programming knowledge limits my ability to combine the two.
Hi @knarfje, is there a chance to see your project, either as a screenshot or a link to a published project? And btw., Conrad Connect provides an actuator that lets you play the radio stations you've picked as a favorite within the Sonos app. See my project here.
Hi Cristian, thank you for your response. Unfortunately I've no project yet but here is what I'm trying to achieve.
When I'm arriving I want Sonos to say something like "Frank is almost home" and then continue with playing music or whatever is playing. When I try out the script it works but when a radio station (via TuneIn) is playing it continues with the last playlist (queue) that was playing and not the radio station.
Hi @knarfje, let's forget about scripts for the moment. What you want can be achieved within the project editor. Here's how you should do it:
The action button on the left is sort of a place holder which you would replace by either a motion or a door sensor. Geofencing is also an option (if so, please let me know). Then, you first set the volume of your Sonos. The next string triggers a time delay (app. 2 sec) and then uses the Text-to-Speech. The third strings applies another time delay (depending on the lengths of your Text-To-Speech message) and then triggers the Sonos-Play-Favourite actuator, which will turn on the desired radio station.
How can I add the delaySensor? I can't find it anywhere.
And how could I implement Geofencing. Maybe with IFTTT?
Hi @knarfje, the Delay sensor (in German Verzögerung) is nested under the Weather and Time sensors. For geofencing, you would have to use IFTTT, right. We have a pretty detailed project description here in German language. In this rather lenghty tutorial, we did not use the original IFTTT location trigger. You might give it a try: Create a new applet as such: IF location is reached THEN trigger webhook with a pre-defined event name. This webhook then triggers your Conrad Connect project. However, if you want a project to be running right in the second you open the door, geofencing is not accurate enough. You would need a door or motion sensor.
I've found it... thx
But now the really difficult part (i think). What i want is that after the announcement has been made on the Sonos system that the sound returns to the original source. So when the TV is on, after the announcement, it will return to the TV sound. Or when the radio is playing it will return the same radio (TuneIn) station.
So i need to find out what is playing, remember it and continue after the announcement
Hi @knarfje, isn't the Play_Pause actuator doing exactely this? That is, resume playing from the last source?
Yes the Play_Pause actuator does that but unfortunatly the last 'track' is the announcement so it will continue with that.
Well, that's a tricky one.