Luup functions not Working in UI5.

Does anybody else have the problem that loop functions are not working in firmware 1.5.233:

If I run a scene which contains the luup command “local pushskip = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”,“Status”,52)” the output is as follows:

08 12/11/11 10:30:28.649 Scene::RunScene running 18 IPcam Down - Push <0x2c0c> 01 12/11/11 10:30:28.650 luup_variable_get interface 0x964038 args 3 <0x2c0c>

The rest of the code in this scene does not seem to be started at all.

In the log when lua engine is restarted it seems like multiple functions are not working, see Screenshot.

Could anyone using firmware 1.5.233 confirm if that is working for him or if the same problems exist? Thank you.

Can somebody help ot interpret this part of the log? I appears when I try to run an example uf luup code in the test field:

Code to test:

local pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",4) if (pushskip=="1")then return true else return false end

Log:

04 12/11/11 15:24:26.183 <0x803> 08 12/11/11 15:24:31.041 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: RunLua <0x2c0c> 08 12/11/11 15:24:31.041 JobHandler_LuaUPnP::HandleActionRequest argument Code=pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",4) if (pushskip=="1")then return true else return false end <0x2c0c> 01 12/11/11 15:24:31.044 LuaInterface::LoadCode: [string "pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPowe..."]:2: 'then' expected near ')' <0x2c0c> 01 12/11/11 15:24:31.045 JobHandler_LuaUPnP::RunLua failed: pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",4) if pushskip=="1")then return true else return false end <0x2c0c>

@chixxi,

I’m trying to update my plugins for UI5 and I’m a bit lost as I’m seeing about the same:

[size=8pt]
[font=courier]01 12/11/11 9:19:58.047 luup_iop_open 0x7a6458 args 3 <0x402>
01 12/11/11 9:19:58.048 luup_chdev_start 0x7a6458 args 1 <0x402>
01 12/11/11 9:19:58.049 luup_variable_get interface 0x7a6458 args 3 <0x402>
01 12/11/11 9:19:58.050 luup_variable_get interface 0x7a6458 args 3 <0x402>
01 12/11/11 9:19:58.050 luup_variable_get interface 0x7a6458 args 3 <0x402>
01 12/11/11 9:19:58.051 luup_variable_get interface 0x7a6458 args 3 <0x402>
01 12/11/11 9:19:58.052 luup_variable_get interface 0x7a6458 args 3 <0x402>
01 12/11/11 9:19:58.053 luup_variable_get interface 0x7a6458 args 3 <0x402>
01 12/11/11 9:19:58.053 luup_variable_set interface 0x7a6458 args 4 <0x402>
01 12/11/11 9:19:58.054 luup_variable_set interface 0x7a6458 args 4 <0x402>
01 12/11/11 9:19:58.055 luup_variable_set interface 0x7a6458 args 4 <0x402>
01 12/11/11 9:19:58.055 luup_variable_set interface 0x7a6458 args 4 <0x402>
01 12/11/11 9:19:58.056 luup_variable_set interface 0x7a6458 args 4 <0x402>
01 12/11/11 9:19:58.057 luup_variable_set interface 0x7a6458 args 4 <0x402>
01 12/11/11 9:19:58.057 luup_variable_get interface 0x7a6458 args 3 <0x402>
01 12/11/11 9:19:58.058 luup_variable_set interface 0x7a6458 args 4 <0x402>
01 12/11/11 9:19:58.060 luup_chdev_append 0x7a6458 args 9 <0x402>
01 12/11/11 9:19:58.061 luup_chdev_append 0x7a6458 args 9 <0x402>
01 12/11/11 9:19:58.062 luup_chdev_append 0x7a6458 args 9 <0x402>
01 12/11/11 9:19:58.063 luup_chdev_append 0x7a6458 args 9 <0x402>
01 12/11/11 9:19:58.064 luup_chdev_sync 0x7a6458 args 2 <0x402>
01 12/11/11 9:19:58.068 luup_chdev_start 0x7ae630 args 1 <0x402>
01 12/11/11 9:19:58.069 luup_chdev_append 0x7ae630 args 9 <0x402>
01 12/11/11 9:19:58.069 luup_chdev_append 0x7ae630 args 9 <0x402>
01 12/11/11 9:19:58.070 luup_chdev_append 0x7ae630 args 9 <0x402>
01 12/11/11 9:19:58.071 luup_chdev_append 0x7ae630 args 9 <0x402>
01 12/11/11 9:19:58.072 luup_chdev_sync 0x7ae630 args 2 <0x402>
01 12/11/11 9:19:58.084 luup_variable_get interface 0x7ae630 args 3 <0x402>
01 12/11/11 9:19:58.085 luup_variable_set interface 0x7ae630 args 4 <0x402>
01 12/11/11 9:19:58.086 luup_variable_get interface 0x7ae630 args 3 <0x402>
01 12/11/11 9:19:58.087 luup_variable_set interface 0x7ae630 args 4 <0x402>
01 12/11/11 9:19:58.088 luup_call_timer can’t find parms <0x402>[/font]
[/size]

