This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

VRV STATUS VIA BACNET
#1
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)
Reply
#2
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
Reply
#3
(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?
Reply
#4
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
Reply
#5
(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
Reply
#6
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.
Reply


Forum Jump: