13.12.2023, 08:15
You are using bacnet client script so you cannot be bacnet server.
Use direct communication script if you use multiple event scripts.
For reading use single resident script.
Use Yabe to check parameters of object you want to read.
Use direct communication script if you use multiple event scripts.
Code:
require('bacnet')
-- read from 192.168.0.21, device id 21
bacnet.deviceip = '192.168.0.21'
val1 = bacnet.readvalue(21, 'binary value', 2049)
val2 = bacnet.readvalue(21, 'binary value', 2050)
val3 = bacnet.readvalue(21, 'binary value', 2051)
log(val1, val2, val3)
Use Yabe to check parameters of object you want to read.
------------------------------
Ctrl+F5
Ctrl+F5