Page 1 of 1

API call for overlaying text information

Posted: Thu Dec 29, 2016 9:09 pm
by TheKorn
I'd like to request two features be added to the API:
  1. API call to change the timestamp string for a monitor.
  2. API call to overlay textual information under the monitor name, for X seconds.
Why / usage... I have a home automation system, and as part of that home automation system I have locks, where each user has their own code. It'd be really really nice to have my home automation system overlay "code: TheKorn" over the front door camera's video when I punch in my door code. (or "sensor open" if a camera is trained on a door.) I can get all that information from my HA system, there's just no way to currently get ZM to dynamically overlay extra text over the video, so it's a manual after-the-fact coordination process (...which blows).

Another usage scenario is if you're at a gas station, the camera by the cash register. Most recent cash registers have a way to query them as to what the salesperson is ringing up (what @ what price, total, cash tended, change, etc.). It would be awesome to have that kind of information overlaid onto the "over the shoulder" cash register video feed.

Changing the timestamp text just seems like an API omission. If you can create a monitor, you should also be able to set the correct timestamp format for it.

Re: API call for overlaying text information

Posted: Fri Dec 30, 2016 4:14 pm
by asker
The curl format should be reusable to change any variable in the Monitor object.

Code: Select all

curl -b cookies.txt -XPUT http://server/zm/api/monitors/1.json -d "Monitor[LabelFormat]='<your format>'"

Re: API call for overlaying text information

Posted: Sat Feb 18, 2017 5:24 pm
by snake
asker wrote:The curl format should be reusable to change any variable in the Monitor object.

Code: Select all

curl -b cookies.txt -XPUT http://server/zm/api/monitors/1.json -d "Monitor[LabelFormat]='<your format>'"
I tested this, and it worked. But, it required a restart of Zoneminder for the text to appear.

I found zmtrigger easier to use for overlaying text in real time and I've documented the basics on the wiki. https://wiki.zoneminder.com/ZMTrigger It's also been covered by others in the forum in more detail.