Timeline not working

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
agw
Posts: 9
Joined: Mon Sep 22, 2014 12:28 pm

Timeline not working

Post by agw »

Hi all, have a working zoneminder with 5 cams since some years back. Installed zmNinja app on my iPhone some months ago and I can't get the timeline to work. Live view (montage) is fine but when I press Timeline nothing happens. Tried to run zmNinja on my win10 with the same behaviour.

The log shows **exception** but I can't really understand what to look for.

Nov 4, 2016 10:16 AM INFO multi server list loaded{"servers":[]}
Nov 4, 2016 10:16 AM DEBUG **EXCEPTION**TypeError: Cannot read property 'pageCount' of undefined caused by undefined
Nov 4, 2016 10:16 AM INFO Monitor load was successful, loaded 5 monitors
Nov 4, 2016 10:16 AM DEBUG Now trying to get multi-server data, if present
Nov 4, 2016 10:16 AM DEBUG TimelineCtrl/drawgraph: graphLoaded:false

API works, and I upgraded ZM from 1.29 to 1.30 yesterday with the same result.

Please advise.

BR
/AGW
Attachments
timeline.PNG
timeline.PNG (8.69 KiB) Viewed 5658 times
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Timeline not working

Post by asker »

That error almost always means your APIs are broken.

How exactly did you upgrade, which instructions did you follow and which Distro?

Try this:
a) Open a browser, login in
b) Open a tab in the SAME browser, and do a

Code: Select all

http://<server>/zm/api/events.json
(replace server and path as needed)

Please post the output (preferably as a gist)
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
agw
Posts: 9
Joined: Mon Sep 22, 2014 12:28 pm

Re: Timeline not working

Post by agw »

Ok, http://<server>/zm/api/events.json doesn't work at all, nothing happens.

http://<server>zm/api/host/getVersion.json
Gives me:
{
"version": "1.30.0",
"apiversion": "1.0"
}

Same behaviour before and after the upgrade. I stated that API works in my first post but that was based on the output from zm/api/host/getVersion.json

I'm running Ubuntu 14.04.5 LTS (GNU/Linux 3.19.0-25-generic x86_64)

/A
agw
Posts: 9
Joined: Mon Sep 22, 2014 12:28 pm

Re: Timeline not working

Post by agw »

http://<server>/zm/api/
Attachments
api.PNG
api.PNG (59.77 KiB) Viewed 5607 times
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Timeline not working

Post by asker »

I need to see the output of the events API, not just /api
thx
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
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Timeline not working

Post by asker »

Ah you said:

Code: Select all

http://<server>/zm/api/events.json doesn't work at all, nothing happens.
I think I know what may be going on.
Edit /usr/share/zoneminder/www/api/app/Config/database.php

and uncomment the 'encoding' => 'utf8' line in the DATABASE_CONFIG for $default
It should look like this:

Code: Select all

class DATABASE_CONFIG {

    public $default = array(
        'datasource' => 'Database/Mysql',
        'persistent' => false,
        'login' => ZM_DB_USER,
        'password' => ZM_DB_PASS,
        'database' => ZM_DB_NAME,
        'prefix' => '',
        'encoding' => 'utf8',
    );
Then try the events API again
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
agw
Posts: 9
Joined: Mon Sep 22, 2014 12:28 pm

Re: Timeline not working

Post by agw »

Thanks! Problem solved!

BR

/AGW
Post Reply