I was trying to use BAC0 to get values of multiple points in BACnet system, I tried all the Posters and Getting starts, but no one works....
I can get value from BACnet tools which means the connection should be right: enter image description here
Then I move to BAC0, and I want to use this command:
bacnet.read('address object object_instance property')
In my case, BACnet (10.192.62.15/24) and my Raspberry pi (10.192.62.18/24) is connect with a same router, the Device id should be 2039307, objective name is "occupied_cool_setpoint_1" and objective type is "AnalogValue" with objective ID 1. I am little confused with "object and object_instance", what's this in my case?
Another question is about "Device":enter image description here, I have no idea why it always tell me unknow objective...
I also try to use this example:
***import BAC0
myIPAddr = '192.168.1.10/24'
bacnet = BAC0.connect(ip = myIPAddr)
bacnet.read('2:5 analogInput 1 presentValue')***
But what is 2:5 here, the ip address should be something like: 192.168.1.1, right?
In my case, when I run "discover": enter image description here And I want to know the points for device ID 2039307, should I use "20393:10.192.62.15/24" instead of "2:5"
Thanks for your patience help!!!!
It is surprisingly simple to read data from a BACnet device with Python. In my case I have wireless BACnet thermostat in my home and I have set the static IP address of the device to 192.168.0.150. I have a PC running Linux mint and I'm using Jupyter Lab. Simply import BAC0 library and type the following three lines.
In my case, BAC0.connect returns the fist 9 lines and the last line is the IP address and node of the single device on my network. If you don't see any devices listed there is something wrong with your network or device setup.
Then you can use the following command to read an analog value which in my case is the current temperature.
which at the present time returns a value of 67.3. If you would like to read all the objects available to a particular device you can use the readMultiple command.
In my case this returned the following very large list
It is a great help to download a BACnet explorer tool like Yabe (Yet another bacnet explorer) although I have not been able to get it working with Linux mint though it works on Windows just fine.