LowPowerLab Forum

Software support => Pi Gateway => Topic started by: Lensdigital on September 12, 2015, 07:03:48 PM

Title: Stuck at loading graph
Post by: Lensdigital on September 12, 2015, 07:03:48 PM
I had gateway.js running with connected sensor for about 24 hours now.
I see files in db folder, but when I clean on specific metric (i.e. temperature) I get "graph loading..." bar that stays there forever? Did I miss something during installation (I installed all components separately)?
Title: Re: Stuck at loading graph
Post by: Felix on September 14, 2015, 08:41:23 AM
Can you open the browser F12 window and see if there are any javascript errors?
Also on the server can you open the console output log (same directory as gateway.js) and scan for any errors?
Title: Re: Stuck at loading graph
Post by: Felix on September 14, 2015, 11:12:15 AM
There was a bug in  index.php (https://github.com/LowPowerLab/RaspberryPi-Gateway/blob/master/_ClientSideUI/index.php), can you get latest and please try again?
Title: Re: Stuck at loading graph
Post by: Lensdigital on September 16, 2015, 12:05:13 PM
Thanks, I'll try it tonight!
Title: Re: Stuck at loading graph
Post by: Pacif13r on September 16, 2015, 06:14:21 PM
Hi Felix,

I'm getting the same problem even with the latest index.php.

ReferenceError: graphView is not defined
https://192.168.1.5/
Line 820 : graphView.resetDomain();


Thanks,
Justin
Title: Re: Stuck at loading graph
Post by: Lensdigital on September 16, 2015, 08:53:51 PM
Quote from: Felix on September 14, 2015, 08:41:23 AM
Can you open the browser F12 window and see if there are any javascript errors?
Also on the server can you open the console output log (same directory as gateway.js) and scan for any errors?
It's working now!
It couldn't find graphHelper.js in the root website directory. So I moved it there from JS subfolder.  Now I can see graph, how cool! And I copied new index.php file as well!

BTW is there any way to display temperature in Fahrenheit?
Title: Re: Stuck at loading graph
Post by: Felix on September 17, 2015, 10:44:01 AM
Yes of course, the metrics are already doing that. The question is not clear to me...
Title: Re: Stuck at loading graph
Post by: Lensdigital on September 17, 2015, 11:52:12 AM
It only shows temperature converted to Celsius for me. For example I'm sending
[34]  C:20 F:68 H:50   [RSSI:0]

But Website displays 20°

Edit: Never mind I found a way to fix it in the metrics file :)
F : { name:'F', regexp:/F\:(-?\d+)/i, value:'', unit:'F°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature' }},