(SOLVED, I think) Working ZMNinja on Raspbian and Zoneminder 1.28.1-8
(SOLVED, I think) Working ZMNinja on Raspbian and Zoneminder 1.28.1-8
So having a problem.
I followed all instruction that I could find to setup zoneminder 1.28.1 on my raspberry pi 2 B. Everything works. So trying to install api so that I can use zmninja. I followed the instructions, got a red band when I did http://localhost/zm/api, I followed the steps on the link for fixing that problem.
Now I type http://localhost/zm/api and I get:
The requested URL /usr/share/zoneminder/www/api/app/webroot/ was not found on this server.
I know I have just done something silly to mess this up, webroot is in the app directory, the permissions are correct, can someone point me in the right direction?
Also zmninja says login-validated but api failed, fyi.
I followed all instruction that I could find to setup zoneminder 1.28.1 on my raspberry pi 2 B. Everything works. So trying to install api so that I can use zmninja. I followed the instructions, got a red band when I did http://localhost/zm/api, I followed the steps on the link for fixing that problem.
Now I type http://localhost/zm/api and I get:
The requested URL /usr/share/zoneminder/www/api/app/webroot/ was not found on this server.
I know I have just done something silly to mess this up, webroot is in the app directory, the permissions are correct, can someone point me in the right direction?
Also zmninja says login-validated but api failed, fyi.
Last edited by gundark2 on Sat Jan 16, 2016 9:18 pm, edited 2 times in total.
api problems
Could anyone point me to where cake would publish any errors, i mean I have no idea whats generating this error and if more detail exists somewhere else?
-
- Posts: 494
- Joined: Sun Jun 29, 2014 1:12 pm
- Location: Melbourne, AU
Re: api problems
1.28.1 did not have the API, most people using zmninja have been using a master snapshot aka development version 1.28.99 and up. Upcoming 1.29.0 release is first one to have the API included in a release.
Pretty sure zmninja is using a hacked logon on the standard GUI to get a session hence why you get the logon working.
Pretty sure zmninja is using a hacked logon on the standard GUI to get a session hence why you get the logon working.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Random Selection of Cameras (Dahua and Hikvision)
Re: api problems
Yep, you need ZM 1.28.109 or 1.29. I know its possible to post-install the APIs into 1.28, but its too much hassle.
Since the APIs don't (yet) have a concept of a login, zmNinja logs into ZM (which does not need APIs, and therefore succeeds) and then uses that session information to access APIs (where it fails)
Since the APIs don't (yet) have a concept of a login, zmNinja logs into ZM (which does not need APIs, and therefore succeeds) and then uses that session information to access APIs (where it fails)
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: api problems
Thank you both for responding,
So in your experience do I need to wait until my distro has a package with a version with API support? I am pretty decent at the command line and can follow direction, though I have not ever successfully compiled anything from source. Been googling for a bit and am going to continue, just looking for advice.
Thanks,
Sean
So in your experience do I need to wait until my distro has a package with a version with API support? I am pretty decent at the command line and can follow direction, though I have not ever successfully compiled anything from source. Been googling for a bit and am going to continue, just looking for advice.
Thanks,
Sean
Much closer!
Ok, so I think I have made some good progress.
I used this page to enable testing and unstable repositories:
http://serverfault.com/questions/22414/ ... om-testing
Then I installed the unstable version of zoneminder 1.28.1-8:
sudo aptitude install cakephp/testing
sudo aptitude install libstdc++6/testing
sudo aptitude install zoneminder/unstable
Then enabled the zoneminder conf in apache2
sudo a2enconf zoneminder
I then followed the instructions on this page with a change, it would fail as I guess the new version on the server is 1.28.2 so anywhere it said 1.28 i made it 1.28.2 and that worked. I also paid close attention to make sure sense my file structure is a little different than these instructions that I got it right for raspbian
http://iain.rauch.co.uk/blog/2014-12/zo ... -1-28-api/
Now when i go to the browser "http://serverip/zm/api" I get the CakePHP screen, the first 4 bars are green and I have two yellows;
CakePHP is NOT able to connect to the database.
Database connection "Mysql" is missing, or could not be created.
and
DebugKit is not installed. It will help you inspect and debug different aspects of your application.
You can install it from GitHub
Man I feel like I am so close I can taste it, cake, will update you all if I get this going!!
Sean
I used this page to enable testing and unstable repositories:
http://serverfault.com/questions/22414/ ... om-testing
Then I installed the unstable version of zoneminder 1.28.1-8:
sudo aptitude install cakephp/testing
sudo aptitude install libstdc++6/testing
sudo aptitude install zoneminder/unstable
Then enabled the zoneminder conf in apache2
sudo a2enconf zoneminder
I then followed the instructions on this page with a change, it would fail as I guess the new version on the server is 1.28.2 so anywhere it said 1.28 i made it 1.28.2 and that worked. I also paid close attention to make sure sense my file structure is a little different than these instructions that I got it right for raspbian
http://iain.rauch.co.uk/blog/2014-12/zo ... -1-28-api/
Now when i go to the browser "http://serverip/zm/api" I get the CakePHP screen, the first 4 bars are green and I have two yellows;
CakePHP is NOT able to connect to the database.
Database connection "Mysql" is missing, or could not be created.
and
DebugKit is not installed. It will help you inspect and debug different aspects of your application.
You can install it from GitHub
Man I feel like I am so close I can taste it, cake, will update you all if I get this going!!
Sean
More progress
Hopefully this ends up working, still doesn't but hopefully it bugs no one that im trying.
So, I got cake to connect to the mysql database, again following the above directions and then:
cd /usr/src/zoneminder-1.28.2/web/api/app/Config
sudo nano database.php
Then go down to:
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'zmuser', * Make sure it looks like this!!!
'password' => 'zmpass', * Make sure it looks like this!!!
'database' => 'zm', * Make sure it looks like this!!!
'prefix' => '',
//'encoding' => 'utf8',
);
public $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
//'encoding' => 'utf8',
Now green bars, just still no zmninja love.
Sean
So, I got cake to connect to the mysql database, again following the above directions and then:
cd /usr/src/zoneminder-1.28.2/web/api/app/Config
sudo nano database.php
Then go down to:
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'zmuser', * Make sure it looks like this!!!
'password' => 'zmpass', * Make sure it looks like this!!!
'database' => 'zm', * Make sure it looks like this!!!
'prefix' => '',
//'encoding' => 'utf8',
);
public $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
//'encoding' => 'utf8',
Now green bars, just still no zmninja love.

