Hi guys ! I want to use the API to ask ZoneMinder to take a picture of a monitor and send it to me via email. Does anybody know how to do that ?
Thanks !
API picture to email
Re: API picture to email
if you send this URL for example :
it will take a single snap shot. Notice the mode=single which usually is mode=jpeg. AUTH_RELAY is set to none with the auth activated and monitor 2 is selected.
Maybe a script to take the snap shot and send the image to an email address fired by Cron job? there are other ways including using the API I think.
Code: Select all
http://your_zm_url/cgi-bin/nph-zms?mode=single&scale=100&maxfps=5&buffer=1000&monitor=2&user=admin&connkey=946936&rand=1460641666
Maybe a script to take the snap shot and send the image to an email address fired by Cron job? there are other ways including using the API I think.
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: API picture to email
If you have authentication turned on, the URL should look like this:
PATH_ZMS - found under options. different for every distro.
ID - the monitor id of your monitor as shown on the web console (hover over the link)
USERNAME- Username of a restricted account you created under Options. This will be visible in plain text.
PASSWORD - Password of the restricted you created under Options. This will be visible in plain text.
Optionally, you can change the scale in the url to something other than 100.
My only gripe is Weather Underground does not accept this as a valid image because the url does not end in .jpg.
Code: Select all
http://your_zm_url/{PATH_ZMS}?mode=single&scale=100&monitor={ID}&user={USERNAME}&pass={PASSOWRD}
ID - the monitor id of your monitor as shown on the web console (hover over the link)
USERNAME- Username of a restricted account you created under Options. This will be visible in plain text.
PASSWORD - Password of the restricted you created under Options. This will be visible in plain text.
Optionally, you can change the scale in the url to something other than 100.
My only gripe is Weather Underground does not accept this as a valid image because the url does not end in .jpg.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/