more G-Labs products

Author Topic: Statistics not working  (Read 2055 times)

January 11, 2016, 11:08:51 PM
Read 2055 times

perruca

  • *
  • Information
  • Newbie
  • Posts: 5
Hi!

Statistis are not working for me, I only obtain the loading image... (attached)

How can I do?

Thanks!

Nacho.-


February 27, 2016, 06:31:30 PM
Reply #1

Olav

  • *
  • Information
  • Newbie
  • Posts: 6
I have the same problem, running latest version on pi. Any ideas? Except from that I find Homegenie to be flexible and a great piece of ha software, thanks Gene!

February 29, 2016, 01:30:36 PM
Reply #2

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
This is not much help, but I use the statistics regularly on r505.  Have you tried to reset statistics?  Go into config-maintenance-statistics-database reset?  I have not had to do this.  I am leary of upgradig since r505 is working pretty well for me and I have a nice statistics database of 2+ months I don't want to lose in upgrade.

February 29, 2016, 08:35:17 PM
Reply #3

Olav

  • *
  • Information
  • Newbie
  • Posts: 6
Thanks for the reply!
I actually tried both resetting statistics and reinstalling HG(recovering backup). Maybe broken in the lates rev, or something in my setting breakin it? Can't find any error msg in the log, don't know if there are other ways to troubleshoot this?

March 01, 2016, 09:34:46 PM
Reply #4

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Hi,
Now backup files contains a backup of the statistics database ... So the restore of a backup zip file can create again the bug in database statistics.

To be sure, you can try to use the factory statistics DB, by replacing your homegenie_stats.db in HomeGenie dir by https://github.com/genielabs/HomeGenie/blob/master/HomeGenie/homegenie_stats.db

Bye

March 23, 2016, 03:09:13 PM
Reply #5

OldWizard

  • *
  • Information
  • Newbie
  • Posts: 5
For me the problem has always been localisation. If I change the primary language in my browser to English the stats work after a page reload (perhaps clear cache).
My primary language is otherwise "sv" in Chrome, but the localisation file is called "sv-SE" and so there is no lanugage data as the web app expects and stats shows the loading spinner forever.

Bring up your developer console (press F12) and copy the output and paste it here. For me it states:

    jqm-datebox.core.js:379 Uncaught TypeError: Cannot read property 'dateFieldOrder' of undefined

Setting a breakpoint there  shows that `o.lang['sv-SE']`exists, but not `sv`which this.options.useLang is equal to.
Will try to submit a pull request for this bug.

March 23, 2016, 08:48:24 PM
Reply #6

Olav

  • *
  • Information
  • Newbie
  • Posts: 6
Thanks! Changing localization to english seem to get me one step further, the page loads. However the graph does not show up, only a white stat-screen. Also, seems I can not choose which parameter to draw graph from when I press Options (only module name and Hour/Day).

TypeError: Cannot read property '1' of undefined(…)
index.html:7746 LOCALIZATION ERROR "analyze_delete_stat" NOT FOUND!!!
index.html:7746 LOCALIZATION ERROR "configure_system_hostheaderis" NOT FOUND!!!
index.html:7746 LOCALIZATION ERROR "configure_system_hostheaderchange" NOT FOUND!!!
index.html:7746 LOCALIZATION ERROR "configure_system_temperature" NOT FOUND!!!
index.html:7746 LOCALIZATION ERROR "configure_system_dateformat" NOT FOUND!!!
index.html:7746 LOCALIZATION ERROR "configure_system_hostheaderheading" NOT FOUND!!!
index.html:7746 LOCALIZATION ERROR "configure_system_hostheaderchangenote" NOT FOUND!!!
index.html:7746 LOCALIZATION ERROR "configure_system_hostheadercancel" NOT FOUND!!!
index.html:7746 LOCALIZATION ERROR "configure_system_hostheaderchange" NOT FOUND!!!
index.html:2487 Uncaught TypeError: Cannot read property 'substring' of null
index.html:6893 Uncaught TypeError: Cannot read property 'substring' of null
index.html:2954 Uncaught TypeError: Cannot read property '0' of undefined
index.html:6893 Uncaught TypeError: Cannot read property '0' of undefined
index.html:2818 TypeError: Cannot read property '1' of undefined(…)

April 04, 2016, 09:45:16 PM
Reply #7

Olav

  • *
  • Information
  • Newbie
  • Posts: 6
Looks like the problem was corrupt db-file as well!
After replacing db file with factory default file and making sure browser localization was correct everything seems to work! Thanks to nolio and OldWizard!