#BACnet
1 messages ยท Page 1 of 1 (latest)
@fiery stirrup @livid trail
Let's continue here so we have all the context in one place
sure
we are talking about the bacnet PR https://github.com/home-assistant/core/pull/162584
i am doing some cleaning up right now, and will push a few changes, then will be ready for review later today
I mean, at the moment I think we need to look how we can push ourselves to explore how we can improve usability with this
So I am not looking to rush review, I kinda want to explore what BACnet is and how it works, and how it could work
in bacnet, there is no way to know what type of entity or device something is, right?
you don't know if a analog-input is a temperature control or a fan speed?
the most amount of info you can get is as per attached.
if you have a catalogue of every manufacturer' part you could. but this hasnt been done, and we wouldnt do it.
Why not?
The screenshot above is a is an off the shelf motor drive from danfoss with the bacnet/ip card (called and MCA125) installed.
no reason why not. but i guess it's as useful as counting sand particles. you @could do it@ but why?
Because then we can properly contextualise the entitites
right. the long answer is that bacnet is a commerical licensed thing
so if you are certified, you have a product, that is listed in here: https://www.bacnetinternational.net/btl/
BACnet Testing Laboratories (BTL) was developed and is operated by BACnet International to support compliance testing and interoperability testing activities. The BTL oversees operation of the global BACnet product certification program and administers the BTL Working Group (BTL-WG). The BTL is led by the BTL Manager and is assisted by the BTL T...
BACnet Testing Laboratories (BTL) was developed and is operated by BACnet International to support compliance testing and interoperability testing activities. The BTL oversees operation of the global BACnet product certification program and administers the BTL Working Group (BTL-WG). The BTL is led by the BTL Manager and is assisted by the BTL T...
click into it, and you see what i mean. nothing particularly useful
Like I'd rather see a Danfoss integration that then shows proper entities, because i have no clue what alarm word and alarm word 2 means
i think we are going down a rabbit hole here
Yes and no, yes we are and no I tried explaining you why I'm doing this and that I want to explore this because I think we can do better
the controller is configured, when it is installed, and these are then setup by the installer. quite often none are used. so in the use above everything is pretty much ignored.
None are used of what?
in my screengrab. almost none of the sensors and entities are actually useful. you would perhaps use one or two.. so you would monitor the actial speed of the drive, and you would control its speed remotely. of if the drive was configured to fill up a tank, (the drive would then be configured to have an input measuring water depth), a setpoint would be set, and the drive does its thing to keep the tank full.
But if none are useful, why should we add those as entities ๐
so you might have the drive setup so that one of its inputs is a temperature measure of its bearings.. and the dive would shutoff and alarm if the temp got too high.
becasue SOME are, and only the user knows what are useful. you cannot deduce this from looking at the drives bacnet interface
thats the probable with all field protocols. modbus, profinet etc
Yes, and I'm trying to push back to explore the idea of creating specific Barnet integrations that can contextualise this, so the user doesn't have to care
its a bunch of low level data points.
i understand what you are on about.
so lets dream for a bit.
!
suppose we made and integraion that discovers bacnet devices, and that integration then pushes out a discovery for 'FC-102 danfos motor drive'
Like, I think looking into this direction would be way more useful for the user and for the user experience tbf
hold it!
the model would be like SSDP discovery .
and another add-on woudl listen for these bacnet discoveries.
ok,
that would work.
but the vast majority of bacnet devices are from industrial vendors (danfoss, siemens, Schneider, ABB), etc.
this is not a problem becasue they are big vendors.
its becasue the bacnet devices are very specialised and can be altered by the end user making their data points change in meaning.
I haven't looked into how discovery could work yet
Can you elaborate on this?
so suppose we wanted to make the danfoss FC-102 integration, the UI in HA would need to do the following (which is actually done in the danfoss configuration tool, which i dont use anyway)..
- configure each of the inputs, and outputs of the drive. so temp/pressure/conductivity probes for each input
outputs, could be triggers for valves, flaps, etc.
you then model these in the config tool and push the config to the drive
(or you do it manually at the little screen - i do this)
- HA would need to be configured in exactly the same way
- HA would then show a diagram or widget which is a motor drive and 0-n inputs, all displaying, and 0-n outputs, and run state of the drive. e.g. a nice diagram like (let me find one)
this is ok,
the VFD block is the drive here.
so this is the macro view
detailed view (looking now)
Okay I need to understand this a bit better, the inputs and outputs are still the same right
using claude.!! wait
claude barfed. using gpt
all very nice.. but who cares
HA users will want to see perhaps 2 things in this example:
- the level of the tank
- the speed of the pump
so they can see when they run out of water, and can see when their pump runs
do you see a use case that requires more info?
the difficulty we have here is I think, that bacnet (and all other field protocols), give masses of data and control and flexibility, and we want to pick 2 items of usefulness form 100 bits of shit.
and finally claude has finished..
what people love doing is doing their entire house/factory/farm in svg diagrams, and using the HA floorplan add-on to write all the values all over the diagram.. and flash.animate things like motors and depths as the values change. These are called SCADA, and is a whole world of shit software.
i have been thinking of doing a scada overlay on HA. they do look very cool. but its a beast of a project to do properly. There are quite a few attempts at this on HACS and evern outside of HA. but to be honest they are all dogs
You mean the contextualisation I'm talking about?
yes.. but it would be very factory/farm focused, or high end house; that has lots of devices.
for instance, solar panels on roof, battery storage, and useage. this is a small scada issue. HA has very rudamentary versions of this for solar etc.
so imagine 20 solar panels. each need monitoring, and the scada screens need to show 20 panels.
there maybe 10 batteries, all different vendors..
there maybe 3 houses all drawing.
there maybe different tarrif rates for the incoming grid supplies.
its goes on and on!
But then you could create 20 different devices in HA
you can model a battery, a meter, a solar panel etc.
thats easy
making a picture.. not so easy. I suppose we could call claude from within HA, and prompt engineer the creation of the svg.
thats next level!
thats why perhaps the idea you had of templated entities, that feed off of the raw sensor and devices of the fieldbus (bacnet or whatever) is the way to go.
or you get another wave of OS addons that hook into bacnet discoveries, and build the higher level entities.
maybe we abstract out a fieldbus discovery (bacnet/profinet,...) and get addond on these?
we are going off piste again. this is really going very complex.
if you search the HA discord, there have been lots of asks for basic bacnet, as its such a bastard to use node-red bacnet
above is a discovered Mitsubishi AE-200 Arconditionling controller. This is pretty industry standard for AC cotnrol. Under the controls you see on off switches, for OnOffSetup_xxxx where xxx is a specific room. so the user would rename each one to be an on/off for each room.
look at the sensors below.. you see the same room IDs 0101 for instance as the suffice of AirDirectionState. and AlarmSignal
the most amount of discovery you can get from bacnet directly is this. but if you know the device you could make a climate control entity for each of the rooms.
and more.. warnings to show filters need changing in each room.
sensor showing fan speed for each room
so in our dream world we could implement an AE-200 controller. and pick up all of these entities, and make 7 rooms (or however many I have here), and in each room, you have perhaps one climate control entity, and fan control entity. somehting like that.
Yes
Okay let me try to draw a rough sketch tomorrow
I think I'll probably get it wrong, but I'll learn from it then
no prob. i know jack shit about python, so this is all learning for me
So at least we both know enough about one thing and nothing about the other ๐
๐ we are both learning fast though. i think my PR is pretty decent quality!
before i go. i want to doc an idea.
make 2 add-ons.
- bacnet "listener". this acts like the bluetooth infra in HA. it discovers bacnet devices and notifies any other addons that are interested, and they can grab hold of the bacnet device discovered and own it. this addon does nothing else
- bacnet entity creator. this receives from the listener above, and does what I have done in the screengrabs above. It creates entities for anything it sees.
.. then this will spawn loads more add-ons.. so you might see a mitsubishi AE-200 addon which then listens for AE2-- discoveries, and makes room controllers etc above. I guess I would make this one.. as I know it.
so rather like the way HA does SSDP
Right
I think both a good goals, but I kinda want to prioritize the first, and this might sound a little selfish
If we made the REST integration really really good, we wouldn't have that many integrations that work nice out of the box as we have today (as everyone would be sharing thousands of lines of REST config instead of making it an integration)
So I think there is a place for the bacnet entity creator, but I think we should make it easy for users to contribute their bacnet devices and their knowledge
For example today with modbus, you'd have to search through all kinds of modbus config files that people made, while there only exist a little amount of native integrations relying on modbus, like nibe_heatpump, iskra, etc
(but again, this is my personal opinion, not the projects, we're just exploring right now, so this isn't a definitive answer ๐ )
Hi! Have you seen the knx config panel? This is essentially that, but for another protocol. For Bacnet it sounds like you could, for a specific device, even configure a template schema (like FanSpeedState_{item}) per device to create sub-devices instead of individually address each entity? Or am I getting this wrong?
i do use the knx addon, but ididnt now you could do (like FanSpeedState_{item}). which would be useful!
i also think it would be nice if addons that are basically protocol controllers only like bluetooth/ssdp, could add pages to the Network Discovery entries at <HA>/config/network url
For instance the discovered bacnet devices and their attributes could be seen under BACNet browser
You can't in Knx... bit would it be applicable in bacnet? Or to frame it differently: are those sub-devices of uniform schema or are they typically very individual regarding their datapoints.
in my limited experience, the sub-devices are very individual as each bacnet device typically has many data points, which are used only if the device is configured to use them, and in most cases they are not. you cannot get the config via bacnet in a satndardised way.. so the mest you can do without understanding how the device is configured is by doing what i screenshotted above
mockup of what a bacnet browser at the url /config/bacnet could look like:
i suppose (in the dream), you could construct a virtual climate device, here is a full drag and drop mockup:
the climate entity is in the centre. and the available points are on the right. when you click on a entity point in the middle, (current temperature) the list on the right is filtered for you, so you only see read only temerpatures (you could unfilter if the bacnet device doesnt report the corect unit).
I reckon this is buildable fairly easily.
you could use exactly the same process for profinet, modbus and other field busses, or indeed existing simple sensors and numbers to build virtual complex devices (such as climate)
source
there will be some detail in mapping enums, or in the case of modbus in particular you would have to have multiplier and offset patterns for number mapping (e.g. modbus might use an integer 121 to represent the temperature of 12.1C). But this isnt so hard to do.
how to build a humidifier
just for fun. load up the html into a browser, and build an entity, and click create entity. you will see the following:
any good @hidden tartan ? ๐
i could do this all inside a bacnet addon. but to be community minded the pattern is useful elsewhere obvs
Do you need an Addon? I think this would all work in an integration as well.
Addon is now App - which is a containerd thing that needs HA OS.
An integration is (more or less) a Python package. Those work in HA container too.
this would be a bacnet integration
Here's an example how the backend for such thing could be built: https://github.com/home-assistant/core/blob/dev/homeassistant/components/knx/storage/config_store.py
So you don't need to handle yaml for entity creation.
Here is a mockup of the complete end-to-end flow.
Step 1 โ Integrations page
Starts on the Settings > Integrations page with an "Add Integration" button. No BACnet integration configured yet.
Step 2 โ Config Flow dialog (click Add Integration)
A proper HA-style config flow modal with 4 steps:
Network โ configure interface, port, APDU timeout
Discover โ scanning animation with "Sending Who-Is broadcast"
Select โ shows discovered devices with radio selection
Confirm โ success screen with device summary
Step 3 โ Integration card
After finishing the flow, you land back on the integrations page with the BACnet card showing the connected device, entity count, and the "Add Entity" button at the bottom.
Step 4 โ Entity Builder (click Add Entity)
Full-page panel with an entity type picker grid (Climate, Humidifier, Fan, Cover, Switch, Sensor) at the top, then the drag-and-drop point mapping below. Climate is fully wired up for the demo. When you create the entity, it appears back on the integration card.
You can repeat the Add Entity flow to build multiple entities โ they'll all stack up on the integration card. Try the full loop a couple of times to get the feel.