Page 1 of 1

Kodi plugin [] 2.0.0

Posted: Tue Jan 22, 2019 9:21 am
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: ... zoneminder

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

Re: Kodi plugin [] 2.0.0

Posted: Tue Jan 22, 2019 1:27 pm
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?



Re: Kodi plugin [] 2.0.0

Posted: Tue Jan 22, 2019 2:30 pm
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.

Re: Kodi plugin [] 2.0.0

Posted: Tue Jan 22, 2019 10:44 pm
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.

Re: Kodi plugin [] 2.0.0

Posted: Tue Jan 22, 2019 11:31 pm
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!

Re: Kodi plugin [] 2.0.0

Posted: Wed Jan 23, 2019 11:28 am
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.

Re: Kodi plugin [] 2.0.0

Posted: Sun Jun 14, 2020 6:30 pm
by truderinger

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:


Thanks for an info. great thanks.

best regards

Re: Kodi plugin [] 2.0.0

Posted: Mon Jun 15, 2020 8:00 am
by truderinger
This is the answer, you need to add the following code to .htaccess in 3 places


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

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