Gateway v8.8 released!

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

Felix

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


WhiteHare

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?

Felix

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.

Kylix

#3
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 ...

ssmall

#4
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.

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


perky

Equality operator ( == ) not assign ( = )?

Felix

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?


Felix

Ok so this is your own changed version of my gateway, correct?
Is this for personal use?

Kylix

#11
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

Felix

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.

Scram

#13
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)

Felix

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?