[RELEASE] ZoneMinder CCTV Addon
#46
I've updated crashgybe's plugin to add a menuitem which displays the number of recorded events (if any) for each camera. Selecting the menu item displays a list of the events with timestamp and duration info. Selecting one of the events displays the recorded event video.

You can try it @
https://github.com/spargopolis/plugin.video.zoneminder

I tested it on Ubuntu 14.04 and RPi2 running Kodi 15.2. The playback is bursty on the RPi2 but I believe this is a limitation of the hardware, since on the i5-based PC running Ubuntu, it's fine.
Reply
#47
Thank you all for this awesome plugin. I do agree with the other user that a montage would be nice but, this will be nice to be able to see who's ringing my door bell when I'm down in my basement Smile. Got this working with zoneminder and the zmodopipe install that I have running on my centos 6 VM. Works like a champ. The only thing I had to do in the config for the plugin was the cgi-bin had to be cgi-bin/zm/ then it was golden.
Reply
#48
Hi!

It would be nice if we could get a setting for HTTPS or HTTP connection.

I changed in function getUrl
the line
Code:
url = "http://%s/%s/" % (server, path)

to
Code:
url = "https://%s/%s/" % (server, path)

and this works very well with my https only webinterface for zoneminder.


I am not very into writing kodi addons or using github otherwise I would had changed it already.
Reply
#49
Great work on the events listing spargopolis.

I broke my zoneminder and had to upgrade to ZM 1.29.0. Unfortunately in this version there are two changes-

As mentioned by thefuzz4 below, I had to change the default cgi directory setting. For me it had to be zm/cgi-bin but that may be peculiar to my zm installation.

And secondly, ZM1.29.0 has an event listing with a slightly different html format so I had to update the html parser to cater for this. I have tried to make it backward compatible to 1.28.x (it should match either) but don't have a 1.28.x zm installation to test.

In addition, I've tried to add an HTTPS option to the settings as requested by 6i6i_ above. Please test if you have an https zm installation, I do not.

You can get this latest zip at-

https://github.com/jamoZA/plugin.video.z...master.zip
(working on Isengard 15.2 - openlec 6.0.1 with zoneminder 1.29)

(Note - for me, when upgrading, I have to uninstall the old plugin, restart kodi and then install from zip).

Todo:

* Event playback - for me these play fine but when the event reaches its end, it would be nice if the video would stop.... mine just sits on the last frame and "buffers" endlessly.... any ideas? Do others have the same problem?

* Montage - I see spargopolis has started on this - there's a montage listing but I presume this is still in development?
Reply
#50
One other thing, although the new plugin version will hopefully allow https.... just be aware that the plugin passes username and password in the query string. For security concerns regarding this see https://blog.httpwatch.com/2009/02/20/ho...ver-https/

(2016-01-26, 13:01)6i6i_ Wrote: Hi!

It would be nice if we could get a setting for HTTPS or HTTP connection.

I changed in function getUrl
the line
Code:
url = "http://%s/%s/" % (server, path)

to
Code:
url = "https://%s/%s/" % (server, path)

and this works very well with my https only webinterface for zoneminder.


I am not very into writing kodi addons or using github otherwise I would had changed it already.
Reply
#51
I'm trying to get this plugin to work with my setup and have a small problem that I'm hoping someone can help with.

This is the logfile from kodi:

13:19:08 4405.204590 T:3023377328 NOTICE: DVDPlayer: Opening: http://192.168.10.8/zm/cgi-bin/nph-zms?m...&maxfps=10
13:19:08 4405.205566 T:3023377328 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
13:19:08 4405.208496 T:2666525680 NOTICE: Creating InputStream
13:19:08 4405.232422 T:2666525680 ERROR: CCurlFile::Open failed with code 404 for http://192.168.10.8/zm/cgi-bin/nph-zms?m...&maxfps=10
13:19:08 4405.234375 T:2666525680 ERROR: Open - failed to open source <http://192.168.10.8/zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=25&maxfps=10>
13:19:08 4405.235840 T:2666525680 ERROR: CDVDPlayer::OpenInputStream - error opening [http://192.168.10.8/zm/cgi-bin/nph-zms?m...&maxfps=10]
13:19:08 4405.236816 T:2666525680 NOTICE: CDVDPlayer::OnExit()
13:19:08 4405.241211 T:3023377328 ERROR: Playlist Player: skipping unplayable item: 0, path [http://192.168.10.8/zm/cgi-bin/nph-zms?m...&maxfps=10]

This is the access.log from my zoneminder server

192.168.10.51 - - [02/Sep/2016:13:18:24 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=1&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:18:29 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=2&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:18:32 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=1&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:18:42 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=1&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:18:44 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=1&format=avi&bitrate=10&maxfps=25 HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:18:44 +0100] "GET /zm/cgi-bin/nph-zms?monitor=1&format=avi&bitrate=10&maxfps=25 HTTP/1.1" 404 216 "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:18:59 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=2&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:19:00 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=3&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:19:00 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=4&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:19:00 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=5&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:19:01 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=6&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:19:01 +0100] "HEAD /zm/cgi-bin/nph-zms?monitor=7&mode=single HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:19:04 +0100] "HEAD /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=25&maxfps=10 HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:19:04 +0100] "HEAD /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=25&maxfps=10 HTTP/1.1" 404 - "-" "OSMC (Linux; OSMC 2016.08-1)"
192.168.10.51 - - [02/Sep/2016:13:19:04 +0100] "GET /zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=25&maxfps=10 HTTP/1.1" 404 216 "-" "OSMC (Linux; OSMC 2016.08-1)"

If I put the URL (below) into a browser with the leading /zm removed it works fine. So something needs to be changed, either on the zoneminder server or maybe in the plugin code, to make this work as it should, if anyone can help I'd real appreciate it greatly.

http://192.168.10.8/cgi-bin/nph-zms?moni...ode=single
Reply
#52
(2016-09-02, 14:29)Maximo Wrote: I'm trying to get this plugin to work with my setup and have a small problem that I'm hoping someone can help with.

...

If I put the URL (below) into a browser with the leading /zm removed it works fine. So something needs to be changed, either on the zoneminder server or maybe in the plugin code, to make this work as it should, if anyone can help I'd real appreciate it greatly.

http://192.168.10.8/cgi-bin/nph-zms?moni...ode=single

Are you suggesting that the problem is just in the URL and it needs to be changed to drop the leading zm? If so, that will be a simple fix in the settings - pretty sure it is the "cgiurl" setting that would then need to change from zm/cgi-bin to just cgi-bin.

I presume you're able to get a list of monitors ok?
Reply
#53
Thanks for the reply. From the configuration option of the addon, cgiurl is already set to cgi-bin. Yes I get the list of monitors fine.
Reply
#54
Is it possible to use this plugin with older zm installations? I have 1.24.4 and it is very difficult to me to upgrade.
I Installed plugin, but it just fails instead of connecting to zm server.
Reply
#55
By the way, where log file should be located? Can't find it in /var/log
Reply
#56
Live view and events working ok but the montage is doing nothing.

Any suggestions to get this to work?
Reply
#57
I don't think the developer managed to get the montage working, when this plugin worked on my installation I could never get it working either. Now that we're on Kodi 17.5 this plugin doesn't seem to work any longer, which is a shame as I used it often.
Reply
#58
I was interested in this addon, but as mentioned above the existing addon does not work in Kodi 17.

I had a look at the code of the old one it was scraping the webpages and other funky stuff. So I decided to write a new plugin that uses the API and is compatible with Kodi 17. At the moment it only does the live view, but I will look to extend this to also display Events. For now you can get it from:

https://github.com/petegallagher/plugin....minder.zip
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] ZoneMinder CCTV Addon0