ZoneMinder Viewer Windows 7/Vista Gadget

Settings Dialog

EDIT: I’m 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.DEVELOPMENT AND SUPPORT FOR THIS PROJECT HAVE CEASED.

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).

— Old Content —

This is a Windows Vista/Windows 7 Gadget that will allow you to view ZoneMinder cameras from your desktop.

Sample Gadget Display

Download the attached file ( and rename it to “zmViewer.gadget”. This will allow Windows 7 to see it as a gadget.

Double click the zmViewer.gadget file and select “install”. Then mouse over the gadget until you see the settings icon (the wrench), click on it, and enter your ZoneMinder machine’s IP address, username, password, and monitor details. Hit OK and the monitors you selected will show on your desktop with the specified size and refresh rate.

CPU usage on a dual core E6600@2.4GHz is about 2% with 6 monitors displayed and a 1-second refresh rate. That compares very favorably to some of the other viewers out there that don’t allow throttling of the refresh rate and simply grab images as quickly as they can. I’ve seen 4-camera views topping 10% of CPU in those circumstances and I feel this is a much better solution, particularly given Windows 7’s ability to make this viewer always on top and vary the opacity to suit your needs. If you have a spare monitor you can just put it out of the way and mouse over to bring it to focus when you spot activity.

Another advantage of this over other viewers is that this one survives status changes without requiring a refresh. The QT-based ZM viewer requires an “F5” refresh any time the state changes in order to keep the monitor view alive.

Future functionality could probably include rudimentary control of the ZM interface, considering this is all just a web page. But for now I want to keep it small and not duplicate the functionality of the ZM front-end.

7 replies on “ZoneMinder Viewer Windows 7/Vista Gadget”

Great gadget! I had to modify it a bit to support basic http authentication which I have enabled on my server. Also, I had the cgi-bin directory slightly customized on my install, so I had to change that path. My only suggestion would be to have those as a parameter. Also, it is a little weird about the % size versus the original size values. However, this is an awesome gadget and you have done a super job! The code was very easy to pick apart and modify. Thanks so much!

Thanks Matt. You know, I thought about adding a custom path to nph-zms as I know ZM has that same parameter in the options screen, but I wanted to keep it simple for now. As you noted, it’s not terribly hard to modify this stuff. The reason for the % scaling is that 320×240 images take up a lot of room on the screen, so I like to scale them down a bit. But you have to tell the script the size of the images or it won’t know how big to make the gadget (width and total height). I suppose I could put detection code in there but this was easier.


Seems great. I have downloaded and installed in my W7 Home Premium and does not work. Any clue?. Both user/pwd are ok. Is there any option in ZM that should be chenged (hashed pwd, etc).


Not that I know of, but maybe your path to nph-zms is atypical as Matt noted above (you can change it in the code; I haven’t written that as an option into the gadget yet, but I suppose if two of you have that issue maybe I will! For troubleshooting, open IE and go to a “stills” view of one of your cams in the ZM web interface. Right click on the image and get the properties of the image. It will look something like:
You need to compare that to my code, which generates something like the above. Things that could go wrong include a different path to nph-zms, wrong monitor number, or your ZM box requires basic authentication. For the latter, I just do “allow from ” on my LAN since that’s where I run this gadget. Perhaps Matt can indicate how he got basic auth working here and I can build it in.

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 refreshes 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.

I rename and after dobleclick, open Explorer with the following:

– ZM Viewer – © Greg Hausman. Simple viewer for ZoneMinder – – Full

Wich is bad?

@John, your comment is a year old (sorry, just found it), but I had shelved this project for that very reason. It doesn’t work with IE well, so I just stream in Firefox.

@Luis, I don’t understand your question but the project is dead and no longer supported. Sorry!

Leave a Reply

Your email address will not be published. Required fields are marked *