Gateway v8.8 released!

Started by Felix, October 21, 2016, 09:18:44 AM

Kylix

Quote from: Felix on October 25, 2016, 07:59:48 AM
Thanks but when you report an error I can't find the root problem if you don't help me with more information/details about the error. For ex. how does that error happen, in what circumstances, etc. I will fix it for you if you give me everything i need to know.
The other error about the "==" is not even an error since that's not code that I released, apparently it's something you modified.
My overall impression is you may be running a gateway app that's out of sync with the front UI.

Felix, in the end it proved to be only a browser setting/cache issue. I installed the latest Chrome version for desktop, restored the settings and it works (I did the same thing on my Android phone and it also works!).

Felix

@Kylix - great!
How about the NaN/undefined error in the graph status? Still getting that? See Scram's post on the 1st page, he reported the same thing. I cannot generate that error on my setup.

Kylix

#17
Unfortunately, I still get that NaN/undefined error.
I did another test: installed it all again from scratch, on a new microSD card and I get the same error. The steps I took for installing:
1. Transfered your pre-built image v8.1 downloaded from https://drive.google.com/open?id=0B89HtwH5i2d0OTVBYko0YkgyVzA
2. Connected with WinSCP and erased all the files/folders from the gateway folder, maintaining the log and data folders
3. Copied the files/folders from the new gateway update (v8.8 ) to the "gateway" folder (v8.8 downloaded from here: https://github.com/LowPowerLab/RaspberryPi-Gateway/archive/v8.8.zip)
4. Connected in SSH and changed the directory to /home/pi/gateway
5. npm install
6. restarted the Gateway

I'm using a Raspberry Pi 2 with MightyHat and RF69HW module.

The error is related to "logSize"  in here: humanFileSize(rawData.graphData.logSize)

Scram

I did not install from scratch and also did quite some modifications within the gateway.js file as I'm controlling stuff mainly through Telegram. But actually everything except this works fine so I don't think I broke it. But I don't bother as I did not need that information anyway I just removed it so problem is gone for me  ;D Anyway if you want me to test out something I'll do, no problem.

ssmall

I am having the same issue with my gateway.  I installed all of the .js files and the .html file.

In gateway.js the event:   socket.on('GETGRAPHDATA', function (nodeId, metricKey, start, end, exportMode) {
I put the following just after  dbLog.getData call
console.log(Object.getOwnPropertyNames(graphData))

I receive the following output:
[ 'data', 'queryTime', 'totalIntervalDatapoints' ]

It appears that graphData does not have a logSize property.

I looked in logUtil.js at the getData function and it looks like the return statements are missing logSize
I modified the return statements to the following and that seems to work:
return {data:data, queryTime:(new Date() - ts), totalIntervalDatapoints: (posEnd-posStart)/9+1, logSize: filesize };

Kylix

You nailed it @ssmall. It's working now.

Felix

You guys rock, I have no clue how I missed that file in the initial v8.8 commits.
It's now published and the v8.8 release is updated to include this change.
Thanks for the patience and helping fix this.