What do you mean by "but the audio isn't on and certainly isn't above the 23% threshold"?
Is the source muted or is the audio source just currently part of the active scene?
In either of those cases the volume threshold is still checked.
If you don't want to check the volume of an audio source while it is not currently active you can use the checkbox to the right of each audio tab entry to specify that.
Could that explain the observed behavior?
So the laptop has an external audio box connected by USB . This box is fed from the sound system in the building. The sound system is normally powered off. This means there is absolutely no audio on this 'Onyx-Main' device until the audio system is powered on (which is when we want to swich to the camera).
From my exported 'settings' file (also attached) I see the option "ignoreInactiveSource": true for this audio device/trigger, which means that the volume of this device isn't checked when the audio isn't active - although what does 'active' mean in this context? How and when does the audio become 'active' (or inactive)?
I'm attaching the log from yesterday's session (zipped) along with the exported settings.
The external audio system was switched on at 11:52 which is when Audio1 1st matches (=PTZ-New scene) and it is turned off at 12:30.
The adv-ss is started at 09:30
1hr later (3600s) we see the "non_matching_scene" (=24Hr+AllMasses) triggering (although the log entry doesn't confirm which trigger or scene this was!):
09:38:26.453: [adv-ss] try to sleep for 470
10:30:31.744: Last log entry repeated for 6241 more lines
10:30:31.894: [adv-ss] switched scene
10:30:31.894: [adv-ss] try to sleep for 322
10:30:32.227: [adv-ss] cooldown active - ignoring match
10:30:32.227: [adv-ss] try to sleep for 490
10:30:32.726: [adv-ss] cooldown active - ignoring match
-> but what match is it ignoring (every 500ms)?
The 'cooldown active - ignoring match' message is then repeated continuously for 1h22m until we see the 1st Audio trigger match (when the external audio is switched on):
11:52:32.319: [adv-ss] cooldown active - ignoring match
11:52:32.320: [adv-ss] try to sleep for 492
11:52:32.818: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
11:52:32.818: [adv-ss] cooldown active - ignoring match
(Note it still seems to be ignoring some other match???)
Then a minute later we have 'audio-fallback' kicking in - which indicates that both audio triggers matched - and indeed my 2nd audio trigger (PTZ-Welcome) currently has a 60sec delay so this explains that behaviour:
11:53:39.904: [adv-ss] try to sleep for 487
11:53:40.403: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
11:53:40.403: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
11:53:40.403: [adv-ss] cooldown active - ignoring match
11:53:40.403: [adv-ss] try to sleep for 489
-> however this 'audio_fallback' situation then continues every 500ms (my check interval) for the next 25mins. This suggests that both audio sources continually match - I would have thought that the Audio2 match time (60s) would be 'reset' after a match/scene switch (in this case the Audio1 match + the audio_fallback aspect) so that Audio2 should re-start counting its 60s again only after this match???
In fact to me the Audio2 trigger timer should be reset whenenver Audio1 matches - so that my Audio2 trigger can only kick in after a 60sec period of nothing triggering audio1 (i.e. nothing above the volume threshold I have set for Audio1 for a continuous 60secs) - if this isn't the current behaviour what would be the problem in making it behave like this? Would it break some other logic?
Now during this 25mins section I also see "cooldown active - ignoring match" which is also continually every 500ms. Surely since the cooldown is set to 5s there should be a 5sec gap before new checks are done??? Otherwise what is this cooldown doing? What is going on during this cooldown period? Are counters/timers for the audio checks still going on or are they 'held' for the cooldown duration?
At the end, the external audio is switched off at 12:25 and we then just (only) see the 'try to sleep' messages for the next 5mins followed by:
12:25:55.163: [adv-ss] try to sleep for 485
12:30:41.016: Last log entry repeated for 570 more lines
12:30:41.017: [adv-ss] match for 'sequence' - switch to scene '24Hr+AllMasses'
12:30:41.212: [adv-ss] switched scene
12:30:41.212: [adv-ss] try to sleep for 283
-> which is as expected as 'sceneRoundTrip' is set to swtich from PTZ-New to "24Hr+AllMasses" after 300s (5mins)
Then we see 'try to sleep' for the next 60mins after which we start seeing the 'cooldown active' messages again!
These messages continue for the remainder of the log:
12:30:56.025: [adv-ss] try to sleep for 489
13:30:46.433: Last log entry repeated for 7171 more lines
13:30:46.433: [adv-ss] cooldown active - ignoring match
13:30:46.433: [adv-ss] try to sleep for 488
-> So what is happening here? Why do set start seeing the 'cooldown active' messages again?
The only thing I know of that is set for 1hr is the "non_matching_scene" trigger - and since the scene was already on the '24Hr+AllMasses' scene there would have been no actual scene switch required. Does this explain the 'cooldown active' messages somehow?
I can also see 2 brief matches/switches for the Audio2 trigger (PTZ-Welcome scene). Presumably it went quiet here - below the 23% threshold for Audio1 - so that the Audio2 was able to match. But it then immediately goes back to PTZ-New as Audio1 then does match.
So if Audio1 matched at 12:11:08 and again 1sec later at 12:11:09 how did Audio2 get in inbetween these matches when a) Audio2 has a 60sec timer and b) the 'cooldown' timer is set to 5secs?!?!
12:11:08.639: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
12:11:08.639: [adv-ss] cooldown active - ignoring match
12:11:08.639: [adv-ss] try to sleep for 489
12:11:09.138: [adv-ss] match for 'audio' - switch to scene 'PTZ+Welcome'
12:11:09.143: [adv-ss] switched scene
12:11:09.143: [adv-ss] try to sleep for 486
12:11:09.643: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
12:14:57.415: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
12:14:57.415: [adv-ss] match for 'audio_fallback' - switch to scene 'PTZ-New'
12:14:57.415: [adv-ss] cooldown active - ignoring match
12:14:57.415: [adv-ss] try to sleep for 495
12:14:57.916: [adv-ss] match for 'audio' - switch to scene 'PTZ+Welcome'
12:14:57.916: [adv-ss] cooldown active - ignoring match
12:14:57.916: [adv-ss] try to sleep for 495
12:14:58.416: [adv-ss] match for 'audio' - switch to scene 'PTZ-New'
Please could you explain what is happening above as I want to know how to control Audio1 and Audio2 better.
Ultimately I want the Audio2 trigger (PTZ-Welcome) to only kick in when the audio is on but there is only background noise. Once people start talking into the microphones I want Audio1 (PTZ-New) to override Audio2 and keep the 'PTZ-New' scene active (and to NOT go back to PTZ-Welcome when the audio drops below the threshold only for short time). I think it should be possible to adjust the volume levels/timers to achieve this but so far I have too many unexplained behaviours to be able to work this out.
Thanks.