Keep light on in 10 min. - 20 min. if Sonos One is playing


#1

1) Give a description of the problem
Lights turns off after 10 minutes! I found this piston and i’m trying to edit it, so when my lights is on and sonos one is playing, lights should turn off aften 20 min, instead of 10 minutes. 10 minutes is only when Sonos One is not playing

2) What is the expected behaviour?
When motion is active on sensor, and Sonos One is playing, light should be on for 20 min.

3) What is happening/not happening?
Lights turns off after 10 minutes

4) Post a Green Snapshot of the piston![image|45x37]

)

Unknown device 6 = Sonos One


#2

The piston logic is a bit confused.

The if at line 34 is true when motion changes to inactive and the variable is true and that triggers a ten minute timer.

The if at line 46 is only reached when the if just mentioned has returned false. However the first two conditions on each if are the same. So it is impossible for it to return true.


#3

Hello,

I am about to embark on some completely unnecessary automation (because it’s fun) and there are parts of this that I think I can leverage. I just had a couple follow up questions about your experience with this piston before I go further.

I have multiple nanoleafs through the house. When certain SONOS’s are playing, I want webcore to change the effect to a sound driven effect on the nanoleafs.

I see you used “if playback status is playing”. One can assume if you made it this far, that comparison must be somewhat reliable. What kind of response times do you get?

Like if i were to press play on SONOS, how fast is webcore to recongnize and send whatever subsequent commands? Instantly? Couple seconds? Couple minutes?

Secondarily, not sure if you have specific experience with this scenario, but what if it’s generally two rooms of SONOS that are grouped? Should I base the piston on the playback status of both? Or will that kill the automations by making it too specific?

I’m just looking for some best practices before I dive in. I’ve had SONOS for a long time but never really automated it for triggers so I’m not sure if there are ‘better’ triggers to use in webcore for sonos rather than others.