Page 1 of 1

Highlight a monitor in kiosk when motion detected

Posted: Fri Feb 07, 2025 9:12 pm
by glenmartin
Hi all
I'm putting the finishing touches on my install. I have set up a kiosk monitor with a simple montage of 4 of my streams, using a very simple html page served up by apache2:

Code: Select all

<html>
	<head>
	</head>
	<body >
		<img src="http://<ip address>/zm/cgi-bin/nph-zms?mode=jpeg&amp;maxfps=5&amp;scale=35&amp;state=1&amp;monitor=1&token=<token string>" >
		<img src="http://<ip address>/zm/cgi-bin/nph-zms?mode=jpeg&amp;maxfps=5&amp;scale=37&amp;state=1&amp;monitor=9&token=<token string>" >
		<img src="http://<ip address>/zm/cgi-bin/nph-zms?mode=jpeg&amp;maxfps=5&amp;scale=35&amp;state=1&amp;monitor=2&token=<token string>" >
		<img src="http://<ip address>/zm/cgi-bin/nph-zms?mode=jpeg&amp;maxfps=5&amp;scale=37&amp;state=1&amp;monitor=5&token=<token string>" >
	</body>
</html>
This works fine. All 4 of the requested monitors are shown, they're tiled 2x2 on a display, they stay live forever (so far).

However, I'd like to alert a viewer to when motion is detected on a monitor or linked monitor. Eg, draw a red outline around that monitor to draw attention to it.

I've been doing a bunch of searches, can't seem to find any posts or pages that this discuss visible motion alerts on nph-zms streams. I might be blind.

Is there a way? Or can you please point me to a thread I've missed?

Thanks!

Deets:
Zoneminder 1.36.35 on Ubuntu, 6 cameras into 8 monitors (2 monitors low-res for detection, 2 linked monitors at full res)
Kiosk is Pi 5, 32 bit desktop, Wayfire, chromium-browser in kiosk mode

Re: Highlight a monitor in kiosk when motion detected

Posted: Sat Feb 08, 2025 2:07 pm
by iconnor
Look at the code you are given.

We do it by putting a frame around the image, and talking back to zms to get the current status and if it is ALARM< then we set the class of the surrounding div to alarm. This applies the CSS settings for the alarm class, which is to apply a red border.

Re: Highlight a monitor in kiosk when motion detected

Posted: Thu Feb 27, 2025 9:20 am
by KelsieLakin
iconnor wrote: Sat Feb 08, 2025 2:07 pm Look at the code you are given.

We do it by putting a frame around the image, and talking back to zms to get the current status and if it is ALARM< then we set the class of the surrounding div to alarm. This applies the CSS settings for the alarm classgeometry dash meltdown, which is to apply a red border.
If there is no alarm, is there any other way?