Closed calgaryy closed 4 years ago
Seems correct. Not sure I understand what you want to do ? Technically, if you want to use something else to interact with your device, you would only need the first lines
hvac = BAC0.lite(port=45501)
temp = create_AV(oid=1, name="temp", pv=12.8, pv_writable=True)
temp.units = EngineeringUnits.enumerations["degreesCelsius"]
temp.description = "AVG Temp"
hvac.this_application.add_object(temp)
Let that run and any other BACnet tool will find your device.
the objective is to set up a fake device (in this case a virtual HVAC) and have it poll to a separate server (on either the same or a different subnet). In terms of keeping it running, do you just recommend keeping it in an infinite loop until the program is quit?
Yes. In BACnet, the device needs to be "alive" all the time. This will keep the socket active. Here you can find one way of achieving this creating a service. https://pythoninthebuilding.wordpress.com/2020/02/24/a-bacnet-gateway-using-bac0-part-3/
Hi there!
I'm looking to make a virtual device using BAC0 similar to what was started in the conftest.py file.
This is the code and it leads to the following output:
Is this the expected output? Further, I was wondering, is there a way to get this working with bacserv? The tool available within the toolkit provided by bacnet.org: (https://sourceforge.net/projects/bacnet/files/bacnet-tools/bacnet-tools-0.8.6/)