Sean
Winning!!!!
ZmNinja is working!!!!!
so, after all of the above:
cd /usr/src/zoneminder-1.28.2/web/api/app/Controller
sudo nano HostController.php
Now paste in the contents of the file from the internet:
https://github.com/ZoneMinder/ZoneMinde ... roller.php
Same thing but with Statescontroller.php
And now things seem to be working for me, I can look at monitors, see live cam feeds.
Please let me know if any of this is useful to anyone, I suppose I could clean it up and make a howto if anyone was interested.
THANK YOU INTERNETS!!!!
Sean
so, after all of the above:
cd /usr/src/zoneminder-1.28.2/web/api/app/Controller
sudo nano HostController.php
Now paste in the contents of the file from the internet:
https://github.com/ZoneMinder/ZoneMinde ... roller.php
Same thing but with Statescontroller.php
And now things seem to be working for me, I can look at monitors, see live cam feeds.
Please let me know if any of this is useful to anyone, I suppose I could clean it up and make a howto if anyone was interested.
THANK YOU INTERNETS!!!!
Sean
Re: (SOLVED, I think) Working ZMNinja on Raspbian and Zoneminder 1.28.1-8
Are you the same person who sent me zmNinja logs? I guess its all solved now?
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: (SOLVED, I think) Working ZMNinja on Raspbian and Zoneminder 1.28.1-8
Think so,
Sorry again about that.
But thanks to your help I've made a huge ton of progress. I have gotten it down to the point where I have almost no errors poping up, and now I am just setting up zmeventnotification.pl and getting the certs all done. I have never got this involved with this stuff before but things just keep going well for me. I am going to try and commit to making a how to, as I think I owe it to the community for all your help.
Sorry again about that.
But thanks to your help I've made a huge ton of progress. I have gotten it down to the point where I have almost no errors poping up, and now I am just setting up zmeventnotification.pl and getting the certs all done. I have never got this involved with this stuff before but things just keep going well for me. I am going to try and commit to making a how to, as I think I owe it to the community for all your help.
Re: (SOLVED, I think) Working ZMNinja on Raspbian and Zoneminder 1.28.1-8
Hi gundark2,
I was wondering if you could give me a hand setting this up.
tried following your steps but I'm not sure.
more specifically what did you do exactly to get testing and unstable versions? tried using the link you posted but was unsure of which reply from the post to use...
for what I can see the rest of instruction are quite clear I think at the moment xD
I would be very grateful if anyone could give me any guidance on how to get this working.
Thanks.
I was wondering if you could give me a hand setting this up.
tried following your steps but I'm not sure.
more specifically what did you do exactly to get testing and unstable versions? tried using the link you posted but was unsure of which reply from the post to use...
for what I can see the rest of instruction are quite clear I think at the moment xD
I would be very grateful if anyone could give me any guidance on how to get this working.
Thanks.