I’ve created a SmartApp which will start video recording when there is motion/contact opens, etc. When an event happens it will turn on recording, then wait for a specified amount of time (or a specific amount of time after motion stops for a motion detector) and then it sends the command to stop recording.
Now here’s my issue; In a scenario where a contact opens and starts recording for 30 seconds and then motion starts 15 seconds later the camera will get the ‘on’ command twice, no big deal. But then when the initial delay hits at 30 seconds it will turn off the video recording even though there is still motion. How do I link it all together so that the video doesn’t stop until ALL devices go ‘quiet’ again?