I am using zoneminder in combination with two C7837WIP vstarcam's. On Ubuntu 14.04 server edition on a HP microserver.
The Vstarcam C7837WIP cam's are Cheap and Chinese camera's which come with horrible software and horrible firmware as was to be expected for a dome camera at 40 bucks a pop. Still good value for money. Been a project ever since. Eventually got it working in the following manner: there is one catch with these camera's. By default the resolution on the camera is set to 320x180. So after a reboot it is always set back to 320x180.
So when I set my resolution to 640x360 on the camera and in zoneminder. It works a treat. Until the moment a camera reboots for whatever reason. At that time the resolution goes back to 320x180. Which does not play well with the "source" camera resolution settings of 640x360 in zoneminder.
To get around this and force the camera into the correct resolution after a reboot. I now made the following script.
Code: Select all
tail -f /var/log/syslog | while read LOGLINE
do
[[ "${LOGLINE}" == *"'zmc -m 3' starting at"* ]] && curl 'http://192.168.1.10:81/camera_control.cgi?loginuse=admin&loginpas=888888¶m=15&value=1' && sleep 30
done
I am not a coder. Regex is not really my specialty. This is very crude, it works, but in my opinion it is butt ugly. And don't even want to know what will happen to my HP microserver when I start doing this trick with 10 camera's at a time lol. I do not know where to start searching as it usually works the other way around. Camera's alarm ----> action is triggered. And I want to trigger an action before the camera does anything. Just from an event in the log
Does anybody have a more elegant way to work around this problem ?
Thanks.