BACnet Support

The add-on will automatically subscribe to your BACnet points. To make them entities, you’ll have to install the custom integration linked in the description of the add-on.

Fantastic work and thanks for the advice.
This should be part of the HA setup.
I managed to find all my 239 entities from 4 devices and create automation strategies from those.
I recommend this to anyone trying to integrate BACnet on their system.

Once again thank for your hard work.

1 Like

I’ve been looking for a way to integrate BACnet points into HA on and off for a while, and just started looking again yesterday and found this.
I didn’t seem to have a issue installing the add-on and the web interface comes up, but I don’t seem to be able to discover any devices.
I’ve also attempted to install the integration, but when I attempt to add it with the default 127.0.0.1 entry (or the IP of my HA installation) when submitting the reply is “Unknown error occured”.

This is the " Bepacom EcoPanel BACnet/IP Interface" debug log when:

  • starting,
  • sending a “whois” followed by “iam”
  • attempting to add the " Bepacom BACnet/IP Interface" integration using 127.0.0.1
  • sending a “whois”
  • attempting to add the " Bepacom BACnet/IP Interface" integration using 192.168.69.62
  • sending a “whois”
  • attempting to add the " Bepacom BACnet/IP Interface" integration using 127.0.0.1

sending a “WhoIs” to the network. one Item I see is that sticks out is that the address listed is 192.168.69.62/24, while this test network is/should be /22. I also saw if I tried to manually configure it with 192.168.69.62/22 the log would indicate the address of 192.168.69.62/22/24 (it shouldn’t affect anything in my case using /24 and not /22 as all devices fall in the /24 range.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-interface: starting
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
[14:26:18] INFO: Running NGINX
[14:26:18] INFO: Generating BACpypes.ini
2023/06/08 14:26:18 [notice] 58#58: using the "epoll" event method
2023/06/08 14:26:18 [notice] 58#58: nginx/1.24.0
2023/06/08 14:26:18 [notice] 58#58: OS: Linux 6.1.29
2023/06/08 14:26:18 [notice] 58#58: getrlimit(RLIMIT_NOFILE): 1073741816:1073741816
2023/06/08 14:26:18 [notice] 58#58: start worker processes
2023/06/08 14:26:18 [notice] 58#58: start worker process 78
Using enp2s1 with 192.168.69.62...
[BACpypes]
objectName: EcoPanel
address: 192.168.69.62/24
objectIdentifier: 420
maxApduLengthAccepted: 1024
segmentationSupported: segmentedBoth
vendorIdentifier: 15
foreignBBMD: -
foreignTTL: 255
maxSegmentsAccepted: 24
loglevel: DEBUG
defaultPriority: 15
s6-rc: info: service init-interface successfully started
s6-rc: info: service interface: starting
s6-rc: info: service interface successfully started
s6-rc: info: service discovery: starting
[14:26:19] INFO: Running interface
Traceback (most recent call last):
  File "/usr/bin/main.py", line 183, in <module>
    main()
  File "/usr/bin/main.py", line 158, in main
    this_application = BACnetIOHandler(this_device, args.ini.address)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/BACnetIOHandler.py", line 171, in __init__
    BIPSimpleApplication.__init__(self, *args)
  File "/usr/local/lib/python3.11/site-packages/bacpypes/app.py", line 535, in __init__
    self.mux = UDPMultiplexer(self.localAddress)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bacpypes/bvllservice.py", line 102, in __init__
    self.broadcastPort = UDPDirector(self.addrBroadcastTuple, reuse=True)
DEBUG:      Using selector: EpollSelector
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bacpypes/udp.py", line 155, in __init__
    self.bind(address)
  File "/usr/local/lib/python3.11/asyncore.py", line 331, in bind
    return self.socket.bind(addr)
           ^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 99] Address not available
