HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: maccosx on June 16, 2015, 08:16:55 AM

Title: Web API Statistics Parameter list empty
Post by: maccosx on June 16, 2015, 08:16:55 AM
Hi,
when i try to GET the lists of parameter for which statistics are enable i have this output:

[
]

i'm pointing to this URL: http://192.168.1.5/api/HomeAutomation.HomeGenie/Statistics/Parameter.List (http://192.168.1.5/api/HomeAutomation.HomeGenie/Statistics/Parameter.List)

In the general maintenance configuration statistics are enabled. Is there other place where i should check?

Thanks
Title: Re: Web API Statistics Parameter list empty
Post by: bkenobi on June 16, 2015, 04:02:42 PM
I'm not sure, but this is what I see when I check:

Code: [Select]
[ 'Meter.Watts',
'Sensor.WattHours',
'Sensor.Humidity',
'Sensor.Winddir',
'Sensor.Windspeed',
'Sensor.Temperature',
'Sensor.Generic',
'Sensor.Rainfall'
]
Title: Re: Web API Statistics Parameter list empty
Post by: mvdarend on June 17, 2015, 07:19:18 AM
I have exactly the same problem, noticed it a few days ago when I couldn't check my stats any more. (See attachment.) Don't know how long it has been like this, I don't check the stats often.

I've tried a Database Reset (via Configure -> Maintenance) and also tried resizing the database.

Both restarting HomeGenie and Rebooting the Pi haven't helped.

Title: Re: Web API Statistics Parameter list empty
Post by: maccosx on June 17, 2015, 12:47:36 PM
I tried the same too...
Resetting and changing size of DB , reinstalling homegenie but nothing changed
Title: Re: Web API Statistics Parameter list empty
Post by: kevin1 on June 17, 2015, 01:56:21 PM
I updated to 491 couple days ago.  It is showing my parameters:

Code: [Select]
[ 'Sensor.Humidity',
'Sensor.Luminance',
'Sensor.Temperature',
'Sensor.Motion',
'Sensor.Door1',
'Sensor.Door2',
'Sensor.Leak1',
'Sensor.MaxOnTime',
'Sensor.SCPH',
'Sensor.SCPHI',
'Sensor.Sump',
'Sensor.DoorWindow'
]

However, I seem to have lost weather data :-(  I especially was using precipitation, but it is gone now :-(  Tried weatherbug and OpenWeather apps.
Title: Re: Web API Statistics Parameter list empty
Post by: bkenobi on June 17, 2015, 05:05:48 PM
Interesting.  I was able to get the stats the other day in <1 second.  I just tried now and FireFox is just sitting there spinning the progress wheel.  I checked because my statistics have stopped updating as of yesterday morning for no apparent reason.  I am running r492.  This may be a bug after all.
Title: Re: Web API Statistics Parameter list empty
Post by: rg2k on June 17, 2015, 10:05:33 PM
I have the same problem on my Raspberry Pi. It seems to have gone wrong when I adjusted the database size.
Title: Re: Web API Statistics Parameter list empty
Post by: bkenobi on June 18, 2015, 04:18:48 PM
Has anyone posted an issue on github so Gene sees this?

I submitted the issue:
https://github.com/genielabs/HomeGenie/issues/184
Title: Re: Web API Statistics Parameter list empty
Post by: mvdarend on June 18, 2015, 05:05:36 PM
Quote
Has anyone posted an issue on github so Gene sees this?

euhm no, sorry... I hadn't thought of that :-[ Thanks for doing it for us.
Title: Re: Web API Statistics Parameter list empty
Post by: bkenobi on June 19, 2015, 06:12:17 AM
I reset the database and fixed the parameters on my sensor MQTT script and it is now receiving data again.  I suspect that the database got too big and broke HG, but I don't know that for sure.
Title: Re: Web API Statistics Parameter list empty
Post by: mvdarend on July 12, 2015, 11:01:11 AM
I ended up doing a complete reinstall which fixed the problem.
Title: Re: Web API Statistics Parameter list empty
Post by: dani on July 12, 2015, 05:58:00 PM
If you don't want to make a complete reinstal just replace that file of the other post : http://www.homegenie.it/forum/index.php?topic=976.msg5968#msg5968 (http://www.homegenie.it/forum/index.php?topic=976.msg5968#msg5968)
Title: Re: Web API Statistics Parameter list empty
Post by: mvdarend on July 13, 2015, 04:09:19 PM
If you don't want to make a complete reinstal just replace that file of the other post : [url]http://www.homegenie.it/forum/index.php?topic=976.msg5968#msg5968[/url] ([url]http://www.homegenie.it/forum/index.php?topic=976.msg5968#msg5968[/url])

Thanks for that, if it happens again I'll try that.