BUG: zmpkg.pl does not enable cameras from state changes
Posted: Mon Apr 27, 2009 8:24 pm
I wanted to create a state so that I can easily turn on all motion detection and turn off again via a command prompt.
So I went in, made my various states and set them accordingly.
The state to turn them all off worked like a champ. However, running the exact opposite state to turn them all on (different state setting) never seemed to re-enable them.
After digging through the perl code a lot, I found this was the offending snippet:
Commenting this out fixed the problem and now the zmpkg.pl script works just as it should.
I've verified this via SQL and from the console.
Can anyone tell me what purpose that line is for anyways? I just can't seem to wrap my brain around it.
So I went in, made my various states and set them accordingly.
The state to turn them all off worked like a champ. However, running the exact opposite state to turn them all on (different state setting) never seemed to re-enable them.
After digging through the perl code a lot, I found this was the offending snippet:
Code: Select all
$monitor->{NewEnabled} = 0 if ( !$monitor->{Enabled} );
I've verified this via SQL and from the console.
Can anyone tell me what purpose that line is for anyways? I just can't seem to wrap my brain around it.