INFO:     Started server process [144]
INFO:     Waiting for application startup.
[14:26:24] ERROR: Got unexpected response from the API: Service bacnet_interface not found for dictionary value @ data['service']. Got 'bacnet_interface'
[14:26:24] INFO: Successfully send discovery information to Home Assistant.
s6-rc: info: service discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:7813 (Press CTRL+C to quit)
INFO:     172.30.32.2:0 - "GET /apiv1/command/whois HTTP/1.0" 200 OK
INFO:     172.30.32.2:0 - "GET /apiv1/command/iam HTTP/1.0" 200 OK
INFO:     None:0 - "GET /apiv1/json HTTP/1.0" 200 OK
2023/06/08 14:26:58 [error] 78#78: *6 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "192.168.69.62"
2023/06/08 14:26:58 [error] 78#78: *7 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "172.30.232.1"
2023/06/08 14:26:58 [error] 78#78: *8 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "172.30.32.1"
INFO:     None:0 - "GET /apiv1/json HTTP/1.0" 200 OK
2023/06/08 14:27:01 [info] 78#78: *1 client 172.30.32.2 closed keepalive connection
INFO:     172.30.32.2:0 - "GET /apiv1/command/whois HTTP/1.0" 200 OK
2023/06/08 14:27:19 [info] 78#78: *4 client 127.0.0.1 closed keepalive connection
INFO:     None:0 - "GET /apiv1/json HTTP/1.0" 200 OK
2023/06/08 14:27:19 [info] 78#78: *6 client 192.168.69.62 closed keepalive connection
2023/06/08 14:27:19 [error] 78#78: *14 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "192.168.69.62"
2023/06/08 14:27:19 [info] 78#78: *7 client 192.168.69.62 closed keepalive connection
2023/06/08 14:27:19 [error] 78#78: *15 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "172.30.232.1"
2023/06/08 14:27:19 [info] 78#78: *8 client 192.168.69.62 closed keepalive connection
2023/06/08 14:27:19 [error] 78#78: *16 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "172.30.32.1"
2023/06/08 14:27:33 [info] 78#78: *10 client 172.30.32.2 closed keepalive connection
2023/06/08 14:27:41 [info] 78#78: *12 client 127.0.0.1 closed keepalive connection
2023/06/08 14:27:41 [info] 78#78: *14 client 192.168.69.62 closed keepalive connection
2023/06/08 14:27:41 [info] 78#78: *15 client 192.168.69.62 closed keepalive connection
2023/06/08 14:27:41 [info] 78#78: *16 client 192.168.69.62 closed keepalive connection
INFO:     172.30.32.2:0 - "GET /apiv1/command/whois HTTP/1.0" 200 OK
INFO:     None:0 - "GET /apiv1/json HTTP/1.0" 200 OK
2023/06/08 14:27:55 [error] 78#78: *21 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "192.168.69.62"
2023/06/08 14:27:55 [error] 78#78: *22 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "172.30.232.1"
2023/06/08 14:27:55 [error] 78#78: *23 access forbidden by rule, client: 192.168.69.62, server: , request: "GET /apiv1/json HTTP/1.1", host: "172.30.32.1"
INFO:     None:0 - "GET /apiv1/json HTTP/1.0" 200 OK

HA has cnanged so many times but I’m pretty sure I’m running HA OS, its running as a standalone VM on a ESXi host:

Home Assistant 2023.6.0
Supervisor 2023.06.1
Operating System 10.2
Frontend 20230607.0 - latest

I’ve scanned/watched for messages from it (wireshark & BACnet discovery tools) and haven’t seen any traffic yet so I think its likely a config issue on my side, just not sure where to start. Discovery searches from tools detect the hardware devices on the network, and they detect the discovery tools, HA unfortunately is still sitting in the dark.

Any ideas where to start looking?
Thanks in advance.

+1 on this, BACnet wide use in BMS, but it rare in consumer product. But HA should support it.

Can you tell me the name and model of you BACnet controller?

Hi we are using many different types of BACNet devices, but the main ones are:

IQ4E Controller by Trend Control Systems Ltd (part of Honeywell)
SIP+ Controller by Synapsys Solutions Ltd
iSMA-B-MIX18-IP by Global Control 5 S.A.
Various Tridium JACE models running Niagara BACNet Drivers

Hope it helps you.

1 Like

By default the detected IP will be suffixed by /24, if your IP is /22 then you’ll have to add this manually. This has to do with the broadcast address of the network. With /24 while your network is /22 you probably won’t detect anything. Once you see devices appear on the add-on, the integration should work as well. Before anything other than /24 wouldn’t work, but it should now. Please try it again and let me know if this works.

+1 for BacNet integration being more mainstream in HA too

Just came across this video from 8 days ago talking about MKs new connected sockets. Currently very expensive but looks like a big development in the commercial works that could benefit the household one…

1 Like

Hey, I did manage to impelent BACnet with node-red.

First I used to do it with nodes that needed a per-node configuration, in my last effort I managed to do so with one node that handles all of the write actions with payload input on the node itself. I found a old nmp project that needed some modification and created an set of custom nodes that work and take a non complicated JSON object to send the data to the device (which you also define in the JSON).

The set of nodes is a bit messy under the hood, but if there’s still demand for a simple yet flexible BACnet integration I’m willing to clean up the code and make it even simpler.

If you’re interested please send me a message through the forum or github (CervezaStallone (Brian Rodriguez) · GitHub)

