# \[Sonos\] just forgets it's playing

**URL:** <https://community.homey.app/t/sonos-just-forgets-its-playing/44878>\
**Category:** Apps\
**Created:** [March 18, 2021, 7:38pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878 "2021-03-18T19:38:20Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [March 18, 2021, 7:38pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/1 "2021-03-18T19:38:20Z")

</div>

I’m running homey version 5.0.2 and 6.0.9 of the Sonos app. I believe those are the latest.

I have created a virtual radio device based on the virtual devices app. I’m turning this on based on motion in my living. It sends a Sonos favorite (TuneIn Radio) to the Sonos Beam connected to the TV. This works great.

I have added some exceptions in the ‘and’ column. I don’t want the radio turning on when the TV is turned on or when something else is playing on the Beam, like for example Spotify. Again, this works. To be clear, I only want the virtual radio turning on when nothing else is happening on my beam or TV.

For the flow please see: [Gedeelde Flow | Homey](https://homey.app/nl-nl/flow/Ct8Q6x/)

Now as I mentioned, it works and works well, but after a while, and I cant really tell you guys the time frame, sometimes after half an hour, sometimes after an hour it just forgets something is playing.  
My wife puts on her spotify playlist during cleaning and complains about it. After investigating the card ‘sonos is not playing’ just doesn’t work anymore.

So when testing I’m playing spotify on the beam. Directly after putting on the play list I run the test button with the mentioned flow. Then it doesn’t execute the flow because of the ‘is not playing’ sonos card.  
After let’s say half an hour I repeat my steps, but even though it is still playing from the spotify list, it executes the flow because it just ignores the ‘is not playing’.

Anyone else experiences the same behavior?

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [March 18, 2021, 8:14pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/2 "2021-03-18T20:14:43Z")

</div>

As i remember i had the same experience. I was not able to get the flow working correctly because the app forgets when sonos is playing or not. I solved it by adding a smart plug on my playbar. With a flow it tests if my playbar is on or off.

After i deleted the Sonos app and started using the Sonos api on my server I didn’t check if the status playing on or off works better as with the Sonos app. But the Sonos api works far better as the Sonos app for me…

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [March 18, 2021, 8:16pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/3 "2021-03-18T20:16:43Z")

</div>

Right, that’s a good option too. Which api command do you use to check if it is playing or not?

That probably would be [http://IP:5005/woonkamer/state](http://IP:5005/woonkamer/state)

That shows:

`{"volume":12,"mute":false,"equalizer":{"bass":0,"treble":0,"loudness":true,"speechEnhancement":false,"nightMode":false},"currentTrack":{"artist":"Rolf Sanchez","title":"Ven Ven","album":"Ven Ven","albumArtUri":"https://i.scdn.co/image/ab67616d0000b2731c3d8892f6977a48ba44fe13","duration":151,"uri":"x-sonos-spotify:spotify:track:4RhyJbkk0pEKMmrq8fqZUN?sid=9&flags=0&sn=1","trackUri":"x-sonos-spotify:spotify:track:4RhyJbkk0pEKMmrq8fqZUN?sid=9&flags=0&sn=1","type":"track","stationName":"","absoluteAlbumArtUri":"https://i.scdn.co/image/ab67616d0000b2731c3d8892f6977a48ba44fe13"},"nextTrack":{"artist":"Artistic Raw","title":"Komen & Gaan","album":"Komen & Gaan","duration":0},"trackNo":1,"elapsedTime":83,"elapsedTimeFormatted":"00:01:23","playbackState":"PLAYING","playMode":{"repeat":"none","shuffle":true,"crossfade":false},"sub":{"gain":3,"crossover":0,"polarity":1,"enabled":true}}`

`"playbackState":"PLAYING"`

How do I extract this? I’d assume http get flow card, but how to only check for playbackstate?

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [March 18, 2021, 8:20pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/4 "2021-03-18T20:20:52Z")

</div>

Yourlocalip:5005/woonkamer/state  
And ofcourse in your case use playbackstate

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/a/5ab4d35725f4ad99397657522d8834a91dacb376.jpeg)

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [March 18, 2021, 8:31pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/5 "2021-03-18T20:31:50Z")

</div>

I don’t have that with the ‘and’ column:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/0/a04cc1be4069a5848dc4e3c6bf2c9b5ba3fbc8db.jpeg)

What do I have to enter? You have three fields, this one has more.

these are the options on the ‘and’ field:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/a/0a1344a334b7d7f712973b4ef1f50614efe208a3.png)

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [March 18, 2021, 8:35pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/6 "2021-03-18T20:35:44Z")

