You can now check the new features/fixes and upgrade instructions in the last release(s) here: https://github.com/LowPowerLab/RaspberryPi-Gateway/releases
As always:
- make sure to back up your data before you do an upgrade to ensure there is no loss in case something goes wrong.
- report any issues here or submit a PR in github
Quote from: Felix on October 21, 2016, 09:18:44 AM
You can now check the new features/fixes and upgrade instructions in the last release(s) here: https://github.com/LowPowerLab/RaspberryPi-Gateway/releases
Looks very nice. I didn't see any mention of Pi-3 in the release notes, so I'm guessing Pi-2 remains the platform of choice?
Thanks :)
Although the software stack itself has nothing to do with what version of Pi you use, the Pi-Gateway install guide is tailored for Pi2 (raspbian-wheezy), that's something I badly want to upgrade, but I wanted to roll out a set of changes until that happens. I still have many more improvements and cool features I want to add. But I'm at a point where an install guide/script that is Pi2-Pi3 friendly is possible.
One thing I am pondering is whether I should just do a script and scrap the step-by-step guide since that is so labor intensive to keep updated and also prone to error since wordpress is not that uber code-typing friendly and many times characters got changed (simple example: tick to quote) which messes up code snippets where this is really important.
Hello Felix!
I've updated to v8.8 but I noted a strange issue. While it works OK with Mozilla Firefox, Chrome (and my Android phone's web browser) gives me an error in index.html at line 816:
function metricsValues(metrics, ignorePin = false) {
I changed it to
function metricsValues(metrics, ignorePin ) {
and this way I'm able to correctly load the Gateway. I don't know if my change affects other functions of the Gateway in any way though ...
When packages.json is updated and the npm update command is run, will the current gateway software (8.5) still work? Or will the software be broken until the rest of the changes are made?
The answer is the gateway software still works after upgrade.
I was able to get version 8.8 up and running. I like how I can separate my metrics out. This should make updates much easier. Thanks Felix.
Quote from: Kylix on October 22, 2016, 10:21:59 AM
I noted a strange issue. While it works OK with Mozilla Firefox, Chrome (and my Android phone's web browser) gives me an error in index.html at line 816:
function metricsValues(metrics, ignorePin = false) {
What was the error?
I don't get anything like this in chrome. Basically that's a default parameter -- http://stackoverflow.com/questions/894860/set-a-default-parameter-value-for-a-javascript-function
http://imgur.com/xcFHl8C (http://imgur.com/xcFHl8C)
Equality operator ( == ) not assign ( = )?
Kylix - I don't see the missing link between the == and the metricsValues() function ???
The released code is this:
function metricsValues(metrics, ignorePin=false) {
Where do you see a == in that?
My fault ...
http://imgur.com/a/BQPiW (http://imgur.com/a/BQPiW)
Ok so this is your own changed version of my gateway, correct?
Is this for personal use?
It's basically your version of the gateway (it was upgraded from v8.5; I only changed the logo)
I got the error even before making any change to the original code.
Yes, it's for personal use and I'm not trying to sell your gateway. Just noted that error and reported ...
I also noted another small error:
http://imgur.com/a/wK4ta (http://imgur.com/a/wK4ta)
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.
I just updated to this version and everything seems to run smooth except a little issue with the memory calculations. The second calculation always returns NaN and i cannot find the place where to fix that :-\
It's probably this line in "index.html":
$(graphStat).html(rawData.graphData.msg != undefined ? rawData.graphData.msg : (rawData.graphData.data.length + (rawData.graphData.totalIntervalDatapoints != rawData.graphData.data.length ? ' / '+rawData.graphData.totalIntervalDatapoints : '') +'pts ('+ rawData.graphData.queryTime+'ms) ('+humanFileSize(rawData.graphData.totalIntervalDatapoints*9)+'/'+humanFileSize(rawData.graphData.logSize)+')'));
->
humanFileSize(rawData.graphData.logSize)
Quote from: Scram on October 25, 2016, 11:41:06 AM
I just updated to this version and everything seems to run smooth except a little issue with the memory calculations. The second calculation always returns NaN and i cannot find the place where to fix that :-\
Someone else reported this, so I will look into it more but at a first glance I cannot replicate it.
Did you update all the .js files?
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!).
@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.
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 (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 (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)
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.
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 };
You nailed it @ssmall. It's working now.
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 (https://github.com/LowPowerLab/RaspberryPi-Gateway/releases/tag/v8.8) is updated to include this change.
Thanks for the patience and helping fix this.