We have moved at community.getvera.com

Author Topic: Best way to get a luup engine corruption?  (Read 352 times)

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Best way to get a luup engine corruption?
« on: August 13, 2018, 11:13:29 am »
From time to time, I have my Vera Edge that sits doing nothing. An hard reboot is sufficient (I implemented a HS100 from TPLink with a custom C# script to query the device every 15 minutes, and in case of 3 consecutive errors, reboot it automatically). So far, it's doing great, it rebooted a couple of times the Vera when it stuck.

Yesterday I had the same error (cannot write user data) and I had the magic reboot, but the luup engine was corrutped and it has not restarted, so I got no scene executing at all.
I had to enter the startup code section and run it again by hand, and everything was working after that.

In the past I tried various techniques in order to catch it, since the scenes are executing fine, and my repeating every 15 minutes scenes is running anyway (even if errors, while attempting to execute global functions).
I tried to access some code running at startup in a xpcall, but it's not working as I expected.

Anyone got something better?
I still plan to move part of my logic to openluup to improve stability, but I know I need the luup engine to be OK for some real time scene to be successfully,

Thanks.
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Best way to get a luup engine corruption?
« Reply #1 on: August 13, 2018, 11:28:22 am »
I have been desperately trying to stabilize my vera. It looks to me like your vera is writing something in your storage and eventually crashes the luup engine. See my experience here
http://forum.micasaverde.com/index.php/topic,101078.0.html

openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Best way to get a luup engine corruption?
« Reply #2 on: August 13, 2018, 11:33:22 am »
I saw all your posts, and your work is awesome. I think my problems are very similar to yours. A friend of mine moved everything to openluup and got a very stable system. I just got a new Beelink mini PC to take the role of my Raspberry PI, and I plan to install both Openluup and Homeassistant.
I'm still trying to make it stable, since sometimes I only get 3 days, and something 15 days. Part of this journey is trying to auto-reset luup engine when it stuck for no apparent reasons at all.
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Best way to get a luup engine corruption?
« Reply #3 on: August 13, 2018, 11:48:28 am »
My experience is that the reset itself can introduce corruption so I would be very cautious with it. Also what I do not like is that the system is down during the reset so my stability path is actually to prevent them. 3-15 days of uptime is not bad at all for the vera. My system would have a hard time staying up without a luup reload for more than 2 days. With my current setup I am looking to keep it up forever. I am already seeing the free DRAM go down.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Best way to get a luup engine corruption?
« Reply #4 on: August 13, 2018, 11:53:43 am »
When it stays up it's ok, but I want to be sure that I don't need to manually reset the luup engine when travelling. So, I really hope to be able to intercept those rare occasion when the luup engine is stuck after a reboot and just execute a script. If I run a luup.reload() manually, it will be back in seconds, so I'm just trying to find a method to execute it on demand.

As you, from time to time my Vera miss a sensor notification, but those occasions are very rare (1 time in 30-45 days).
As your Vera, mine became slow when dealing with a lot of commands for Zwave stack. I guess most of them are caused by my Fibaro FGS 223, which constantly send both secured and un-secured commands.
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Best way to get a luup engine corruption?
« Reply #5 on: August 13, 2018, 12:12:11 pm »
I thought it was funny that I too moved all my experimental home assistant (device bridge one) and zway to a beelink S2 mini pc just last week. I didn't want to deal with the quirks of the raspberry pi anymore. The fanless PC is quite nifty!

From my tests, I can see that zway sometimes has some lag but neither home assistant nor zway have the frequency of missed communication and delay from the zwave stack the vera has. It is actually almost digital. The newest SDK implemented since 7.0.26 was supposed to help but I am not seeing it.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Best way to get a luup engine corruption?
« Reply #6 on: August 13, 2018, 01:21:34 pm »
Part of the reasons I got a mini PC is to have more power and a better disk.
Now on building everything and move things to openluup and AltUi.
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more