Anyone have some examples for setting up rules and triggers between openhab and zoneminder?
I just got the zoneminder binding to run. I’m about to start setting up the individual monitors.
One example of what I want to do is have a rule so when the garage door opens or closes a command is send to zoneminder to set a specific monitor to alert start for a certain time period, say 60 seconds.
Actually running into a much more basic problem first. I added the binding, got it working and then added one monitor. Tried to create an image card widget to point to an image (snapshot) from that camera and I can’t figure out how to get it done. Tried multiple methods adding and linking and just can’t figure it out. I think I’ve got the thing added correctly but at this point I’m not sure of much of anything with this binding.
What would the typical workflow be to add an image-card to a page that would show a recently obtained image from a zoneminder monitor?
I’ve got links to the channels for “Image URL”, “Video URL” and “Image”.
I think that’s where I’m not getting it right. I don’t see any items to choose when setting up an image card to test.
Just ran a few console commands.
openhab> things list |grep front
zoneminder:monitor:icezone_zm:306 (Type=Thing, Status=ONLINE, Label=Zoneminder Monitor front-ptz, Bridge=zoneminder:server:icezone_zm)
zoneminder:monitor:icezone_zm:103 (Type=Thing, Status=ONLINE, Label=Zoneminder Monitor Garage, Bridge=zoneminder:server:icezone_zm)
openhab> items list | grep zone
Zoneminder_Monitor_Garage_Video_URL (Type=StringItem, State=https://hostname:443/zm/cgi-bin/zms?mode=jpeg&monitor=103&token=<long token>, Label=Video URL, Category=, Tags=[Point], Groups=[Zoneminder_Monitor_Garage])
zoneminder (Type=LocationItem, State=NULL, Label=Zoneminder, Category=, Tags=[Location])
Zoneminder_Monitor_Garage_Image_URL (Type=StringItem, State=https://hostname:443/zm/cgi-bin/zms?mode=single&monitor=103&token=<long token>, Label=Image URL, Category=, Tags=[Point], Groups=[Zoneminder_Monitor_Garage])
openhab> links list | grep front
Zoneminder_Monitor_frontptz_Image -> zoneminder:monitor:icezone_zm:306:image Configuration[]
Zoneminder_Monitor_frontptz_Image_URL -> zoneminder:monitor:icezone_zm:306:imageUrl Configuration[]
Zoneminder_Monitor_frontptz_Video_URL -> zoneminder:monitor:icezone_zm:306:videoUrl Configuration[]
I may be getting confused about things vs items vs links. I’ve never really wrapped my head around how all that is supposed to work. So I’m probably missing a step somewhere along the way that would be obvious if I had a better understanding on how all this gets tied together.
Got the bridge and monitor things defined and they look pretty much identical to those.
I think the ways I’ve tried to add items as links is where I’m missing a step or doing it wrong.
I go to the list of Things, find the monitor, click on the Channels tab and the Unlinked tab there. Click “Add points to model” or “Add equipment to model” and select the Image URL and Video URL items.
After that if I look at the item it appears to have failed to populate with the correct info;
label: Video URL
type: String
category: ""
groupNames: []
groupType: None
function: null
tags:
- Point
Create a new item from that screen and you should have a nicely linked item to the channel. Using the model is not necessary, at least not now. If you are still getting…
a better understanding on how all this gets tied together
…I would use the process I described. You can always go back and update the Items you create with Group Membership and Semantic Class info.