03.06.2020, 06:11
You need to use queryactual instead of querystatus command.
Try this script:
Try this script:
Code:
require('user.dali')
function queryactual(short, addr)
local res, err = dalicmd('internal', 'queryactual', { addrtype = 'short', address = short })
if res then
local val = res:byte()
if val > 0 then
val = math.floor(val / 2.54 + 0.5)
val = math.max(1, val)
end
grp.checkupdate(addr, val)
end
end
queryactual(0, '11/1/103')
queryactual(1, '11/1/104')