Author Topic: Securing and stabilizing the Vera by taking it off the grid  (Read 15434 times)

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #120 on: November 04, 2018, 01:48:14 am »
Attached is the undo script.

To use it, upload to vera and do

Code: [Select]
chmod +x UnModVera.sh
./UnModVera.sh
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Online HSD99

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +11/-0
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #121 on: November 04, 2018, 12:57:16 pm »
Thanks for the undo script! 

Things are running fine, but this test unit is lightly loaded, so I'll add some devices over the next few days to make the test more useful.

FYI, ALTUI shows a Z-Wave heal occured at 1:00AM today. I'll keep an eye on this.

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #122 on: November 04, 2018, 11:39:07 pm »
Interesting that you still have a nightly heal. I had a luup reload at 1am this morning due to the daylight saving time change and I was expecting it. The luup engine does not like time changes. I have gotten to the point of wondering if it actually also reloads when there is an ntp time adjustment...
This is such a poor design. Imagine a plane rebooting its engine and instruments mid air because its clock time drifted or because it lost communication with its black box... This is exactly what the vera does. Why would one allow a peripheral function in your software to trigger a full reboot of the system?
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #123 on: November 08, 2018, 12:55:57 pm »
Thanks for the undo script! 

Things are running fine, but this test unit is lightly loaded, so I'll add some devices over the next few days to make the test more useful.

FYI, ALTUI shows a Z-Wave heal occured at 1:00AM today. I'll keep an eye on this.

Let me know how things are going. I am still not seeing any nightly heal on my unit. I don?t know how it got disabled. It might be in the zwave stick with something I did with another controller but I thought it was triggered by the controller and not by the zwave chip. After the reboot of the 1st second of the month, I have not had any reload. I have since done some more tweaking of the service LED behavior so it better follows the luup engine status. I also upgraded all the non kernel packages of OpenWRT on my unit which include lighttpd, which is the webserver, OpenSSL, busybox and lua libraries. It took some tweaking (symbolic links) of the library files. The Vera Plus is running on a version of OpenWRT which officially does not support it?s CPU (MT7621ST). It is supposed to support the older CPU of the vera edge MT7620 but I guess they are similar enough that they can share the same packages. The kernel is very old...
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Online HSD99

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +11/-0
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #124 on: November 08, 2018, 03:01:23 pm »
It still shows a nightly heat at 1:00AM. Does it log the start or the end of the heal?  I'm heading out of the country on business and won't be able to play around with this for a couple of weeks.

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #125 on: November 08, 2018, 05:28:50 pm »
It looks like it marks the start... I can?t imagine it finish every night at the same time.
I am on business travel overseas myself.
I played around with a second test unit and found out that the log rotation is a very large contributor to the reloads either by running out of memory while rotating logs or from the script itself calling for a reload when the rotation fails or when it lost its network monitor.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Online sebby

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-3
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #126 on: November 09, 2018, 08:46:39 am »
Hi rafale,
i notice that you do all your external integration (Alexa, Sonos, etc.) through either HA or OpenLuup.  For those of us that may not want to roll out multiple systems and only want something like the native Alexa integration, do you know where in the scripts you modified MIOS hid those settings?

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #127 on: November 09, 2018, 11:18:17 am »
Actually the Alexa integration may still work after my mod. The sonos one for sure does. I am isolating my vera from the internet only through my firewall and only one way. Meaning nothing on the internet can initiate a call to the vera but the vera can reach the internet because of the event server problem I described previously.

All the local integrations like sonos work for sure. Alexa is going through the habridge at the point for me and I don?t know whether it relies on the mios server (cloud to cloud, Alexa device ->amazon server ->mios API server or ra sever->vera) or whether it connects directly to the amazon server from the unit. If it does call the mios servers there can be many:
The MIOS_Rest_api maybe one, the cmh_ra+tunnels_manager would be the other (remote access tunnel). You could then delete these two files before running the script.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Online sebby

  • Sr. Member
  • ****
  • Posts: 269
  • Karma: +9/-3
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #128 on: November 09, 2018, 12:03:09 pm »
I'll check those files.  i ran the script and the native alexa stopped working.  i ran the undo script and everything was back to normal.  it must rely on the MIOS servers for some of the integration.  THanks for providing all this!

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #129 on: November 12, 2018, 04:50:07 pm »
After a week just got a luup reload corresponding to the time of a daily zwave data backup triggered by my remote server. I am guessing that it either locked up the LuaUPnP for too long or that the system ran out of memory while doing it. I am going to try increasing the cache memory cache dump frequency.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline Jamr

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +28/-8
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #130 on: November 15, 2018, 11:53:37 am »
I apologize for this as I am sure you are aware of this and probably has been discussed in this thread but just finding this out about this is a little depressing as I do want true internet independence.
Apparently our Vera's do not have a built in clock and thus can not schedule any automation when it is not on line.
As I would like to create some automation that is internet independent, I was just wondering how you guys are overcoming this?

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #131 on: November 15, 2018, 11:59:00 am »
I apologize for this as I am sure you are aware of this and probably has been discussed in this thread but just finding this out about this is a little depressing as I do want true internet independence.
Apparently our Vera's do not have a built in clock and thus can not schedule any automation when it is not on line.
As I would like to create some automation that is internet independent, I was just wondering how you guys are overcoming this?

No need to apologize. I may even include this in my mod script but I did this such a long time ago...

http://forum.micasaverde.com/index.php?topic=33038.0

The vera (re)sets the time 5 times everytime it boots as I explained in this thread

http://forum.micasaverde.com/index.php?topic=108394.0


 
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #132 on: November 19, 2018, 01:12:16 pm »
Going on 9th day without a Luup reload. I think the only unwanted luup reloads left are the time change and 1st of the month and zwave related ones.

And oddly I am also not seeing any nightly heal for the past month which is making my zwave network very happy and stable. I still don't know how I disabled it though.
« Last Edit: November 19, 2018, 01:14:49 pm by rafale77 »
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Online HSD99

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +11/-0
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #133 on: November 19, 2018, 02:52:01 pm »
Still seeing the nightly heal. I wonder what's different?

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1414
  • Karma: +71/-24
Re: Securing and stabilizing the Vera by taking it off the grid
« Reply #134 on: November 19, 2018, 04:57:42 pm »
One thing I am speculating on the nightly heal:

My vera is a secondary controller on my network. Because of the HUBZB stick I am using with home-assistant, which I believe the firmware is preventing from being a secondary, I monkeyed around the network (with primary shifts) to have home-assistant/openzwave as the unique primary and SUC/SIS. (I have 3 controllers on my network). When I loaded home-assistant, I set it up with autoheal disabled around the date it stopped the nightly heal. This may have sent a signal to the entire network including the vera.

I was convinced that the nightly heal was a function called by the luup engine and not self driven by the zwave chip but I might be wrong. It could be also that my previous nightly heals were triggered by home assistant and that I had no vera caused nightly heal since it was a set as a secondary.
« Last Edit: November 19, 2018, 05:03:33 pm by rafale77 »
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!