Page 1 of 1

Trigger that runs once each morning

PostPosted: Thu Sep 28, 2017 2:13 pm
by Colly
I'm looking for a temporary work around. I have a morning trigger that starts when my motion sensor activates at the bottom of the stairs between 6:30 @ 8:30. This turns on lights and also my Kitchen Sonos. The problem I have is that due to the Sonos plugin regularly not displaying the correct status - sometimes it shows stopped when it is actually playing (the plugin needs a restart to catch up) I end up getting a restart of the Sonos Play One, this causes the radio to be interrupted momentarily everytime the sensor is triggered. Until the Sonos plugin is updated I would like to only run this trigger once in the morning and then deactivate until the next morning to avoid the Sonos being interrupted. What is the easiest way to do this? At the moment I can't rely on the playing status of the Sonos to trigger a separate action. My thoughts were I'd have a variable that gets changed to True on first trigger each day and then gets reset at a later time. This variable would then be a condition for any subsequent triggers. Is that a good approach? Is there a more straightforward way?

Re: Trigger that runs once each morning

PostPosted: Thu Sep 28, 2017 3:24 pm
by jay (support)
Make one of the actions on the trigger to disable the trigger. Then create a schedule that enables it sometime before 6:30am.

Re: Trigger that runs once each morning

PostPosted: Thu Sep 28, 2017 3:33 pm
by Colly
I knew there had to be an easier way. Instead of creating a schedule to re-enable it I can auto-enable after a set time so I've set it to 3 hours which means it will always be enabled after the trigger time has elapsed. Thanks Jay.

Re: Trigger that runs once each morning

PostPosted: Thu Sep 28, 2017 5:36 pm
by Londonmark
I also have the status problem with Sonos. I now restart the plugin every hour and also check every few minutes that the song currently playing is different to the one that was playing ten minutes earlier. If it’s the same the plugin restarts. I’m hoping Nick can resolve the issue with the Sonos plugin so none of this is needed.