Page 1 of 3

jZMConsole Java client available for Alpha testing

Posted: Wed Nov 19, 2008 4:49 pm
by ahagadorn
I have been working on a Java Swing Zoneminder console client for quite awhile, and I think its finally ready for some public testing.

It is intended to become a full-featured thick client for Zoneminder monitoring and administration. It communicates via HTTP posts to the Zoneminder server that return XML responses.

jZMConsole requires login using normal Zoneminder server-side usernames and passwords. Right now, there are two PHP files that need to be installed on the server in order to make it work. No Zoneminder database or native code mods are required.

When you first start the application, it will ask for your Zoneminder URL, and the subdirectory where the jZMConsole PHP scripts are installed. It will then read all your monitor information from the database via HTTP post and display them without any further configuration.

The number of events for each monitor are shown semi-realtime (within 20 seconds or less) and you can open a window to view and optionally delete each monitor's events.

Various montage configurations are available, as is cycle display. You can zoom all monitors in the montage or cycle views, and each individual monitor can be zoomed and click-dragged within it's window.

Screenshots and files are available at https://sourceforge.net/projects/jzmconsole/ - I have not had time to add a lot of content to the project pages yet.

Let me know what you think!

Andy

Posted: Thu Nov 20, 2008 3:42 pm
by TrOjAn
Screen grabs look clean... is the THICK red border something that can be changed??

TrOjAn

Posted: Thu Nov 20, 2008 6:30 pm
by ahagadorn
Yes, there are several display options, including the background color.

I'll thin it down a little for you too :-)

Installation is really simple, so don't be scared to give it a try. I think I will be posting a release at the end of today with a couple enhancements to the look and feel, plus a fix to remove the events view button dynamically when all the events are deleted, and redisplay it dynamically when new events are detected.

Andy

Posted: Fri Nov 21, 2008 7:53 pm
by ahagadorn
I just put release 0.0.2A on Source Forge. If you have already downloaded the 0.0.1A release, the only changed file is jZMConsole.jar.

This release contains the following changes:

  • * The event view button is now removed and added dynamically based on if all events are deleted (removed) or if new events are detected (added).
    * The Display Options panel now has options to change text color, and "Theme" (UI look and feel)
    * Display Options now has options to set cycle display time, and event refresh frequency
    * Tooltips have been added to all buttons
    * The width of the borders has been reduced
    * The main display now shows current user ID
Enjoy!
Andy

Posted: Sat Nov 22, 2008 7:32 pm
by caladeira
Hello!

Seams to be a nice client.

However, I've inserted a wrong server url for the first time and now I can't find how to correct it.

After entering the log in credentials, I always receive this message in the command line:

[Fatal Error] :2:2: The markup in the document following the root element must be well-formed.

Thanks in advance.

Posted: Sun Nov 23, 2008 12:59 pm
by ahagadorn
Sorry about that! The next release will check to see if the URL is valid.

If you are running it on Windows, start regedit and go to:

HKEY_CURRENT_USER/Software/JavaSoft/Prefs/net/securitykit/jzmconsole and delete the zm/U/R/L entry.

Restart jZMConsole and it will ask for the URL again.

If you are running on another OS, I will have to get back to you tomorrow on where it's stored. Let me know.

Andy

Posted: Sun Nov 23, 2008 9:37 pm
by caladeira
No problem, it was my mistake.

I've managed to bypass this issue with your help, but now I can't see any camera.

I'm running version 0.0.2A in a xp client and have the zm server 1.23.2 running on ubuntu server 7.10.
I've set the db user+pass in the server php file and I'm using the same credentials in the console that I use when a log in trough browser.

In ZM I'm using authentication | builtin | hashed.

I've installed the server software in "/var/www/html/zm/jzmc"

If i set the server URL to "http://192.168.2.90/zm", i get this in the console after the login screen:

C:\jzmconsole-0.0.2A\client>java -jar jZMConsole.jar
no protocol: 192.168.2.90/zm/cgi-bin/zms?mode=jpeg&monitor=4&scale=100&maxfps=5&user=******&pass=******
Exception in thread "Thread-3" java.lang.NullPointerException
at net.securitykit.jzmconsole.ZMCamStream.<init>(ZMCamStream.java:75)
at net.securitykit.jzmconsole.ZMViewer.setCurrentURL(ZMViewer.java:225)
at net.securitykit.jzmconsole.ZMViewer.init(ZMViewer.java:126)
at net.securitykit.jzmconsole.ZMStream.run(ZMStream.java:75)
at net.securitykit.jzmconsole.ZMStream.<init>(ZMStream.java:26)
at net.securitykit.jzmconsole.ZMConsole$BuildMonitorPanel.run(ZMConsole.java:314)
at java.lang.Thread.run(Unknown Source)

At the same time this message appears, the jZMConsole window opens showing only the menu and the toolbar.
Even if I click on "Montage Display - Two columns" I get no video.

If i set the server URL to "http://192.168.2.90", I only get this error:

C:\jzmconsole-0.0.2A\client>java -jar jZMConsole.jar
ZMTransaction Error: 404 HTTP/1.1 404 Not Found

Hope it help you in fine tuning this application.

Best regards.

