Logic Machine Forum
Writing setpoint 8bytes - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Writing setpoint 8bytes (/showthread.php?tid=3117)



Writing setpoint 8bytes - chriscroko - 21.01.2021

I want to write all the heating and cooling setpoints via BACnet or KNXip. Anyone that has handled this before? 



See attachment for comments in the documentation. 

Can this be done directly via BACnet or KNXip? Or would I have to script this for each room? 

All help on the matter is much appreciated.


RE: Writing setpoint 8bytes - admin - 21.01.2021

Here's how to combined 4 separate object values into a single object:
Code:
addrs = { '1/1/1', '1/1/2', '1/1/3', '1/1/4' }
value = ''

for _, addr in ipairs(addrs) do
  val = grp.getvalue(addr)
  enc = busdatatype.encode(val, dt.float16)
  value = value .. enc.dataraw
end

grp.write('1/1/5', value, dt.raw)

This will work over KNX/IP but not over BACnet. Each BACnet datapoint can only store a single value.