I am looking to read the value, specifically the returnArguments from the luup.call_action. It comes back as table or list and I can not figure out how to loop thru to get each value. Below is sample code:
[code]local ALTUI_DEVICE_NO = 850
local ALTUI_DEVICE_SID = “urn:upnp-org:serviceId:altui1”
local GROUP_ID_KITCHEN = “RINCON_B832343333301400:4353”
[quote=“kyle.dawson, post:1, topic:200291”]I am looking to read the value, specifically the returnArguments from the luup.call_action. It comes back as table or list and I can not figure out how to loop thru to get each value. Below is sample code:
[code]local ALTUI_DEVICE_NO = 850
local ALTUI_DEVICE_SID = “urn:upnp-org:serviceId:altui1”
local GROUP_ID_KITCHEN = “RINCON_B8E93758FA4001400:725”
local GROUP_ID_FAMILY_ROOM = “RINCON_000E58C7D93A01400:4198103609”
local ALTUI_DEVICE_NO = 850
local ALTUI_DEVICE_SID = "urn:upnp-org:serviceId:altui1"
local GROUP_ID_KITCHEN = "RINCON_A8E956A3758FA4"
resultCode, resultString, job, returnArguments = luup.call_action(ALTSONOS_DEVICE_SID, "GetVolume", { groupID = GROUP_ID_KITCHEN} , ALTSONOS_DEVICE_NO)
local name, value
for name,value in pairs(returnArguments) do
luup.log("Debug Name: " .. name)
luup.log("Debug Value: " .. value)
end
I get this result
[string “ALTUI - LuaRunHandler”]:6: bad argument #1 to ‘pairs’ (table expected, got nil)