API call for overlaying text information

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

API call for overlaying text information

Post 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.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: API call for overlaying text information

Post 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>'"
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: API call for overlaying text information

Post 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.
Post Reply