I have been using BI event schedule and custom ptz commands to switch my dahua starlight cams between day/night mode, as well as refocus a few of them. On a normal day it's a great setup; just after civil sunrise day mode goes on, a few seconds later focus is done on the motorized lens cams (since switching day/night sometimes triggers in a bunk autofocus). Same thing except with night mode just before civil sunset.
However I noticed a problem with this "2 command" method to do my required "switch mode then refocus":
If I reboot any camera (power outage or other), when it goes back online BI does not send the 2 required 2 commands for a proper setup. BI only has a setting to send the "previous event", which in my case most of the time is just 'refocus'.
So in the case of last night (in night mode), where power went out for 6hrs and my ups battery died, when power was restored in the morning (should be day mode) the cameras remained in their previous setting (night mode) and BI only sent the refocus command when it reconnected to them.
To fix this, I believe I need to do something differently. Adding a feature to allow "previous x events" wouldn't work if reconnect happens just before a refocus. Hopefully there is a way to "wrap" 2 html get commands in one PTZ function. Any ideas?
I'm open to scripting (I play lots with lin/'duino/esp/mosquitto/etc...)... just need some reference material to read before I do that.
However I noticed a problem with this "2 command" method to do my required "switch mode then refocus":
If I reboot any camera (power outage or other), when it goes back online BI does not send the 2 required 2 commands for a proper setup. BI only has a setting to send the "previous event", which in my case most of the time is just 'refocus'.
So in the case of last night (in night mode), where power went out for 6hrs and my ups battery died, when power was restored in the morning (should be day mode) the cameras remained in their previous setting (night mode) and BI only sent the refocus command when it reconnected to them.
To fix this, I believe I need to do something differently. Adding a feature to allow "previous x events" wouldn't work if reconnect happens just before a refocus. Hopefully there is a way to "wrap" 2 html get commands in one PTZ function. Any ideas?
I'm open to scripting (I play lots with lin/'duino/esp/mosquitto/etc...)... just need some reference material to read before I do that.
Last edited: