Help - VeraLite Luup constantly restarting?? (might be error in scene LUA code)

Help…Oh oh. My VeraLite is not working after I made a change to some test LUA code in a scene. May have been a LUA code issue, however seems to have crippled the device? I’ve trying power cycling the device and it doesn’t help. I can get to the logs but that’s about it…some key items I see over and over.

What can I do to get the device working again? Do have have to hold the reset button down for 10 seconds and reset the whole device just because there is an error in a LUA file? Would this mean I’d have to reload the device from the latest backup then?

Can I ssh to the box & find the scene LUA code represented as a file? Then change the file to fix the issue? Where are the LUA files stored?

. . 08 11/16/14 15:46:23.100 Scene::RunScene running 1 TestScene <0x2b8f1680> 2014-11-16 15:46:23 - LuaUPnP Terminated with Exit Code: 245 2014-11-16 15:46:23 - LuaUPnP crash 01 2014-11-16 15:43:3 caught signal 11 <0x2b5cd680> 01 2014-11-16 15:43:6 caught signal 11 <0x2b79b680> . . 11246 root 1676 R ps axf 03 11/16/14 15:46:24.638 LuaUPNP: starting bLogUPnP 0 <0x2b6d1000> 02 11/16/14 15:46:24.648 JobHandler_LuaUPnP::Run: pid 11156 didn't exit <0x2b6d1000> 02 11/16/14 15:46:24.721 UserData::LoadUserData previous: 0 from *1.6.641* <0x2b6d1000> . . . 08 11/16/14 15:46:26.100 Scene::RunScene running 1 TestScene <0x2be05680> 2014-11-16 15:46:26 - [b]LuaUPnP Terminated with Exit Code: 245[/b] 2014-11-16 15:46:26 - [b]LuaUPnP crash[/b] 01 2014-11-16 15:43:3 caught signal 11 <0x2b5cd680>

oh oh - Finally had to try a factory reset (couldn’t see any other options) BUT now during the “add account to system” page I get

“An error has occurred while trying to process your request. Please try again later!”

Any ideas how to deal with this? (might need micasaverde support?)

That looks similar to the problem I got in Ui7. Is it a scene you scheduled to run every X minutes ?
Like you, my unique option was to reset the Vera to leave the infinite crash loop. Then you can restore a backup and try to unschedule this scene.

If not, what were your lua code changes that could explain such a repeated crash ?

With the crashing I couldn’t get a chance to get into the UI (I’m on UI5) to stop the schedule, so then I tried the factory reset after which I was going to try a restore, however I’m kind of stuck now as I mentioned

In the LUA code it was only a couple of test lines, so I think it would have been accessing or printing a variable that hadn’t been initialized yet…hard to imagine something so small has caused so much grief. I’m assuming from a LUA programming perspective it’s just a minor little bug, but the fact I’d had the scene scheduled to run each minute it became a big issue?

Why do I see 1.6.641 in your logs ?

I’m not sure. I don’t really know what this line is about.

The sharp-eyed @lolodomo has spotted evidence that your VeraLite seems to be running UI6 not UI5. If the upgrade happened as a result of your factory reset, it might explain why you cannot connect it to your UI5 account.

If you really were running UI5, you may want to reload it.

I think you could encounter a bug introduced in UI6 and not yet fixed in UI7 (I have not tested the last UI7 release) that is in my hypothesis relative to scene scheduling.

If there is an error in your lua code, it should crash the scene run but not the full lua engine. And there should be something to prevent this infinite loop of lua engine restart because the engine runs this scene at each startup.

any advice on how to get the unit back on the air from where I am now however (given the factory reset)? So where I’m at is:

  • did factory reset
  • goto http://home.getvera.com/ & login
  • get “No controllers have been added to this account” => click on “add another controller”
  • get “Select Your Controller” => VeraLite selected then click on “Continue”
  • get plugin your controller and wait for all 3LEDs to be on => click on “Continue”
  • get ERROR “An error has occurred while trying to process your request. Please try again later!”

I can actually ssh onto the device ok, but if I look at the log file directory it seems there were no entries during the above (based on file timestamps)

I note in the serproxy.log the following, happening every 6 minutes (I changed the devid):

11/16/14 0:17:51 ===---Running 4 with Luup IP: 127.0.0.1 ID: 35202858 My IP: 127.0.0.1 COM: *none* 11/16/14 0:17:51 ==Skipping unknown Serial Port: usbserinfo:1.0 driver:2.0 11/16/14 0:17:51 ===Number of Serial Ports found: 0 11/16/14 0:17:51 Downloaded http://127.0.0.1:3480/data_request?id=lu_finddevice&devid=12341234&devtype=urn:micasaverde-org:device:SerialPortRoot:1 to /tmp/serproxy.1-5966 with /usr/bin/curl -k -s -S --fail --connect-timeout 5 --max-time 5 -o "/tmp/serproxy.1-5966" "htt p://127.0.0.1:3480/data_request?id=lu_finddevice&devid=12341234&devtype=urn:micasaverde-org:device:SerialPortRoot:1" Response 1792 11/16/14 0:17:51 Download failed 11/16/14 0:17:51 find_self failed

PS Did another factory restart at: Sun Nov 16 12:10:04 PST 2014.

Interesting snippets out of the logs I see:

LuaUPnP.log (repeating)

03 11/16/14 12:12:56.826 JobHandler_LuaUPnP::Reload: ZWave new connect Critical 0 m_bCriticalOnly 0 dirty data 1 <0x2b701680> 01 11/16/14 12:12:56.938 [[31;1mJobHandler_LuaUPnP::StartPlugins ZWave failed to start[[0m <0x2abcd000> 02 11/16/14 12:12:56.944 [[33;1mJobHandler_LuaUPnP::Run Lua initiated a quit[[0m <0x2abcd000> 03 11/16/14 12:12:56.945 JobHandler_LuaUPnP::Reload: CreateLuaInterfaces2 Critical 1 m_bCriticalOnly 0 dirty data 1 <0x2abcd000> [[7;36m2014-11-16 12:12:57 - LuaUPnP Terminated with Exit Code: 250[[1;00m [[7;36m2014-11-16 12:12:57 - LuaUPnP crash[[1;00m

signal.log

01 2014-11-16 12:12:57 caught signal 6 <0x2b901680> 01 2014-11-16 12:13:13 caught signal 6 <0x2c135680> 01 2014-11-16 12:13:26 caught signal 6 <0x2c799680> 01 2014-11-16 12:13:38 caught signal 6 <0x2c555680> 01 2014-11-16 12:13:48 caught signal 6 <0x2b913680

PS. Separate to trying to get my current build back on the air, I posed the question here http://forum.micasaverde.com/index.php/topic,28404.0.html re how one could completely rebuild a unit from scratch…