Page 1 of 1

turn camera on/off via telnet

Posted: Mon Sep 07, 2015 10:30 am
by d.kilshtein
I'm looking for a solution to turn camera(s) on and off from a command line.
I found this solution that actually works for me:

Start: { echo "3|on|255|textstring1|textstring2|textstring3"; sleep 1; } | telnet 192.168.0.10 6802
Stop: { echo "3|off|"; sleep 1; } | telnet 192.168.0.10 6802

The only problem is that the camera should be in a "Nodect" function. It really makes me uncomfortable (I feel like living in the big brother's house) and I would prefer to set all cameras to "none/disabled". Then, when I decide to turn them on, switch to "Nodect" and then issue the command I written above (or any other command) to turn all cameras on and start recording.
Then issue another command to return to the "none/disable" state
What I'm looking for is something like coming/going scenarios.

Re: turn camera on/off via telnet

Posted: Mon Sep 07, 2015 2:18 pm
by d.kilshtein
Maybe the easiest way would be a small script to start/stop the service and left all cameras on record function?

Re: turn camera on/off via telnet

Posted: Thu Sep 10, 2015 1:24 am
by bbunge

Re: turn camera on/off via telnet

Posted: Tue Oct 13, 2015 8:43 pm
by asker
You have the following options:

1. Use zmpkg - but that restarts all of ZM, so its slow
2. Use zmu (as sudo) (do a zmu --help and explore) to change function from Enabled to Disabled or vice versa. That will enable/disable a specific monitor. You can't however change its Mode (From say Modect to None)
3. Use the new ZoneMinder APIs - they allow you to both change function and mode. But for this you need development snapshots (1.28.107+)

Re: turn camera on/off via telnet

Posted: Fri Oct 16, 2015 5:06 pm
by d.kilshtein
Thank you all,

since i don't care about scheduling the on and of i do not need the Cron solution.
all i want is a button to start and stop all cameras when i leave home (no matter what time it is).
the solution i found is using this command:

"echo <my password> | sudo -S service zoneminder start" - to start the service
"echo <my password> | sudo -S service zoneminder stop" - to stop the service

i can run from any of my computers (on windows i use the mobaterm shortcut to start ssh and issue a command) and even from my Android phone (from anywhere). i think stopping a service is even more secure then just stopping the camera...