Hi
I am new to node red so this may seem very basic. How can I look at the properties of your bacnet write msg block?

Hi there. I have a Loytec BMS system with Bacnet over ip, and I only need to control 5 relay outs on HA. I have 5 Jacuzzis in my hotel, that I need to control the heating. I managed to get the temperature from the BMS using SCRAPE but I don’t seem able to control the switches.

HA’s ip is http://xxx.xxx.100.10:8123/lovelace/default_view

The data points are:
http://xxx.xxx.102.1/webui/data/lgtw_dp/LIOB-IP/LIOB-552_5/DO3/L2_5_DO3_Output up to DO7/

Any ideas? restful? Node Red? Other?

Note that I have zero knowledge on Node Red (but I am learning fast)

I am using HomeAssistant for a large Z-Wave installation. I am currently using ComfortClick for BACnet (currently 9 BACnet controllers). I would like to merge the BACnet into Home Assistant. I am certain HomeAssistant will embrace BACnet at some point. I am hoping it is soon.

Ok, I made some progress through Node Red. I have exposed the bacnet datapoints from the server, and now they respond on Instances 1000-1004. This is what I get in YABE for point 1000:

image

The question is, how to create a switch in HA to control the output

I am going throuth the MQTT way but I get this error while trying to configure switches on HA

image

What is wrong?

Hey, I did manage to impelent BACnet with node-red.

First I used to do it with nodes that needed a per-node configuration, in my last effort I managed to do so with one node that handles all of the write actions with payload input on the node itself. I found a old nmp project that needed some modification and created an set of custom nodes that work and take a non complicated JSON object to send the data to the device (which you also define in the JSON).

The set of nodes is a bit messy under the hood, but if there’s still demand for a simple yet flexible BACnet integration I’m willing to clean up the code and make it even simpler.

If you’re interested please send me a message through the forum or github (CervezaStallone (Brian Rodriguez) · GitHub)

Sounds good, but I already found a nice solution, using the bitpool edge bacnet gateway already available on the palette. Check here:

They also have a nice video that explains everything. The main issue is that HAOS runs Node-Red on docker and the ethernet interface is not exposed to the Gateway node so it cannot be configured. You need to either reconfigure the docker connectivity to host mode, with risk to create issues to HA, or as I did, install Node-Red on another system, configure Bitpool Edge there and through MQTT take control on HA. So far everything is working except switches. I am still fighting to make them work! Messages pass to MQTT as the explorer shows, but they cannot change the payload value to bacnet. YABE manually works

Check my DHW/Clima Dashboard!

2 Likes

Looks great!

I ve gone a little further!

@GravySeal: Trying to use BEPACOM for a BACnet integration but I can’t seem to get your add-on working. It looks like I’m getting an error when initializing NGINX and then a warning when trying to bring up services. Any help would be greatly appreciated. Here is my log file:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Bepacom EcoPanel BACnet/IP Interface
 Bepacom BACnet/IP interface for the Bepacom EcoPanel. Allows BACnet devices to be available to Home Assistant through an API
-----------------------------------------------------------
 Add-on version: 1.1.3
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.5  (armv7 / raspberrypi3)
 Home Assistant Core: 2023.10.3
 Home Assistant Supervisor: 2023.10.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-interface: starting
[18:03:11] INFO: Initialising NGINX
[18:03:11] INFO: Generating BACpypes.ini
s6-rc: warning: unable to start service init-nginx: command exited 1
[BACpypes]
objectName: EcoPanel
address: 192.168.29.211/24
objectIdentifier: 420
maxApduLengthAccepted: 1476
segmentation: segmentedBoth
vendorIdentifier: 15
foreignBBMD: -
foreignTTL: 255
maxSegmentsAccepted: 64
loglevel: DEBUG
defaultPriority: 15
updateInterval: 60
s6-rc: info: service init-interface successfully started
s6-rc: info: service interface: starting
s6-rc: info: service interface successfully started
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service interface: stopping
[18:03:16] INFO: Service BACnet Interface exited with code 256 (by signal 15)
s6-rc: info: service interface successfully stopped
s6-rc: info: service init-interface: stopping
s6-rc: info: service init-interface successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

I have NGINX Home Assistant SSL proxy installed as an add-on and by default port 80 is disabled. I have tried enabling port 80 in my NGINX add-on but this doesn’t impact my BEPACON error and warning.

Hey chad01,

I am reading the logs and it looks like the init-nginx script fails on startup.
This isn’t related to ports, but maybe it relates to ethernet adapters. Could you give me your adapter name?
Could you try the development version and post logs again?