1.8 Alpha - Statistics Response

When the API returns results for ‘api/stats’ I see this:

array (size=1)
  0 => 
    array (size=15)
      'type' => string 'media' (length=5)
      'Display' => string 'PROTO1' (length=6)
      'Layout' => string 'TEST' (length=4)
      'Name' => string 'image' (length=5)
      'NumberPlays' => string '92' (length=2)
      'Duration' => string '918' (length=3)
      'MinStart' => string '2015-10-04 20:37:02' (length=19)
      'MaxEnd' => string '2015-10-04 20:53:39' (length=19)
      'display' => string 'PROTO1' (length=6)
      'layout' => string 'TEST' (length=4)
      'media' => string 'image' (length=5)
      'numberPlays' => int 92
      'duration' => int 918
      'minStart' => string '2015-10-04 20:53:37' (length=19)
      'maxEnd' => string '2015-10-04 20:53:37' (length=19)

It looks like everything is returned twice, except for the ‘type’. Will some of these be removed? If I compare it to the documentation it looks like ‘Display’, ‘Layout’, ‘Name’, ‘NumberPlays’, ‘Duration’, ‘MinStart’, and ‘MaxEnd’ are the incorrect ones. However ‘maxEnd’ is being returned incorrectly and looks to be set to the same as ‘minStart’. ‘MaxEnd’ does show the correct value.

I think I see the issue here and have reported this bug:

You can find a workaround inside.

I know that stats were working for us before. Somewhere they seemed to have stopped.

I know I posted about this in another thread and I feel like I am missing something. When we try to get stats through the API we get a status 200 and “” for the response.

So we tried it via the url:
https://www.abc.com/xibo18alpha/web/api/stats?access_token=a6oiPVSbP9ob67fy9Ugemd3px5CeTUxCNDZSWO4O

and all we got back was “” as well.

Did we get the url formed correctly?

Log:

86354	01c6b0e	2015-12-02 17:48	API	GET	DEBUG		/stats	Converted Times received are: FromDt=2015-12-01 17:48:49. ToDt=2015-12-02 17:48:49
86353	01c6b0e	2015-12-02 17:48	API	GET	DEBUG		/stats	Loading 1. All Objects = 0

And we do see data in the CMS of 1.8 Alpha. Just seems puzzling that this seems to come and go.

UPDATE
We added an older 1.7 R54 device to the CMS and it does show us the stats from that. (I thought that wasn’t possible any more. When we last tried a 1.7 R56 we could not do so.) The R57 version stat data is not showing on the API or in the CMS. I can’t explain it; I can only think that R57 change something within the logs??

UPDATE 2: We updated the device that was running R54 to R57 and the stats from that device stopped showing up. Which doesn’t make any sense due to what we experience a while back:

OK, so when you switched to the new develop code you effectively switched to alpha2 - which incremented the XMDS version up to v5 as there are extra parameters required.

To go alongside that you will need R57 of Xibo for Android, which fixes a problem with earlier versions and XMDS versions above v4.

For me this highlights the importance of always pairing the latests versions of everything when testing.


As for your actual issue now - I am totally confused what the problem is?

Yes agreed, however we were using the latest code and the latest Android version, R57. This is when we noticed the stats stopped being abled to be displayed in the CMS and via the API.

This was done to check if R57 changed the way the stats were recorded; and it seems to prove that, and you confirmed that for us. However, it also showed us that at least R54 stats were recorded and did show up in the CMS and also via the API, while the R57 stats did not.

We reloaded everything again, to try and make sure the problem was not on our side, however we can’t continue testing until this bug/problem(??) we ran into is fixed.

Problem on this topic at the moment is that with the latest build and version R57 of the Android client, we are not sure if the stats are being recorded to the database. If they are, then it seems the CMS and the API cannot retrieve them.

I will run some tests against R57 today and confirm whether stats are being recorded or not.

I see the problem now - we will build a R58 which is fully legacy mode compatible with 1.8 (and backwards compatible of course).

Any idea of when R58 might come?

Update: Well… looks like today is that day.

Thank You Dan.

1 Like

Dan,

We have patched the 1.8 pre-alpha2 with the various patches you release today. Also installed the R58 version. Now we do see stats being stored in the database, but still we do not see them within the CMS. (We do now see them via the API)

Also some other interesting things are happening on the Stats screen within the CMS. We have one screen that is down. The disconnect time is rather odd. Please see the screen shot:

Yeah, that downtime is rather odd - I will look into that when I can.