Logic Machine Forum
bacnet: unable to read or write multi-state - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: bacnet: unable to read or write multi-state (/showthread.php?tid=5016)



bacnet: unable to read or write multi-state - davidderoo - 11.10.2023

Hi all,
I want to read and write a value to a multi-state point in bacnet.
bit when I read the object I get a nil value. 
When I read it with yabe i get the value.
Here's my script:
-- object mapped to this event must have its data type set
Vloerkoeling = event.getvalue()

require('bacnet')
--write the value
bacnet.write(189073, 'multi-state output', 22829, Vloerkoeling, 15)
--read the actuale value
value = bacnet.readvalue(189073, 'multi-state input', 22829, 'present value')
log (value)


readind and writeing analog values an binary values works as a charm.
in attchment the yabe screenshot    

Kind regards,
David de Roo


RE: bacnet: unable to read or write multi-state - admin - 11.10.2023

You should use multi-state value in both cases, not input/output.


RE: bacnet: unable to read or write multi-state - davidderoo - 11.10.2023

Thank you, that resolved my issue, I just followed the example, but was too fast I guess