Posted: Sun Nov 23, 2008 11:26 pm
by ahagadorn
It looks like you have the URL set correctly - the login succeeded, or you would not have got as far as the toolbar.

The issue is that there is no http:// in front of the URL for the cam stream (zms). That is not something you can control, it's in the code.

I will have an answer for you within 24 hours.

Andy

Posted: Mon Nov 24, 2008 12:10 am
by ahagadorn
Double check that you have http:// in front of the URL. You can check it and reset it from the toolbar options pane, even though your cams don't show up. Save your changes, log in again, and you should be all set.

Andy

Posted: Mon Nov 24, 2008 9:33 pm
by ahagadorn
jZMConsole V0.0.3A is up on Source Forge with the following changes:
  • * The Zoneminder URL is now tested to ensure a valid connection before it can be saved in the options pane and initial setup
    * The Events window now shows "Live" or the event name in the cam stream window, depending on what is selected.
    * When events are deleted in the Events window, the display now reverts to "Live".
    * jZMConsole now plays a sound (Doorbell) when new events are detected. This can be turned off in options.
I particularly like the sound. I can keep the application minimized, and see what happened when I hear the sound.

Screenshots have also been updated.

This release is quite stable, so I think the next release will be the first Beta release.

Source Forge shows there have been quite a few downloads - if anyone else is playing with it, please let me know, especially if you are having issues.

Thanks,
Andy

Posted: Mon Nov 24, 2008 10:18 pm
by caladeira
Hi there!

I have some updates.

If I set the zm/U/R/L registry key to "http:\\192.168.2.90\zm", the application opens and I can see a box for each of my cameras with the number of recorded events with no video and a moving «circle» in the center.

If I set the zm/U/R/L registry key to "http://192.168.2.90/zm", I always get this error:

Code: Select all

C:\jzmconsole-0.0.2A\client>java -jar jZMConsole.jar
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid uri 'http://http:\192.168.2.90/zm/jzmc/zmc_transaction.php': invalid port number
        at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:222)
        at org.apache.commons.httpclient.methods.ExpectContinueMethod.<init>(ExpectContinueMethod.java:93)
        at org.apache.commons.httpclient.methods.EntityEnclosingMethod.<init>(EntityEnclosingMethod.java:119)
        at org.apache.commons.httpclient.methods.PostMethod.<init>(PostMethod.java:106)
        at net.securitykit.jzmconsole.ZMTransaction.send(ZMTransaction.java:45)
        at net.securitykit.jzmconsole.ZMTransaction.checkLogin(ZMTransaction.java:23)
        at net.securitykit.jzmconsole.ZMConsole.<init>(ZMConsole.java:82)
        at net.securitykit.jzmconsole.ZMConsole.init(ZMConsole.java:760)
        at net.securitykit.jzmconsole.ZMConsole.access$100(ZMConsole.java:15)
        at net.securitykit.jzmconsole.ZMConsole$16.run(ZMConsole.java:1183)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

I'm not completely shore that I've installed the server side software in the right place.
If I type in the following address in client's the browser:

http://192.168.2.90/zm/cgi-bin/zms?mode ... ****&pass=****

I get:

Not Found
The requested URL /zm/cgi-bin/zms was not found on this server.


If I remove the zm:
http://192.168.2.90/cgi-bin/zms?mode=jp ... ****&pass=****

I can see the camera image.

If you any other information from my server, just ask.

Best regards.

Posted: Mon Nov 24, 2008 11:48 pm
by ahagadorn
Try this:

Delete ALL the registry entries under HKEY_CURRENT_USER/Software/JavaSoft/Prefs/net/securitykit/jzmconsole

Don't replace them with anything, just delete them. Download jZMConsole-0.0.3A if you havent already, and replace your jZMConsole.jar.

Start the application, and it will ask for your URL and subdirectory.

For URL, enter: http://192.168.2.90
For subdirectory enter: zm

Click Save.

That should do it.

Andy

Posted: Tue Nov 25, 2008 10:43 pm
by caladeira
Hello again.

Thank you for your efforts.

I've finally managed to make the client application to work, however, it wasn't exactly the way you've said.

Here what I've done.

At the url/subdir prompt, the way that allow me to continue was entering:

URL: http://192.168.2.90
subdir: zm/jzmc

All the other options say invalid zm url, except:

URL: http://192.168.2.90/zm
subdir: jzmc

But this way, the application have the same behavior that I've reported with version 0.0.2A.

After this edit, the client works just fine.

I noticed that in the registry the url and subdir I've entered have all forward slash replaced to back slash.

Now that I was able to see the application working, I've noticed that the windows with the video for each camera are not always drawn in the same order.
This might be because I have 3 cameras and the third have the function set to none at the present moment.
Once I have the camera again working, I can say more about this.

Continue the good job.

Best regards.

Posted: Wed Nov 26, 2008 2:40 am
by ahagadorn
I'm happy you got it working!

I'm aware of the random sort order issue, I have a fix for it. Look for it in the next release.

There is also a bug with V0.0.3A that can make the event counts look wrong from time to time. That is fixed in the next release too.

Andy

Posted: Wed Nov 26, 2008 6:37 pm
by caladeira
Very good!

Continue the good work.

Best regards.