---
---Monitor ID equal to 1
and
Date/Time equal to now
execute command on all matches /home/sysop/ha_scripts/hazm_front_door.pl
hazm_front_door.pl
Code: Select all
#!/usr/bin/perl
use Net::MQTT::Simple "192.168.1.20";
retain "/zoneminder/front_door/" => "1";
sleep (10);
retain "/zoneminder/front_door/" => "0";
when run I get the following error:
Code: Select all
Can't execute filter 'SELECT E.Id, E.MonitorId, M.Name as MonitorName, M.DefaultRate, M.DefaultScale, E.Name, E.Cause, E.Notes, E.StartTime, unix_timestamp(E.StartTime) as Time, E.Length, E.Frames, E.AlarmFrames, E.TotScore, E.AvgScore, E.MaxScore, E.Archived, E.Videoed, E.Uploaded, E.Emailed, E.Messaged, E.Executed FROM Events as E INNER JOIN Monitors as M on M.Id = E.MonitorId where not isnull(E.EndTime) and ( M.Id = '1' and E.StartTime = ) and ( E.Executed = 0 ) order by E.StartTime asc', ignoring: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and ( E.Executed = 0 ) order by E.StartTime asc' at line 25
Any help is appreciated.
Thanks in advance.