Kodi plugin [plugin.video.zoneminder] 2.0.0

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
petegallagher
Posts: 2
Joined: Tue Jan 22, 2019 9:08 am

Kodi plugin [plugin.video.zoneminder] 2.0.0

Post by petegallagher »

I have recently started using Zoneminder (absolutely love it BTW) and wanted to be able to switch to view the live stream on my living room TV when the doorbell went or my outside lights were triggered. There was a Kodi plugin already but it was scraping the webpages and no longer worked (I assume because the HTML changed slightly), so I wrote a new plugin that uses the API and I hope this might be of use to some others so wanted to post about it here. Code is available at:

https://github.com/petegallagher/plugin ... zoneminder

Also this is also available in the official Kodi repo's so no need to install from source e.g.

https://github.com/xbmc/repo-plugins/tr ... zoneminder
Maximo1970
Posts: 97
Joined: Sun May 28, 2017 4:29 pm

Re: Kodi plugin [plugin.video.zoneminder] 2.0.0

Post by Maximo1970 »

Good man,

I used the old version of this when it was working. So will be installing this version to see how well it works.

Thanks for the update and I look forward to seeing the results. Do you have any further plans with it?

Regards,

Garry
petegallagher
Posts: 2
Joined: Tue Jan 22, 2019 9:08 am

Re: Kodi plugin [plugin.video.zoneminder] 2.0.0

Post by petegallagher »

I was thinking of adding the following features:

- Viewing Events
- Cycling through the various monitors every X seconds

That's about it really, but would be happy to hear any other thoughts.
Maximo1970
Posts: 97
Joined: Sun May 28, 2017 4:29 pm

Re: Kodi plugin [plugin.video.zoneminder] 2.0.0

Post by Maximo1970 »

Sounds good to me, the only thing that I can think of that would be good to have is the Montage view. Not sure how easy that's likely to be.

I look forward to your updates.
tcg
Posts: 46
Joined: Fri Jan 13, 2012 3:41 pm

Re: Kodi plugin [plugin.video.zoneminder] 2.0.0

Post by tcg »

Hey, just wanted to say thank you for working on this. As a long-time ZM user, I've looked for a reliable way to get my cameras to display in Kodi. I had some luck with the previous plugin but your new API-based work is definitely going to be an improvement. I look forward to seeing where you take this. I agree with the statements above about the montage and cycling features. It would also be nice to be able to select which cameras you want to view in the montage or cycle. I have both high-def and low-def monitors set up for each of my cameras and I'd like to be able to pick and choose which ones to include in the display. Also, I manage multiple ZM sites. It would be nice to have the ability to pull up not only my local cameras but cameras from a different server (via https://), kind of like how zmNinja does it.

Excellent work and thanks again!
Chris
Maximo1970
Posts: 97
Joined: Sun May 28, 2017 4:29 pm

Re: Kodi plugin [plugin.video.zoneminder] 2.0.0

Post by Maximo1970 »

Hi Peter,

I installed this last night so see it working and found a small issue. Looking at the code I think I've found where the problem is, or at least on my setup.

Code: Select all

 active_monitor['video'] = '{base_url}/cgi-bin/nph-zms?
My cgi-bin is actually cgi-bin-zm instead, so will change the code to reflect this and try once again. I've running on CentOS 7 version 1.32.3 of ZM in case that makes a difference.

Code: Select all

 active_monitor['video'] = '{base_url}/cgi-bin-zm/nph-zms?
Once again, thanks for picking this up and moving it along. I'm sure you'll find more and more people will start to use this soon. If it helps, I'm more than happy to assist in any testing activities. I'm no developer, but do understand coding and it's structures.
truderinger
Posts: 5
Joined: Sun Jun 14, 2020 6:29 am

Re: Kodi plugin [plugin.video.zoneminder] 2.0.0

Post by truderinger »

Hallo,

I use the ZM addon 2.02. I can access Zoneminder via a web browser and view the monitor. In the Kodi addon I gave my internal IP with http: //192.xxxxxxx and set the path to zm. I also left the "zm/cgi-bin" directory. I am currently working without "Auth".

When I opening it comes the error message: Login failed _ 404: Not Found. What is wrong?

I use RPI3 with an buster-OS. The zm.conf:

ZM_PATH_DATA=/usr/share/zoneminder
ZM_PATH_BIN=/usr/bin
ZM_PATH_LIB=/usr/lib/arm-linux-gnueabihf
ZM_PATH_CONF=/etc/zm
ZM_PATH_WEB=/usr/share/zoneminder/www
ZM_PATH_CGI=/usr/lib/zoneminder/cgi-bin
ZM_WEB_USER=www-data
ZM_WEB_GROUP=www-data
.........


Thanks for an info. great thanks.

best regards
truderinger
Posts: 5
Joined: Sun Jun 14, 2020 6:29 am

Re: Kodi plugin [plugin.video.zoneminder] 2.0.0

Post by truderinger »

This is the answer, you need to add the following code to .htaccess in 3 places

/usr/share/zoneminder/www/api
/usr/share/zoneminder/www/api/app
/usr/share/zoneminder/www/api/app/webroot


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteBase /zm/api
</IfModule>


This was the problem that when I logged in with the addon I always received the 4.04 error. The addon is now empty, so no monitors open. I still have to fix this.

I can logged in with CakePhP and cam see all cam.
http://server/zm/api/monitors.json >>run
http://server/zm/api/host/getVersion.json >>run

best regards
Post Reply