I simplified the scene switch for now to leave only one audio trigger.
However this week it switched away to the 24Hr scene even though there was audio present:
12:26:39.488: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
12:26:39.488: [adv-ss] try to sleep for 500
12:26:39.990: [adv-ss] try to sleep for 499
12:26:40.492: [adv-ss] try to sleep for 497
12:26:40.991: [adv-ss] try to sleep for 498
12:26:41.493: [adv-ss] try to sleep for 497
12:26:41.992: [adv-ss] try to sleep for 498
12:26:42.490: [adv-ss] match for 'sequence' - switch to scene '24Hr+AllMasses'
12:26:42.499: [adv-ss] switched scene
12:26:42.499: [adv-ss] try to sleep for 492
-> Why did it switch to 24Hr at 12:26:42 if it matched audio just before at 12:26:39?
Sequence is set for 5mins after PTZ-New but is interruptible (settings and log attached)
As far as I can see the scene was never changed away from 'PTZ-New' for a long time.
Meaning the start scene 'PTZ-New' was active for the necessary amount of time to trigger the scene sequence.
In fact the scene was active for quite a bit longer, but with your current setup the sequence check only get a chance to run when audio did not match anything, as the audio checks a higher priority than the sequence checks.
(Internally the sequence check counts how many times it was called with the while the start scene was active - I think I will change this behavior to instead measure the time that has passed, but this will not change anything for your use case, besides triggering your undesired behaviour earlier)
Am I understanding correctly, that what you are trying to achieve is?
1. If audio output is "active" -> switch to scene A
2. If audio output is
not "active"
and the current scene is A and is active for X amount of time -> wait for Y amount of time and switch to scene B.
Or is it more complicated?
Also I have see it apparently detect audio and hence switch to 'PTZ-New' when the (external) audio wasn't on.
There is no signal on this audio input at this time. Is there any explanation to this?
Log shows:
07:15:37.646: [adv-ss] try to sleep for 496
07:18:08.830: Last log entry repeated for 301 more lines
07:18:08.831: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
07:18:08.996: [adv-ss] switched scene
07:18:08.997: [adv-ss] try to sleep for 333
(Audio isn't switched on until 8:15 or so)
Log file attached (settings file same as previous post)
Unfortunately I cannot tell you why this happened.
I just read out the "peak" value for the selected audio source.
Maybe the audio source emits some tiny amount of noise that happened to be surpassing the very low threshold you have set?