Posts: 21
Threads: 2
Joined: Nov 2022
Reputation:
0
13.12.2023, 02:35
(This post was last modified: 13.12.2023, 04:16 by imprashant.)
Hi I am trying to control the VRV System from logic machine via Bacnet.
I am able to send the command to the AC from Lua Script. But I am not able to get the status (ON/OFF, set temp etc.)
I need to get the status whenever the value changes from Logic Machine or Ac Remote. I am using LM as a Bacnet server.
I am using this event based script to set temp
require('bacnet')
_value = grp.getvalue('3/2/4')
bacnet.write(4194300, 'analog value', 17930, _value)
Posts: 5059
Threads: 28
Joined: Aug 2017
Reputation:
230
You are using bacnet client script so you cannot be bacnet server.
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)
For reading use single resident script.
Use Yabe to check parameters of object you want to read.
------------------------------
Ctrl+F5
Posts: 21
Threads: 2
Joined: Nov 2022
Reputation:
0
(13.12.2023, 08:15)Daniel Wrote: You are using bacnet client script so you cannot be bacnet server.
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)
For reading use single resident script.
Use Yabe to check parameters of object you want to read.
Thank You. How can I write the log values to the group address only if there is a change in value?
Posts: 8209
Threads: 43
Joined: Jun 2015
Reputation:
473
Use this:
Code: grp.checkwrite('1/1/1', val1)
grp.checkwrite('1/1/2', val2)
grp.checkwrite('1/1/3', val3)
If needed, you can specify the minimum difference for writing. See docs for more info: https://kb.logicmachine.net/libraries/lu...ta--status
Posts: 73
Threads: 16
Joined: Mar 2017
Reputation:
0
(14.12.2023, 06:47)imprashant Wrote: (13.12.2023, 08:15)Daniel Wrote: You are using bacnet client script so you cannot be bacnet server.
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)
For reading use single resident script.
Use Yabe to check parameters of object you want to read.
Thank You. How can I write the log values to the group address only if there is a change in value?
Hello Team:
I want to know why if I comment the line -- bacnet.device ip = '192.168.0.21' , then I can read values from bacnet, but if I leave that line without commen, I can not read bacnet values.
Thank you very much
best regards
Roger
Posts: 8209
Threads: 43
Joined: Jun 2015
Reputation:
473
Which firmware version do you have? deviceip must be the target BACnet device IP otherwise direct connection mode won't work. Direct connection mode allows using BACnet server together with client and allows multiple BACnet client scripts running in parallel.
Posts: 73
Threads: 16
Joined: Mar 2017
Reputation:
0
19.06.2025, 08:48
(This post was last modified: 19.06.2025, 09:33 by batistacaceres.)
(17.06.2025, 11:59)admin Wrote: Which firmware version do you have? deviceip must be the target BACnet device IP otherwise direct connection mode won't work. Direct connection mode allows using BACnet server together with client and allows multiple BACnet client scripts running in parallel.
version: 20240124
Yes, I know that deviceip is the target BACnet device IP. I am not using this logicMachine as BACnet server, its just as BAcnet client.
It's a little bit strange, but if I leave that line, the system doesn't read anything. However, if I remove it, everything works perfectly. May be a bug ?
best regards
Roger
(19.06.2025, 08:48)batistacaceres Wrote: (17.06.2025, 11:59)admin Wrote: Which firmware version do you have? deviceip must be the target BACnet device IP otherwise direct connection mode won't work. Direct connection mode allows using BACnet server together with client and allows multiple BACnet client scripts running in parallel.
version: 20240124
Yes, I know that deviceip is the target BACnet device IP. I am not using this logicMachine as BACnet server, its just as BAcnet client.
It's a little bit strange, but if I leave that line, the system doesn't read anything. However, if I remove it, everything works perfectly. May be a bug ?
best regards
Roger
Hello team:
I have updated the logicMachine with the new firmware version 20240426, and everything is OK, no problem at all, with and without that line bacnet datas are read from Bacnet Server. Now everything is ok.
thank you very much for your hint,
best regard
Roger
|