Page 1 of 1

Windows 7 Sidebar Gadget ZM Viewer

Posted: Fri Jun 04, 2010 1:23 am
by haus
I'm developing a really simple Windows 7 Sidebar Gadget that is a ZM viewer (it does refreshed stills, not streaming, though you can specify a <1s refresh rate). Is anyone else interested in this? Mine isn't extremely portable at the moment - you have to edit the HTML file for the gadget to match your configuration, no fancy settings dialog, etc. but it's still pretty awesome IMHO. :)

If anyone else has already done this, then oops on my part. I did a search and didn't come up with anything.

Posted: Mon Jun 07, 2010 7:26 pm
by haus
In case anyone wants to try it, now it has a settings dialog: ... ta-gadget/

Sample Display:

Settings Dialog:

Posted: Mon Jun 14, 2010 12:25 am
by joelgb
Works great for me on Windows 7. Really cool gadget.


Posted: Sun Aug 15, 2010 6:47 pm
by haus
I'm sort of tabling this for now. It works, but because Windows will only view sidebar gadgets using the IE rendering engine (instead of, say, Firefox), you can't use mode=stream, you have to use mode=jpeg. This is OK but it leads to a *tremendous* number of mysql connections on the ZM server and I'm seeing higher loads than I'd like.

I can write a version of the page that uses mode=jpeg, and the number of connections drops from 200-300 down to maybe 10 (and load average goes way down also), but it of course doesn't work in IE, which means it doesn't work as a Sidebar Gadget.

If anyone has any thoughts on how to overcome this I'm open to them. I know there is the Cambozola thing for viewing streaming jpegs in IE, but I'm not sure if that would even work here and I've had a complete lack of success getting it working anyway.

It was a fun experiment and interesting to learn about gadgets, but in this case it doesn't work as well as I'd hoped (well, that's not quite true - it works well, but the higher load is an unfortunate consequence).

Posted: Wed Sep 15, 2010 3:39 pm
by logray
I've been trying to hack the html to allow for basic apache access (i'm using that in lieu of zoneminder's) but have thus far been unsuccessful. Can someone share details on how they made basic apache auth work with this gadget?

Also, an idea for the performance, just set the refresh interval higher?


Posted: Wed Sep 15, 2010 6:43 pm
by haus
Logray, I bypass basic auth by editing .htaccess and including an "allow from nn.nn.nn.nn" where that is my IP address. I am willing to accept the very slight risk that my ISP will give away the "dynamic" IP address I've had for the last 3 years and someone who gets that address might know which port I'm running ZM on. Of course if the IP address were to change my bypass would fail so I would immediately update it...again not a huge risk.

On some browsers you can put a username:password directly into the URL, but you may still get an annoying prompt which defeats the purpose.

I'm curious if there's a better way as well.

As for the refresh rate, what I discovered was that the original script just opens a massive number of mysql threads (like hundreds) even with a low refresh rate. Now I just call nph-zms?mode=jpeg like the Montage view does, and I force a general refresh of that every 20 seconds or so (so that when my machine wakes up from sleep or if I change the runstate of the ZM box the images come back within 20 seconds).

If I have time I'll post my updated page, but it's no longer a gadget. I do like it better than Montage because it auto-refreshes (as noted above, if the ZM run state changes, Montage goes all black), and I run a strip of images down the side of one of my monitors along with some other server status information.

Re: Windows 7 Sidebar Gadget ZM Viewer

Posted: Mon Aug 29, 2011 8:01 am
by gmar_87
Thanks for the gadget!

I can get it working, but after a couple of hours the refresh interval becomes very laggy. I have it set to refresh 2 monitors every 1 second, but after a couple of hours it slows down and starts refreshing every ~10 seconds. During this time there are two “defunct” processes on my Ubuntu 11.04 + Zoneminder 1.24.4 server. The processes are nph-zms! When i close the gadget the processes are killed. However, some times i need to restart apache..

Could this be caused by the high volume of requests coming from the gadget? Any help would be appreciated :)

The gadget settings are: 640×480, monitor 1,2, scale 50%, refresh 1 sec.

During this time the server load doesn't go over 0.20.

Re: Windows 7 Sidebar Gadget ZM Viewer

Posted: Mon Aug 29, 2011 3:02 pm
by haus
As I noted on my blog post and in post 4 here, development and support on this has ceased. It doesn't work properly due to massive mysql connections and difficulty streaming in IE. I just use FireFox now for viewing and mode=jpeg; works fine with 1.24.4 and FF6. Sorry I can't be of more was just an experiment.