Author Topic: Gateway v8.10.0 released!  (Read 15335 times)

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Gateway v8.10.0 released!
« Reply #15 on: November 06, 2017, 08:35:06 AM »
I am aware some folks reported event weirdness since 8.10.
I have not seen those particular issues on my end and I must say the upgrade must be done correctly and completely of all new files to ensure all parts communicate as expected. I would double check there first.
I am also not sure when I will have time to work on a new revision. I have more improvements and features I want to add but I have other important projects going on for a while.

rd909

  • NewMember
  • *
  • Posts: 18
  • Country: us
Re: Gateway v8.10.0 released!
« Reply #16 on: November 06, 2017, 08:46:25 AM »
ok I will take a look and see if I can figure it out. I will say that this happens on a brand new build, this was not an upgrade for me. I built a new gateway with a new Raspbian Stretch lite build.

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: Gateway v8.10.0 released!
« Reply #17 on: November 06, 2017, 06:06:25 PM »
Felix,

Other than following your directions (below) for upgrading, what else can one do to check if it was installed correctly?

If you update from a previous version, make sure to backup your Pi before you update.
This update will require 2 main manual actions from your part (if updating):
  •run  npm install  (should install new suncalc package)
  •restart app (  sudo systemctl restart gateway  )



Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Gateway v8.10.0 released!
« Reply #18 on: November 07, 2017, 08:13:45 AM »
sparky,
That's what I usually do and it seems to work just fine. However I always double check that the files are what they should be (time and size). Since the database files didn't change in any way, all I worry about is the index.html for the frontend (and any graphics but those are not critical) and all the backend .js files (including settings.json5).

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: Gateway v8.10.0 released!
« Reply #19 on: November 07, 2017, 08:32:05 AM »
So if the "Changed files" all have a current date the install should be ok?

Changed files:
  •gateway.js
  •metrics.js
  •settings.json5 (requires manual migration of your own settings)
  •package.json ( run  npm install  for new suncalc package )
  •www\images\icon_template.cdr - added battery icon
  •lowbattery.png warning icon
  •www\index.html (main UI front end)


rd909

  • NewMember
  • *
  • Posts: 18
  • Country: us
Re: Gateway v8.10.0 released!
« Reply #20 on: November 07, 2017, 12:11:14 PM »
I did some more testing and un-commented the console logging for the UPDATENODEEVENT event in gateway.js, and I can see when it creates the new event. It just disappears on its own, but I noticed that it happens when the garage poll runs (every 30 seconds). I can even see it create the entry in the DB file when it creates the new event, and also after it gets removed, but I can’t see what is actually removing it. It’s kind of like it is writing it to the DB but not updating in memory? I don’t know. Another interesting thing is I just added a new event to my garagemote, then quickly restarted the gateway service. After the restart, the new event is still there. I noticed in gateway.js that it reads from the dB to determine the events that it needs to schedule, so I thought since it was writing it to the dB that maybe it would persist after a restart. Sure enough it does, but I don’t know why yet. Just sharing my findings.

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: Gateway v8.10.0 released!
« Reply #21 on: November 07, 2017, 07:59:10 PM »
I did some more testing and un-commented the console logging for the UPDATENODEEVENT event in gateway.js, and I can see when it creates the new event. It just disappears on its own, but I noticed that it happens when the garage poll runs (every 30 seconds). I can even see it create the entry in the DB file when it creates the new event, and also after it gets removed, but I can’t see what is actually removing it. It’s kind of like it is writing it to the DB but not updating in memory? I don’t know. Another interesting thing is I just added a new event to my garagemote, then quickly restarted the gateway service. After the restart, the new event is still there. I noticed in gateway.js that it reads from the dB to determine the events that it needs to schedule, so I thought since it was writing it to the dB that maybe it would persist after a restart. Sure enough it does, but I don’t know why yet. Just sharing my findings.

I was not having that issue until I decided to add the "Garage Poll".  Deleting the "Garage Poll" and then quickly (under 30 sec's) restart the UI would the issue stop.   :(

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Gateway v8.10.0 released!
« Reply #22 on: November 08, 2017, 08:43:40 AM »
Ok it sounds like the events needs a serious look.

sparky, can you rephrase this statement, I am not sure I understand the exact order of what's happening (and I assume this is the stock Garage Poll):

Deleting the "Garage Poll" and then quickly (under 30 sec's) restart the UI would the issue stop.   :(

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: Gateway v8.10.0 released!
« Reply #23 on: November 08, 2017, 07:34:16 PM »
Felix,

Sorry for the confusion.

I made a video of the different scenarios to better explain what's going on.  At the start of the video you will see two events that I created a few versions back.  There has never been any issues like I'm having now when I deleted or added any events.  The issue started when I added your stock Garage poll event.

It's a rather long video but I had to wait the 30 sec's between each scenario or action.

https://www.dropbox.com/s/aqhq0mpvy03bq3q/20171108_114414.mp4?dl=0

Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Gateway v8.10.0 released!
« Reply #24 on: November 10, 2017, 10:15:21 AM »
The video makes it easy to see what's going on, thank you for recording it!
So it's the garage poll that's doing something strange. I can reproduce on my end and will look into it.

sparky

  • Sr. Member
  • ****
  • Posts: 296
  • Country: us
Re: Gateway v8.10.0 released!
« Reply #25 on: November 10, 2017, 01:28:59 PM »
Thanks Felix,
I don't think it's just the garage poll event.  Earlier in this thread I made a video of my doorbell mote with similar issues.  Thanks for looking into it.

jackkomo

  • NewMember
  • *
  • Posts: 7
Re: Gateway v8.10.0 released!
« Reply #26 on: April 26, 2018, 11:10:45 PM »
Hello, all!
Many thanks to Felix for  the beautiful Gateway Project. 

i installed the gateway by using commands, it's  works well. But if i use Pre-built Pi image, the PI-3 can not work, only show a image on the display.

Why?   :-*

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: Gateway v8.10.0 released!
« Reply #27 on: April 26, 2018, 11:44:25 PM »
Hello, all!
Many thanks to Felix for  the beautiful Gateway Project. 

i installed the gateway by using commands, it's  works well. But if i use Pre-built Pi image, the PI-3 can not work, only show a image on the display.

Why?   :-*
Pre-built Pi image is deprecated as far as I know and script is the way to go

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Gateway v8.10.0 released!
« Reply #28 on: April 27, 2018, 08:44:36 AM »
Any older images might not work and are indeed deprecated, are left there for reference. THey might work on older Pis.
Use the setup.sh script to install the latest version of the Gateway.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Gateway v8.10.0 released!
« Reply #29 on: October 26, 2018, 02:17:39 PM »
sparky - the polling event bug should now be fixed, sorry it took so long!
Just get the latest gateway.js, see the commit changeset for the actual changes.