How to stop monitor stream?

Current Development version likely to have breaking changes
Post Reply
IgorA100
Posts: 78
Joined: Sat Feb 03, 2024 11:55 am

How to stop monitor stream?

Post by IgorA100 »

I'm completely changing the grid of a Montage page and need to stop some monitors so they don't consume resources (when they're not showing on the screen).
monitor.start() - naturally works without problems.
monitor.stop() & monitor.kill() - does not stop the stream
User avatar
iconnor
Posts: 2912
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: How to stop monitor stream?

Post by iconnor »

Uh...

Something is bad here. I was under the impression that sending the CMD_STOP would stop the stream.... apparently all it does is unpause.... which is very counter-intuitive.

CMD_QUIT will cause zms to exit, which will do the job. Maybe CMD_PAUSE would suffice though, so you could then send CMD_PLAY to start back up. Please note that when paused, zms will occasionally (5s) send another image to keep the connection alive.
IgorA100
Posts: 78
Joined: Sat Feb 03, 2024 11:55 am

Re: How to stop monitor stream?

Post by IgorA100 »

Running CMD_PAUSE does not reduce server resource consumption.
IgorA100
Posts: 78
Joined: Sat Feb 03, 2024 11:55 am

Re: How to stop monitor stream?

Post by IgorA100 »

It’s very strange, but when I respond to the CMD_QUIT command I receive a message in the browser console:

Code: Select all

socket_sendto( /run/zm/zms-381296s.sock ) failed: Connection refused
Reloading stream: http://192.168.111.244/zm/cgi-bin/nph-zms?scale=100&state=1&zones=0&mode=jpeg&maxfps=30&monitor=36&auth=50ba7ed5cb33397f56778843a3b31f6e&user=IgorA100&rand=1714080057&connkey=381296
User avatar
iconnor
Posts: 2912
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: How to stop monitor stream?

Post by iconnor »

Because zms quits, but you havnt stopped the ajax status requests
Post Reply