Thanks Garrett. Problem solved.
I was working from this post:
[quote=“micasaverde, post:4, topic:164553”]Did you see the sample here already: http://wiki.micasaverde.com/index.php/Luup_Scenes_Events
Turn an appliance switch on for device #5:
lu_CallAction(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” },5)
Turn an appliance switch off:
lu_CallAction(“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“0” },5)
Do something if switch device #5 is on:
if( lu_GetVariable(“urn:upnp-org:serviceId:SwitchPower1”,“Status”,5)==“1” ) then
–something to do goes here
end
Dim switch #6 to 30%
lu_CallAction(“urn:upnp-org:serviceId:Dimming1”,“SetLoadLevelTarget”,{ newLoadlevelTarget=“30” },6)
Arm motion senor #7:
lu_SetVariable(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Armed”,“1”,7)
Disarm:
lu_SetVariable(“urn:micasaverde-com:serviceId:SecuritySensor1”,“Armed”,“0”,7)
Note, arming and disarming isn’t a concept within UPnP or Z-Wave. It’s just a flag that the Luup engine uses, and is stored in a variable we created called “Armed”.
Run Scene #5:
lu_CallAction(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“RunScene”,{ SceneNum=“5” })
In this case we left the device number off (the 4th parameter to lu_CallAction), because the “RunScene” action is handled by the Luup engine itself–not by some device within Z-Wave, etc.[/quote]
I did read the link showing the code of samples and luup.call_action. I stuck with lu_CallAction because the title and text of the sample page only refers to scenes. Obviously it applies to plugins also but that is never mentioned.
I don’t have privileges to edit the wiki so perhaps if an admin reads this it can be edited so others don’t make the same rookie mistake. I’m learning lua/programming via trial and error and that would have saved me hours. Perhaps they can delete or edit the post above that lead me on this snipe hunt as well.
Thanks again.