hello
i’am trying to do my first plugin to manage KNX gateway
it’s a plugin with child, i wrote it following the walkthrough here http://wiki.micasaverde.com/index.php/Luup_Somfy_Walkthrough
in my implementation file i have the following action
urn:upnp-org:serviceId:SwitchPower1 SetTarget local lul_prefix = luup.variable_get("urn:geo6-net:serviceId:KNX1", "UrtsiId", lul_device) local lul_command = lul_prefix .. luup.devices[lul_device].id .. 'U\r' local lul_reverse = luup.variable_get("urn:micasaverde-com:serviceId:HaDevice1", "ReverseOnOff", lul_device) if (lul_settings.newTargetValue == "1" or (lul_settings.newTargetValue == "0" and lul_reverse == "1")) then
lul_command = lul_prefix .. luup.devices[lul_device].id .. 'D\r'
end
if (luup.io.write(lul_command) == false) then
luup.log("cannot send: " .. tostring(lul_command),1)
luup.set_failure(true)
return false
end
</run>
</action>
but when i launch it i obtain
LuaInterface::CallFunction-1 device 12 function SSwitchPower1_SwitchPower1_SetTarget_run failed [string “…”]:40: attempt to concatenate local ‘lul_prefix’ (a nil value) <0x580c>
any idea ?
thanks for your help