Hi,
If I do grp.response('1/1/1',1,dt.bool) the value is not always written to the bus, unlike when I write grp.response('1/1/1',true,dt.bool) it is always written. Specifying the data type makes no difference.
As a workaround I have to do this
That way I get the string into a number which is then converted to an boolean, which seems a lot.
Note I have noticed this behavior in all firmware releases and is the same for grp.write.
Thanks,
Roger
If I do grp.response('1/1/1',1,dt.bool) the value is not always written to the bus, unlike when I write grp.response('1/1/1',true,dt.bool) it is always written. Specifying the data type makes no difference.
As a workaround I have to do this
Code:
function tobool( val )
if ( val == nil || val == false || val == 0 || val == "0" || val == "false" ) then return false end
return true
end
local receivedcommand = string.split(response[2],' ')
local sw= tobool(dim[1])
grp.response('11/1/14',sw,dt.bool)
That way I get the string into a number which is then converted to an boolean, which seems a lot.
Note I have noticed this behavior in all firmware releases and is the same for grp.write.
Thanks,
Roger