@chixxi,
You’re missing an opening bracket ( after if. Basically the error in the log is indicating a syntax error.

I have seen this error as well. It looks like it is happening during the time it is trying to load the DSC plugin. I can not be positive though.

  • Garrett

@guessed: Thanks for viewing my log. Sadly it doesn’t even make a difference If I add the bracket or not, same output (beside of missing bracket)…

I am starting to wonder what kind of developers work @micasaverde, releasing such a major (beta-)update on facebook, very professional. And still nothing official in the forums. The only good thing about the update: Aeon Labs MiniMote finally working as a scene controller…

I opened support ticket at MicasaVerde concerning this topic, i guess in a couple of weeks we should get an answer.

I am on vacation next week, therefore I will not be responding very quickly, thanks for your support so far, problem remains unsolved up to now.

Funny thing for the past couple years it was said that this would require an Aeon labs firmware update to the Minimote, seems it aint so. Anyway if true that is great 8)

chixxi, radarengineer,

I was seeing the same type of thing as you in the logs. Plugins that were working under UI4 seem not to work under UI5 (dataMine, camera, energy) etc.

Alex

The strange thing is they seemed to be working in the first UI5 I installed (using the Vera3 link) but not the slightly newer build (using the upgrade link posted on Facebook).

The first link was build 1.5.201. They made some changes to the plugin structure in build 1.5.228 which broke the plugins. What are these changes? We do not know the full details as guessed mentioned. But hopefully some light can be shed soon.

  • Garrett

@chixxi,
Do you mind posting the new errors again, there will be subtle differences since the old one made specific reference to the syntax error and these should now be replaced by whatever the next issue is.

Actually there was a firmware update, please read this: http://forum.micasaverde.com/index.php/topic,8630.0.html

The strange thing is they seemed to be working in the first UI5 I installed (using the Vera3 link) but not the slightly newer build (using the upgrade link posted on Facebook).
Yes, funny enough I can also confirm that everything was running fine in the non-official release 1.5.201 for me!

@guessed: I tried again, this is the code I am trying to test under “Develop Apps=> Test Lua Code” (see Screenshot)

local pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",50) if (pushskip=="1")then luup.log("Value was 1") return true else luup.log("Value was not 1") return true end

The log the shows (see Screenshot attached):

08 12/12/11 7:35:05.624 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: RunLua <0x2c0c> 08 12/12/11 7:35:05.624 JobHandler_LuaUPnP::HandleActionRequest argument Code=local pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",50) if (pushskip=="1")then luup.log("Value was 1") return true else luup.log("Value was not 1") return true end <0x2c0c> 01 12/12/11 7:35:05.626 luup_variable_get interface 0x843cc0 args 3 <0x2c0c> 50 12/12/11 7:35:05.627 luup_log:0: Value was not 1 <0x2c0c>

Right, given that log entry the code is now running.

You may want to print out / log the push skip value so you can see what it is returning