</div>

I use it at the then part and store it into a better Logic variable. After that you can use it for your AND part

You have to check if this works ok, because i still use the smartplug which does the trick perfect for me, and as bonus a repeater on that position.

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [March 18, 2021, 8:41pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/7 "2021-03-18T20:41:02Z")

</div>

The thing is , I want to check fi the player is playing at that moment. Have to think about it a little bit more I guess.

I’m aleady using a powerplug. And that works really well for my TV but not for the beam. I have my beam plugged in together with a sub and two Play:1 speakers. (the wii and ps5 are on there too) and in standby with not playing anything they consume 42 watt. With spotify turned on it consumes 43. I think this is too small a margin.

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [March 18, 2021, 8:44pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/8 "2021-03-18T20:44:16Z")

</div>

I only have a plug for the playbar. It works with less then 7Watt(= off) and \> 8 Watt= on. I also have the sub, two Play3 and one Play1 in the same group. But the Playbar is leading in the group. So therefore a plug for the playbar

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [March 18, 2021, 8:47pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/9 "2021-03-18T20:47:08Z")

</div>

Maybe that’s an option if I cannot get this working. Thanks a lot for your help!

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [March 18, 2021, 8:47pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/10 "2021-03-18T20:47:45Z")

</div>

👍

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [March 19, 2021, 5:43am UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/11 "2021-03-19T05:43:30Z")

</div>

If u wanna check if the speaker is playing:

 ![chrome_2021-03-18_22-12-00](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/b/2b1c7f1405bd4a025164df8ba0f5654681453045.png)

If u wanna check if the speaker is NOT playing:  
Invert the card. 😉

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 19, 2021, 7:53am UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/12 "2021-03-19T07:53:52Z")

</div>

Did you tried the logic card with „is playing“ / „is not playing“ in the „And…“ section instead of the build in feature of the Sonos App?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/4/847b1e19ffe474ba01ed8ecacb618d1978693efb.jpeg)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/5/3596aed95e8da96b0825554d0cf0b1f7c5df10a6.jpeg)

Maybe you can make a small flow which is checking the state of the „is/is not playing tag“. If the tag changes from „is“ to „is not“, or the other way“, let inform you via voice, timeline, push notification.

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [March 19, 2021, 9:16am UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/13 "2021-03-19T09:16:50Z")

</div>

If these tags originate from the sonos app i’d guess they would have the same issue. I now have @Rocodamelshekima solution running. I’m gonna test for a while with this to see if it is actually the sonos app or maybe the speakers reporting something else.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 21, 2021, 2:21pm UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/14 "2021-03-21T14:21:31Z")

</div>

Yes, it´s the same. The logic card with the tag is also buggy. I contacted Athom.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 26, 2021, 8:52am UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/16 "2021-03-26T08:52:21Z")

</div>

@Martijn_Hoogenbosch, Athoms answer: The bug is known and will be fixed in the next release.

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [March 26, 2021, 8:54am UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/17 "2021-03-26T08:54:25Z")

</div>

Oh great! The http query to my http-api works great too, but solving it with a native app is great!

I assume they mean with a next release of the Sonos app, right?

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 26, 2021, 8:58am UTC](https://community.homey.app/t/sonos-just-forgets-its-playing/44878/18 "2021-03-26T08:58:35Z")

</div>

Yes, release of the Sonos app. But I have to correct myself a little bit: “they **hope** it will be fixed”.

 ![Bildschirmfoto 2021-03-26 um 09.56.52](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/4/049463150b3c755b66719fe9e224f00703cfea08.png)
