Program Logic (PLEG) UI7 Issues Preventing Deployment

I started playing with UI7 on a new Vera Edge. The good news is, all my other plugins and small number of test devices is working week. The bad news, PLEG is the only plugin not working reliably…and I depend on Richard’s powerful plugin to make my home run.

The issues I have personally with UI7 (and we should start keeping a list):

UI7#1 Triggers, Conditions, and Actions save only about 5% of time.

The “fix” is to wait one minute before reloading LUUP. Richard has attributed this to a Vera UI7 bug. I still can’t get it to save reliably in any browser

Perhaps offline editor may be desirable if the product won’t run correctly in the Vera UI long term.

UI7#2 I get a ‘Startup LUA Failed’ for after about an hour of configuring it. Only fix is deleting PLEG and re-installing it (losing all changes).

Documented more here: http://forum.micasaverde.com/index.php/topic,12759.msg224184.html#msg224184
This has happened using Firefox and Chrome more than 5 times doing simple configurations on a test system.

Latest test on new device:

  • Firefox (latest)
  • Created 8 Triggers (scene controller activate and deactivate)
  • Waited 2 minutes on the page
  • Reloaded Vera and then after it said “please wait” Refreshed Firefox

It gave Startup LUA error after first reload completed.

Log:
50 03/07/15 21:12:52.082 luup_log:128: PLEG-128:Initialize:Restart <0x777a6520>
01 03/07/15 21:12:52.086 LuaInterface::CallFunction_Startup-1 device 128 function Initialize failed [string "module("L_Progra>
01 03/07/15 21:12:52.087 LuImplementation::StartLua running startup code for 128 I_ProgramLogicEG.xml failed <0x777a6520>

Status report and log don’t work (due to Startup LUA error).

This is a showstopper bug that breaks PLEG.

Long term, once UI7 support allows PLEG (which I depend on) to run stable…and I know it’s not Richard’s doing for the changes Vera has made (though I do expect the product to function eventually)…I look forward to UI7 (and new Z-Wave + chip) based on my early experiences.

Any other issues (or fixes) to UI7 that is preventing you from using it?

You truncated the lines from the log file … An untruncated version would help me understand what is getting trashed.

01     03/07/15 21:12:52.086   LuaInterface::CallFunction_Startup-1 device 128 function Initialize failed [string "module("L_Progra>

Didn’t see a lot of relevant logging info.

Triggers:

[{'name':'UBR1On','device':'125','template':'1','service':'urn:micasaverde-com:serviceId:SceneController1','args':[{'name':'sl_SceneActivated','op':'=','value':'1'}]},{'name':'UBR1Off','device':'125','template':'2','service':'urn:micasaverde-com:serviceId:SceneController1','args':[{'name':'sl_SceneDeactivated','op':'=','value':'1'}]},{'name':'UBR2On','device':'125','template':'1','service':'urn:micasaverde-com:serviceId:SceneController1','args':[{'name':'sl_SceneActivated','op':'=','value':'2'}]},{'name':'UBR2Off','device':'125','template':'- Please select -'}]

What ever technique you use to capture the log file you are truncating the line lines.

Run with all options enabled:

Device #127 working PLEG
Device #128 failed PLEG

10 03/09/15 20:23:10.576 XXX-UpdateSystemMessagesTasks now 1=Program Logic Event Generator[127]: Running Lua Startup timeout > 10 03/09/15 20:23:10.576 UserData::m_iDataVersion_Variables_incr short sys message user data 957761043 variables 957761192 <0> 31 03/09/15 20:23:10.576 AlarmManager::Run finish callback for alarm 0xed8ac0 entry 0x10c8d40 type 24 id 109 param=(nil) entr> 31 03/09/15 20:23:10.576 AlarmManager::Run finish callback for alarm 0xed8ac0 entry 0x15edad8 type 5 id 29 param=0x10fe340 en> 31 03/09/15 20:23:10.577 AlarmManager::Run callback for alarm 0xed8ac0 entry 0x160e8b0 type 5 id 30 param=0x10feb10 entry->wh> 10 03/09/15 20:23:10.577 UserData::m_iDataVersion_Variables_incr startup user data 957761043 variables 957761193 <0x76e56520> 10 03/09/15 20:23:10.577 AlarmManager::AddRelativeAlarm current time 1425957790 delay 0 type 24 <0x76e56520> 10 03/09/15 20:23:10.577 AlarmManager::AddAbsoluteAlarm alarm 0xed8ac0 entry 0x15edad8 id 110 type 24 param=(nil) entry->when> 31 03/09/15 20:23:10.578 AlarmManager::Run 0xed8ac0 notified of a change entry 0x1285f18 id 61 deleted 0 <0x76c56520> 31 03/09/15 20:23:10.578 AlarmManager::Run callback for alarm 0xed8ac0 entry 0x15edad8 type 24 id 110 param=(nil) entry->when> 10 03/09/15 20:23:10.578 XXX-UpdateSystemMessagesTasks StartupTask #0 = 4 OK / ZWave <0x76c56520> 10 03/09/15 20:23:10.578 XXX-UpdateSystemMessagesTasks StartupTask #3 = 4 OK / Overhead Garage Door[5] <0x76c56520> 10 03/09/15 20:23:10.579 XXX-UpdateSystemMessagesTasks StartupTask #4 = 4 OK / Battery Monitor[6] <0x76c56520> 10 03/09/15 20:23:10.579 XXX-UpdateSystemMessagesTasks StartupTask #6 = 4 OK / Philips Hue Controller[8] <0x76c56520> 10 03/09/15 20:23:10.579 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / Outdoor Weather[10] <0x76c56520> 10 03/09/15 20:23:10.579 XXX-UpdateSystemMessagesTasks StartupTask #8 = 4 OK / Panel Bedrooms[18] <0x76c56520> 10 03/09/15 20:23:10.580 XXX-UpdateSystemMessagesTasks StartupTask #9 = 4 OK / Panel Master[19] <0x76c56520> 10 03/09/15 20:23:10.580 XXX-UpdateSystemMessagesTasks StartupTask #10 = 4 OK / Panel Living[20] <0x76c56520> 10 03/09/15 20:23:10.580 XXX-UpdateSystemMessagesTasks StartupTask #11 = 4 OK / dataMine graphing and logging[111] <0x76c5652> 10 03/09/15 20:23:10.580 XXX-UpdateSystemMessagesTasks StartupTask #12 = 4 OK / System Monitor[112] <0x76c56520> 10 03/09/15 20:23:10.580 XXX-UpdateSystemMessagesTasks StartupTask #13 = 4 OK / Nest[113] <0x76c56520> 10 03/09/15 20:23:10.581 XXX-UpdateSystemMessagesTasks StartupTask #14 = 4 OK / Program Logic Event Generator[127] <0x76c5652> 10 03/09/15 20:23:10.581 XXX-UpdateSystemMessagesTasks now 2=RNET Interface: Choose the Serial Port for the URTSI timeout 0 (> 10 03/09/15 20:23:10.581 UserData::m_iDataVersion_Variables_incr short sys message user data 957761043 variables 957761194 <0> 31 03/09/15 20:23:10.581 AlarmManager::Run finish callback for alarm 0xed8ac0 entry 0x15edad8 type 24 id 110 param=(nil) entr> 31 03/09/15 20:23:10.572 AlarmManager::Run 0x15de6e0 notified of a change entry 0x156d378 id 2 deleted 0 <0x74856520> 20 03/09/15 20:23:10.582 LuaInterface::StartEngine 0x15ee2e8 device 128 <0x76e56520> 25 03/09/15 20:23:10.599 lua impl before 128 start pMem 0x18eb000/26128384 diff: 10571776 __LEAK__ this:4096 start:823296 to > 25 03/09/15 20:23:10.599 LuImplementation::StartLua device: 128 file:I_ProgramLogicEG.xml startup:Initialize pLuaInterface: 0> 10 03/09/15 20:23:10.599 UserData::m_iDataVersion_Variables_incr startup user data 957761043 variables 957761195 <0x76e56520> 10 03/09/15 20:23:10.600 AlarmManager::AddRelativeAlarm current time 1425957790 delay 0 type 24 <0x76e56520> 10 03/09/15 20:23:10.600 AlarmManager::AddAbsoluteAlarm alarm 0xed8ac0 entry 0x156d2b0 id 111 type 24 param=(nil) entry->when> 25 03/09/15 20:23:10.600 LuImplementation::StartLua running startup code for 128 I_ProgramLogicEG.xml <0x76e56520> 31 03/09/15 20:23:10.602 AlarmManager::Run 0xed8ac0 notified of a change entry 0x1285f18 id 61 deleted 0 __LEAK__ this:16384 > 31 03/09/15 20:23:10.602 AlarmManager::Run callback for alarm 0xed8ac0 entry 0x156d2b0 type 24 id 111 param=(nil) entry->when> 10 03/09/15 20:23:10.602 XXX-UpdateSystemMessagesTasks StartupTask #0 = 4 OK / ZWave <0x76c56520> 10 03/09/15 20:23:10.602 XXX-UpdateSystemMessagesTasks StartupTask #3 = 4 OK / Overhead Garage Door[5] <0x76c56520> 10 03/09/15 20:23:10.603 XXX-UpdateSystemMessagesTasks StartupTask #4 = 4 OK / Battery Monitor[6] <0x76c56520> 10 03/09/15 20:23:10.603 XXX-UpdateSystemMessagesTasks StartupTask #6 = 4 OK / Philips Hue Controller[8] <0x76c56520> 10 03/09/15 20:23:10.603 XXX-UpdateSystemMessagesTasks StartupTask #7 = 4 OK / Outdoor Weather[10] <0x76c56520> 10 03/09/15 20:23:10.603 XXX-UpdateSystemMessagesTasks StartupTask #8 = 4 OK / Panel Bedrooms[18] <0x76c56520> 10 03/09/15 20:23:10.604 XXX-UpdateSystemMessagesTasks StartupTask #9 = 4 OK / Panel Master[19] <0x76c56520> 10 03/09/15 20:23:10.604 XXX-UpdateSystemMessagesTasks StartupTask #10 = 4 OK / Panel Living[20] <0x76c56520> 10 03/09/15 20:23:10.604 XXX-UpdateSystemMessagesTasks StartupTask #11 = 4 OK / dataMine graphing and logging[111] <0x76c5652> 10 03/09/15 20:23:10.604 XXX-UpdateSystemMessagesTasks StartupTask #12 = 4 OK / System Monitor[112] <0x76c56520> 10 03/09/15 20:23:10.604 XXX-UpdateSystemMessagesTasks StartupTask #13 = 4 OK / Nest[113] <0x76c56520> 10 03/09/15 20:23:10.605 XXX-UpdateSystemMessagesTasks StartupTask #14 = 4 OK / Program Logic Event Generator[127] <0x76c5652> 10 03/09/15 20:23:10.605 XXX-UpdateSystemMessagesTasks now 1=Automation Scene[128]: Running Lua Startup timeout 0 (-142595779> 10 03/09/15 20:23:10.605 UserData::m_iDataVersion_Variables_incr short sys message user data 957761043 variables 957761196 <0> 31 03/09/15 20:23:10.605 AlarmManager::Run finish callback for alarm 0xed8ac0 entry 0x156d2b0 type 24 id 111 param=(nil) entr> 50 03/09/15 20:23:10.661 luup_log:128: PLEG-128:Initialize:Restart __LEAK__ this:249856 start:1089536 to 0x192c000 <0x76e5652> 01 03/09/15 20:23:10.661 luup_variable_watch interface 0x15ee2e8 args 4 <0x76e56520> 25 03/09/15 20:23:10.665 luup_variable_watch added hook to device 125 on urn:micasaverde-com:serviceId:SceneController1:sl_Sc> 25 03/09/15 20:23:10.665 luup_variable_watch added hook to device 125 on urn:micasaverde-com:serviceId:SceneController1:sl_Sc> 01 03/09/15 20:23:10.666 LuaInterface::CallFunction_Startup-1 device 128 function Initialize failed [string "module("L_Progra> 01 03/09/15 20:23:10.666 LuImplementation::StartLua running startup code for 128 I_ProgramLogicEG.xml failed <0x76e56520>

Does not help me unless you change the tools you use to get the log file … what ever your are using is truncating the lines … and the details I need are in the truncated part.

Richard, There is no truncating. If you feel there is still, please provide detailed logging steps for UI7 and I will follow them. I’m copying them from a tail in SSH (no grep).

Can you provide steps that you would like the log file captured that meet your debugging needs on UI7?

Perhaps, that is all the logging that the plugin is producing in this error state.

Just use:

http://Your.Vera.IP.Address/cgi-bin/cmh/log.sh?Device=LuaUPnP

Cut and paste the content into a txt file.

This is a full log file from a reload.

Well that had the full lines … but in that log file there were no errors for device 128 … It looks like you deleted all of the conditions … it only had input triggers … I did not see any errors in the logs.

I never created conditions. As the UI7 has bugs, I take one step at a time.

As described in my earlier post, I go slow, created triggers, waited 2 minutes, reloaded. I’m unable to create conditions as error state prevents all pleg dialogs from functioning.

Perhaps, allow PLEG to function with only Triggers to allow full configuration?

Sadly, I’m unfamiliar how to debug PLEG further on UI7 to provide you additional information outside of what PLEG or Vera logs in Verbose mode.

Screen snap the ERROR you are seeing …

Richard, I’m reading between the lines to provide some other possible causes.

Is having a condition required for PLEG to not have a generic Startup Failure messae? If so, I can just cut and paste another condition from a PLEG in to advanced tab and that should fix it when I get home tonight.

This will help other UI7’ers whom get this error and are using the make “one change at to a section at a time” and reload process suggested.

[ul][li]Is there a “best way” to program PLEG in UI7 GUI that you find reliable?[/li]
[li]Is there a way to “save/export” large programming jobs (exporting) that avoid the “loss” of all changes on a reload (UI7 bug)?[/li][/ul]

I think some of Vera’s bugs that effect PLEG have been fixed in the latest MCV release.

Just have to keep proceeding … I can provide better error recovery if I can find the ERROR messages that people are seeing … But I need the details … or instructions on how to duplicate … since I am not able to correct problems without details.

Adding a condition prevented the error.

It seems that conditions can’t be null. This should be an easy fix for issue #2 and I no longer have a startup error.

Thank you!

Adding a condition prevented the error. It seems that conditions can't be null.

This may have fixed your error … but the conclusion is wrong … It’s perfectly acceptable to save a PLEG without conditions.

Ok, so even if I wait for 1-2 minutes…I can’t get UI7 so save more than 10% of the time. The only time I can tell if it worked is refreshing browser…but then all my changes lost 90% of time.

Is there a “way” to even make programming PLEG possible under UI7?

What are the errors in the Log files ?

I can’t even save the settings to save the logging level in PLEG.

Nothing sticks in UI7 with Firefox, Chrome, or IE11. UI7’s UI growing pains I guess.

Am I the only one reporting config issues for UI7 “sticking”?

Is this the Edge ? Vera3 ? VeraLite ?