Ok, so I tried running this simple luup code in the Test Window:

local pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",50) luup.log("Value of Variable pushskip: " .. pushskip) return true

It does not seem like its working, log:

08 12/12/11 8:14:31.109 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: RunLua <0x2c0c> 08 12/12/11 8:14:31.110 JobHandler_LuaUPnP::HandleActionRequest argument Code=local pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",50) luup.log("Value of Variable pushskip: " .. pushskip) return true <0x2c0c> 01 12/12/11 8:14:31.112 luup_variable_get interface 0x778df0 args 3 <0x2c0c> 01 12/12/11 8:14:31.112 LuaInterface::StartEngine failed run: 0 [string "local pushskip = luup.variable_get("urn:upn..."]:2: attempt to concatenate local 'pushskip' (a nil value) <0x2c0c> 01 12/12/11 8:14:31.113 JobHandler_LuaUPnP::RunLua failed: local pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",50) luup.log("Value of Variable pushskip: " .. pushskip) return true <0x2c0c>

If I just set “local pushskip = 1”, printing the variable works, log:

08 12/12/11 8:16:45.018 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: RunLua <0x2c0c> 08 12/12/11 8:16:45.019 JobHandler_LuaUPnP::HandleActionRequest argument Code=local pushskip = 1 luup.log("Value of Variable pushskip: " .. pushskip) return true <0x2c0c> 50 12/12/11 8:16:45.021 luup_log:0: Value of Variable pushskip: 1 <0x2c0c>

Am I doing something wrong here? Or is it just not working, not sure, its early monday morning ???

Replace

luup.log("Value of Variable pushskip: " .. pushskip)

with

luup.log("Value of Variable pushskip: " .. tostring( pushskip ) )

You cannot concatenate a string with [tt]nil[/tt] without typecast.

The change is documented here:
http://wiki.micasaverde.com/index.php/UI4_UI5_Migration#Lua_Files

Cameras should work. Also energy monitoring should work too. The DataMine plugin doesn’t work because I haven’t updated it to be compatible with UI5. This plugin has a more complex installation procedure, so I couldn’t just publish it on the MiOS Market, because the MiOS plugin installer is limited to the basic plugin files, and the installation would’ve been incomplete.

The change is documented here: http://wiki.micasaverde.com/index.php/UI4_UI5_Migration#Lua_Files

I still don’t understand why something as simple as I am trying is not working. No change about getting variables documented there. Or did I miss something? It’s not only about plugins, also simple luup code in scenes doesn’t work.

@Ap15e:

Test Lua Code:

local pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",50) luup.log("Value of Variable pushskip: " .. tostring( pushskip ) ) return true

Log:

08 12/12/11 13:10:05.255 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: RunLua <0x2c0c> 08 12/12/11 13:10:05.256 JobHandler_LuaUPnP::HandleActionRequest argument Code=local pushskip = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",50) luup.log("Value of Variable pushskip: " .. tostring( pushskip ) ) return true <0x2c0c> 01 12/12/11 13:10:05.258 luup_variable_get interface 0x7f60b0 args 3 <0x2c0c> 50 12/12/11 13:10:05.258 luup_log:0: Value of Variable pushskip: nil <0x2c0c>

The value is always “nil”. Doesn’t matter if node is on or off.

I hadn’t realised there were such major changes wrt UI4 and UI5.

How are plugins going to be handled in future? Will there be UI4 and UI5 specific versions or is UI4 support now deprecated?

I don’t feel comfortable upgrading to UI5 again at this point, but I don’t want to suddenly find, for example, dataMine no longer works next time I update it.

Thanks,

Alex

chixxi, I’m looking into it.

@ajlennon, if you read this message from micasaverde it sounds like UI4 will still be supported:

http://forum.micasaverde.com/index.php/topic,8634.msg55811.html#msg55811

Personally, I’m hoping over the next few days all the UI5 kinds get straightened out. I like it so far.

EDIT: I mean UI4 will still be supported by plugins (they will be backwards compatible?).