// projecten / home assistant / changelog

Changelog: Home Assistant BACnet-integratie

Alle stabiele releases, nieuwste eerst. Beta-versies staan alleen op GitHub. De release-notes zijn in het Engels. Terug naar de projectpagina.

v1.0.53

· GitHub

Stable release of 1.0.53-beta.1 to beta.3. Restart Home Assistant after updating.

Fixed

  • Energy and volume sensors (Wh, kWh, MWh, L, m³) got state class measurement, which Home Assistant rejects for these device classes: a warning in the log and no use in the Energy dashboard (#137). They are now total_increasing. Other analog sensors keep measurement. After updating, click Fix issue once per changed sensor under Developer tools → Statistics.
  • Device discovery listed Home Assistant itself (HomeAssistant-BACnet) and pre-selected it: the Who-Is broadcast also reaches the integration's own BACnet node. It is no longer listed.

Added

  • State class per object in Customize objects, for analog sensors: Automatic, Measurement, Total increasing, Total or None. Set a meter that is not a counter (a tank level, last month's total) to measurement; it then becomes an energy or volume storage sensor, which Home Assistant allows.

Changed

  • The options open with a menu (#137): Settings, Rescan device and Customize objects, each one click away. The Rescan device and manage BACnet object selection checkbox is gone. Settings save directly; Rescan device still continues to Customize objects.
  • The state class choices have readable labels (Automatic, Measurement, Total increasing, Total, None) with a short explanation. The options menu labels are shorter so they fit.
  • Usage statistics are sent every 6 hours instead of once a day, only while Share usage statistics is ticked. The report itself is unchanged. The server keeps a marker that an installation is currently active, to count how many installations are active right now; it is stored securely and separately from the installation ID, holds no time history and is deleted within 8 hours of the latest report. See the updated privacy policy.

Full Changelog: v1.0.52...v1.0.53

v1.0.52

· GitHub

Stable release of 1.0.52-beta.1 to beta.3. Restart Home Assistant after updating.

Fixed

  • Device search in setup found nothing with an empty Local IP address, or a local IP without subnet prefix (e.g. 192.168.1.100 instead of 192.168.1.100/24). The Who-Is broadcast never left Home Assistant (RuntimeError: no broadcast in the log). The integration now asks Home Assistant which network interface it uses and sends the Who-Is to that subnet's broadcast address. With a device already set up, the search reuses its connection, so this also fixes searching when you typed a local IP. Existing installations keep the same network binding and BACnet device instance.
  • NaN values (for example from an unconnected input) made Home Assistant reject the sensor's state and log an error on every update. A NaN or infinite value now shows as unknown.

Changed

  • Local IP address in setup: leaving it empty is now the recommended choice. Only fill it in when Home Assistant has several network interfaces and BACnet is on another one.

Full Changelog: v1.0.51...v1.0.52

v1.0.51

· GitHub

Stable release of the 1.0.51 beta line (beta.1 to beta.6). Upgrading from 1.0.50 needs no action.

Selecting objects on large devices (#90)

  • Setup: the object list is a searchable dropdown. Type to filter by type, abbreviation (AI, BO 3, MSV), instance or name; picked objects show as chips. Nothing is selected up front.
  • Import all objects of these types: tick a type (with its count, e.g. Analog Input (40)) to import all its objects, together with any single objects you pick. Select all objects still imports everything.
  • Rescan has three fields instead of one long list: Objects to add (not imported yet, marked NEW), Add all objects of these types and Objects to remove. Submitting without changes keeps your selection.
  • Customize objects uses the same searchable list.
  • Object labels include the BACnet abbreviation, e.g. Analog Input (AI 1) — Room temp.

Repairs: keep deliberate entity types (#97)

  • The Incorrect entity types message now offers Remove the overrides or Keep my types. Kept objects, and any type you set in the options, are never flagged again. Some devices accept writes without a Priority Array, so a switch can be the right choice.

Usage statistics

  • Share usage statistics sends one small report a day: manufacturer, model, firmware, whether COV and ReadPropertyMultiple work, object counts per type, connection type, versions and a random installation ID. Never addresses, names or values; the server never stores your IP address.
  • Ticked by default when you add a device; untick it there or later in the device's options. Existing installations are asked once in Settings → Repairs, and that question never comes back.
  • It grows the tested devices list: only manufacturer, model and firmware become public, after the maintainer checks them.
  • New privacy policy (English and Nederlands), linked under the checkbox.

Fixed

  • Submitting the object step without objects left an empty form; it now asks you to select at least one object and keeps the list.
  • The rescan field showed as selected_objects instead of a translated label.

Maintenance

  • Test-only dependency bumps (uv, pydantic, tqdm). No effect on the integration.

Full Changelog: v1.0.50...v1.0.51

v1.0.50

· GitHub

Highlights since 1.0.49

New

  • Schedules — BACnet Schedule objects as a sensor, with bacnet.read_schedule and bacnet.write_schedule for the weekly schedule, exceptions and default. Writes are read back, and removing existing exceptions is refused unless you set allow_removal (#52).
  • Alarms — an Alarm binary sensor and an Active alarms sensor per device, a bacnet_in_alarm attribute and a bacnet_alarm event for automations.
  • Trend logs — read a controller's logged records with bacnet.read_trend_log; Trend Log objects as a sensor.
  • Any BACnet property — bacnet.read_property, and bacnet.write_value with property, also on objects you didn't import; extra properties as their own entities.
  • Rescan shows what's new — objects found for the first time are listed first and marked NEW; labels include the description (#61).
  • Tested devices list in the README, with a device report form.

Fixes

  • No more reload loop when a device's metadata couldn't be read at setup (#62, Siemens PXC200).
  • COV slots no longer run out after a restart — each object keeps the same COV subscriber id (#52).
  • COV increment now defaults to 0 — the device's own covIncrement is left alone unless you set a value.
  • bacnet.relinquish works — it always failed before (#57).
  • BBMD discovery crash and slow-device onboarding timeout (#54, #52); RPM chunk size converges on the first read (#58); leftover entities are removed after changing an object's type.

Also

  • BACpypes3 0.0.110.
  • README: Safety on a live site, table of contents, examples, screenshots.

What's Changed

New Contributors

  • @github-actions[bot] made their first contribution in #79

Full Changelog: v1.0.49...v1.0.50

v1.0.49.1

· GitHub

Hotfix on the 1.0.49 stable line. Built on top of 1.0.49 only: none of the 1.0.50 beta changes (BACpypes3 0.0.110, Schedule support) are included.

Fixed

  • Relinquish always failed. The bacnet.relinquish action (and any write of an empty/Null value) failed on every object type with Write failed for <object>.presentValue = None:. The integration was sending an invalid Null value; it now sends a proper BACnet NULL, so commanded priority-array slots can be released again.

Housekeeping

  • Lint-only updates for the latest Ruff (asyncio.TimeoutError → TimeoutError, timezone.utc → UTC); no behaviour change.

Same fix is in #57 for the 1.0.50 beta line.

v1.0.47

· GitHub

Release v1.0.47

This is the biggest release so far: bug fixes found in a full audit, a performance overhaul for larger devices, and many user-experience improvements. It is the stable version of 1.0.47-beta.1, with no functional changes since the beta.

Requires Home Assistant 2024.4 or newer (was 2024.1).

Fixes

Saving the options silently changed every object's entity type and COV setting

Saving the options stored an override for every object, based on a default that ignored whether the object is commandable. As a result:

  • non-commandable Binary Values became switches, and the device rejected every write;
  • the device-wide Enable COV switch stopped having any effect.

Now only settings you actually changed are stored.

Already affected? A message appears under Settings → Repairs listing the objects concerned. Confirm it to reset them. Types you chose deliberately are left alone.

Entities stayed "available" while the device was offline

During an outage, entities kept showing their last value as if nothing was wrong. They now become unavailable. The same happens for an object whose status flags report FAULT, because the device itself then says the value is unreliable.

Write priority 17 removed

BACnet priorities run from 1 to 16, so a device rejects every write at priority 17.

Climate "Off" was never shown

After switching a climate entity off (relinquish), the device reports its Relinquish Default, so the entity kept showing Heat. It now shows Off, also after a restart.

A device offline at startup leaked resources

Each setup retry left the shared network socket and any COV subscriptions behind.

Integration would not load on Home Assistant 2026.8+

The services used a Home Assistant helper that was removed in 2026.8.

Device IP address in logs

The device's IP address is now masked in all log messages, like everywhere else in the integration.

Performance

Much lighter on the network and on Home Assistant, especially for devices with many objects:

  • Polling in batches. ReadPropertyMultiple polls are sent in batches (25 objects per request) instead of one request for all objects. If a device rejects a request as too large, the batch size shrinks automatically. RPM is no longer switched off permanently for the device.
  • Faster when RPM isn't available. Individual reads run 4 at a time instead of one by one. An offline device is recognised within seconds, instead of each read waiting out its own timeout.
  • Faster startup. COV subscriptions are set up in parallel. A device that doesn't support COV is detected after the first few objects.
  • Fewer writes to the device. The COV increment is only written when its value differs. Many controllers store it in non-volatile memory, so this saves wear.
  • Less work per COV notification. A notification now updates only its own entity, not every entity of the device.
  • Metadata checks no longer block polling. The hourly metadata check runs in the background and uses batched reads, instead of 5 separate reads per object. Discovery during setup uses the same batched reads and is much faster.
  • Fewer reloads. Metadata changes found close together cause one reload instead of one per object.
  • Faster writes. After a write, only that object is re-read, not the whole device.
  • Full precision, smaller history. Sensors keep the device's full precision; Home Assistant shows 2 decimals by default, and you can change that per entity. Static attributes are no longer stored in the recorder with every state change.

New

  • Relinquish and one-off writes. Two new services:
    • bacnet.relinquish releases Home Assistant's command on an object (writes Null), so lower priorities or the Relinquish Default take over;
    • bacnet.write_value writes a value once at a priority of your choice.
  • Readable object customisation. Under Configure, tick the objects you want to change by name, then set their entity type and COV setting. You no longer get a long list of domain_2:5 fields.
  • Climate with a real room temperature. A climate entity can take its current temperature from another object, such as a room sensor.
  • Values from the device itself:
    • number entities use the object's minPresValue, maxPresValue and resolution as limits and step;
    • multi-state objects can be shown as a select with their stateText labels (Off / Heat / Cool instead of 1 / 2 / 3);
    • multi-state entities get a bacnet_state_text attribute;
    • many more engineering units are recognised: 35 instead of 14, including K, lx, m³/h, MWh, bar, psi, VA, L/min and ppm.
  • Reconfigure. Change the IP address, port, BBMD settings or device address without removing the integration. Entities, history and options are kept.
  • Troubleshooting tools:
    • a diagnostics download (network addresses are hidden);
    • diagnostic sensors: last successful poll, COV subscriptions, consecutive failed polls;
    • a Repairs message when a device stays unreachable, with what to check. It clears by itself once the device responds.
  • Clear errors. A write the device rejects now shows an error message instead of silently doing nothing.
  • Tidier device page. The Write Priority select and the metadata refresh button are listed under Configuration.
  • Dutch translation of the whole interface.
  • Minimum polling interval. The polling interval is now at least 10 seconds. Polling always runs, even with COV enabled, so very short intervals mostly add load.

Worth knowing when upgrading

  • Analog sensors now report more decimals in their state. History looks slightly different; statistics continue normally.
  • The first metadata check after upgrading may reload the integration once, to pick up the new metadata (state texts, limits). Use Refresh object metadata to do it right away.
  • If you saved the options in an earlier version, check Settings → Repairs.

Testing

  • 327 unit tests.
  • A new smoke-test suite loads the integration in a real Home Assistant, at the minimum supported version and the latest release, on every change. It caught the HA 2026.8 issue above before it reached anyone.

Found a problem? Please open an issue with your device type and the diagnostics download: https://github.com/CervezaStallone/Home-Assistant-BACnet-integration/issues

Full Changelog: v1.0.46...v1.0.47

v1.0.46

· GitHub

What's Changed

Full Changelog: v1.0.44...v1.0.46

v1.0.44

· GitHub

Fix: metadata reload storm still triggered by object_name/description/units flapping (#27)

1.0.43 fixed spurious reload loops caused by the commandable flag flipping on a transient read timeout, but the same bug was still present for objectName, description, and units. A failed/timed-out read of any of these was treated as a confirmed change (falling back to a placeholder or None), which looked like the device's metadata had changed and triggered a full config-entry reload — causing entities to repeatedly show "Initializing".

This release extends the existing "preserve on transient failure" behavior (already applied to commandable) to all four metadata fields. A failed read now keeps the previously-known value instead of assuming it changed.

Changed: custom_components/bacnet/bacnet_client.py, custom_components/bacnet/coordinator.py

v1.0.43

· GitHub

Fix

  • Entities repeatedly flashing "Initializing" / going unavailable, caused by the periodic and COV-triggered metadata refresh added in 1.0.42 (#26). A transient timeout reading priorityArray was incorrectly treated as a real device change, triggering an unnecessary config entry reload every cycle. Fixes #27.

v1.0.42

· GitHub

Live COV metadata refresh (closes #26)

Metadata for BACnet objects (e.g. unit_of_measurement) now refreshes live via SubscribeCOVProperty instead of only on the stale-metadata poll cycle.

  • Subscribe to BACnet property COV notifications and push metadata changes into the coordinator immediately
  • New "live metadata properties" option in the integration config UI
  • Fixed metadata reload never firing because entry.data == data
  • Fixed unit_of_measurement not updating when BACnet metadata changes

v1.0.41

· GitHub

What's new

Remote-station addressing (closes #22)

The target-device-address field now accepts a BACnet remote-station address (network:instance, e.g. 20000:1) in addition to a plain IP — for devices reachable only through a router (e.g. Lutron Vive room controllers, Titan network routers). COV subscriptions to a remote-station target also fixed (previously hardcoded to IPv4-only).

Broadcast Who-Is fix (closes #23)

The local IP field now accepts a CIDR subnet prefix (e.g. 192.168.1.100/24). Without one, the local address was an implicit /32 with no broadcast address, so every Who-Is discovery on a directly-attached subnet failed with RuntimeError("no broadcast") — with no configuration-only workaround. Field description updated to state the prefix requirement up front.

Write priority now gated on real per-object commandability (closes #24)

Writes to Binary/Analog Value objects previously always carried a BACnet priority argument, even for instances that don't actually have a Priority Array — many devices reject that outright. Writes now use the actual per-object commandable flag discovered during setup instead of guessing from the object type. Also fixes the same defect in covIncrement writes, which should never carry a priority argument regardless of commandability.

Known remaining gap

Auto-discovering devices behind a router (without knowing the remote-station address up front) is tracked in #25 — the manual network:instance entry above is a working interim path if you know your device's routed address.

v1.0.40

· GitHub

What's new

Configurable Write Priority (closes #20)

A new Write Priority select entity is added per BACnet device. It is disabled by default — enable it manually in the HA entity settings if you need to change the priority level.

Available priority levels: 8, 9, 12, 13, 14, 15, 16, 17

  • Default remains 16 (lowest / safest priority)
  • Use 8 for Manual Operator override
  • Selection persists across HA restarts
  • Changing the priority affects all writable entities on that device (switch, number, climate)

Also included (from v1.0.30-beta)

  • Per-object COV override toggle in options flow
  • BACnet client reconnect after network outage (#18/#19)
  • Entity unique-id migration (1.0.17 → 1.0.18+ format)
  • Per-object HA domain mapping in options flow

How to enable the Write Priority selector

  1. Go to Settings → Devices & Services → BACnet
  2. Open your device
  3. Find the Write Priority entity (disabled by default)
  4. Click the entity → enable it
  5. Use the dropdown to select your desired priority level

v1.0.20

· GitHub

Fixed

  • Reconnect BACnet client after extended network outages (#18). Previously, an outage longer than the BBMD foreign-device registration TTL (15 min) or COV subscription lifetime (5 min) left the integration silently stale, requiring a manual disable/enable. The coordinator now surfaces UpdateFailed after repeated silent poll failures, triggers a client reconnect once failures cross a threshold, and rebuilds COV subscriptions after the connection recovers.

Other

  • tests/ and pyproject.toml now tracked in the repo.
  • .gitignore cleanup.

Full Changelog: v1.0.19...v1.0.20

v1.0.19

· GitHub

Bug Fixes

Entity IDs reset after update (#16)

The 1.0.18 update changed the internal unique_id format for every entity without including a migration step. Users who had renamed entity IDs found their customisations lost after updating.

A migration now runs automatically at startup and restores custom entity IDs for both upgrade paths:

  • 1.0.17 → 1.0.19: entity IDs fully preserved on update
  • 1.0.18 → 1.0.19: custom entity IDs are recovered from the orphaned 1.0.18 entries

COV rejection log spam (#17)

Devices that return optional-functionality-not-supported for COV subscriptions (e.g. iSMA-B-4U4O-H-IP) were generating noisy WARNING-level log entries with full tracebacks on every renewal attempt. This was cosmetic — polling always ran correctly — but made logs alarming and hard to read.

Known device-capability rejections are now logged at DEBUG level without a traceback. Unexpected COV errors still produce a WARNING with full traceback so real problems remain visible.

v1.0.18

· GitHub

What's Changed

Bug Fixes

  • #14 — unit_of_measurement and device_class now correctly populated on sensor entities. BACpypes3 returns hyphenated engineering unit strings (degrees-celsius, kilowatt-hours, etc.) but the lookup tables used camelCase — so no sensor ever received a unit or device class. Also fixes kiloPascals which was not a valid enum member at all.
  • C1 — Port collision on multi-device restart: One BACnetClient (UDP socket) is now shared per port across all config entries. A second device on the same port no longer fails with ConfigEntryNotReady on HA restart.
  • H1 — statusFlags coercion: BACpypes3 StatusFlags is now correctly converted to [bool, ...] instead of '' (empty string).
  • H2 — Entity unique_id stability: Now uses the BACnet device instance number instead of the HA entry_id, so entity history survives remove-and-re-add of the integration.
  • H3 — Climate hvac_mode persistence: Mode is now derived live from presentValue (None → OFF) instead of an in-memory flag that was lost on HA restart.
  • H4 — Non-commandable Binary Value routing: Non-commandable BV objects now correctly land on binary_sensor instead of switch.
  • H5 — Hard-coded device instance: Device instance is now derived deterministically from local IP:port via SHA-256, eliminating the hard-coded 999999 that could collide with real devices.
  • A1 — Silent entity drop for non-commandable BV: _get_platforms_in_use now uses commandable-aware domain logic, so the binary_sensor platform is always set up when needed.
  • A2 — percent unit no longer mapped to HUMIDITY device class. BACnet unit 98 is a generic percentage (damper position, CO₂, etc.) and was incorrectly classifying sensors as humidity sensors.
  • A3 — BACpypes3 Enumerated and Real subtypes are now normalised to plain Python int/float before storage, fixing JSON serialisation edge cases.
  • A4 — Both firmware revision and software revision are now surfaced in HA's device info sw_version field.

Improvements

  • M1 — ReadPropertyMultiple: All objects for a device are now fetched in a single RPM request per poll cycle instead of N sequential read_property calls, significantly reducing poll latency on larger devices. Devices that reject RPM fall back permanently to per-object reads.
  • M3 — COV subscription confirmation now uses asyncio.Event instead of sleep(0.5).
  • L1 — _mask_address (IPv4 log privacy) consolidated into helpers.py; no longer duplicated.
  • L2 — Switch docstring corrected: turn-off writes inactive (0), not Null.
  • L3 — COV callback now drains all queued values before firing, sending one update per notification instead of one per property.

v1.0.16

· GitHub

Release v1.0.16

New Features

Automatische device-identificatie vanuit BACnet

Tijdens discovery worden nu de volgende BACnet properties automatisch
uitgelezen van het Device Object:

BACnet Property HA Device Registry vendorName (property 121) Manufacturer modelName (property 70) Model applicationSoftwareVersion Software version firmwareRevision Firmware version

Hierdoor toont het HA apparaatregister de werkelijke fabrikant, model en
versie-informatie van het BACnet device — in plaats van het generieke
"BACnet" / "BACnet Device 599".

Bewerkbare apparaatnaam tijdens setup

In de "Select BACnet Objects" stap van de config flow staat nu
bovenaan een tekstveld "Device name", vooraf ingevuld met de BACnet
objectName van het device. De gebruiker kan dit aanpassen voordat de
config entry wordt aangemaakt.

Zowel de integratietitel als de apparaatnaam in het HA device registry
gebruiken de gekozen naam.

COV- en update-informatie zichtbaar per entity

Elke entity toont nu in de extra state attributes:

Attribuut Beschrijving bacnet_update_method COV of polling — hoe het object wordt bijgewerkt bacnet_cov_increment Geconfigureerde COV-drempelwaarde (alleen bij analoge objecten met actief COV)

Hiermee is direct zichtbaar welk update-mechanisme per object actief is
en wat de ingestelde gevoeligheid is.


Bug Fixes

Fix: waarden updaten niet in HA ondanks wijziging op device

Objecten met een actieve COV-subscriptie werden voorheen uitgesloten
van polling
. Als een device de COV-subscription accepteert maar nooit
daadwerkelijk notificaties stuurt, werden die objecten nooit meer
bijgewerkt in HA.

Oplossing:
Alle objecten worden nu altijd gepoll (elke 30 seconden) als
betrouwbare baseline. COV-subscripties bieden nog steeds snellere
tussentijdse updates, maar polling garandeert dat waarden altijd
bijwerken — ongeacht of het device correct COV-notificaties verstuurt.


Overig

README herschreven

De README is volledig herschreven met focus op gebruiksvriendelijkheid:

  • Toegankelijke intro in gewone taal
  • Stap-voor-stap setup-instructies
  • Nieuwe features gedocumenteerd (COV increment, device naming, vendor
    info, update method attributes)
  • Entity attributes tabel met alle extra state attributes
  • Device information sectie
  • Troubleshooting tabel

v1.0.15

· GitHub

Release v1.0.15

Bug Fixes & Improvements

Fix: BACpypes3 ErrorRejectAbortNack crash (hoofdoorzaak "Unknown error")

BACpypes3 v0.0.99 heeft een klasse ErrorRejectAbortNack die van BaseException
erft — niet van Exception. Wanneer een BACnet device antwoordt met een
fout (bijv. unknown-property bij het lezen van priorityArray op objecten die
dit niet ondersteunen), wordt deze error niet gevangen door except Exception.

Dit veroorzaakte dat de read-loop stopte bij analog-value,0 / priority-array
en de overige objecten (AV:1, BI, BO, BV) nooit werden gelezen. HA toonde
"Unknown error occurred" zonder enige log in de integratie, omdat de error alle
handlers passeerde.

Oplossing:

  • ErrorRejectAbortNack geïmporteerd uit bacpypes3.apdu
  • Expliciet gevangen in _safe_read (zowel raised als returned error objects)
  • Toegevoegd aan alle except-clausules in bacnet_client.py:
    read_object_list, read_device_info, write_property, subscribe_cov
  • Geverifieerd: alle 16 objecten worden nu succesvol gelezen van de virtuele device

Robust error handling in config flow en object reads

  • CancelledError handling: asyncio.CancelledError wordt nu correct
    afgevangen op elk niveau van de call-chain:
    _safe_read → _read_object_metadata → read_object_list → config flow.

  • Per-object error isolatie: Als het lezen van metadata voor één BACnet object
    mislukt, wordt alleen dat object overgeslagen — de rest gaat door.

  • objectList response validatie: Guard toegevoegd tegen niet-itereerbare of
    ongeldige objectList responses.

  • Ongeldige OID afhandeling: Object identifiers die niet als (type, instance)
    tuple uitgepakt kunnen worden, worden gelogd en overgeslagen.

Uitgebreide diagnostische logging

  • Volledige tracebacks (exc_info=True) op alle error-paden in zowel
    bacnet_client.py als config_flow.py.
  • Ruwe property waarden gelogd per object (type, naam, description, units, pv).
  • Discovery stap logt device info en unreachable details.
  • Object list read logt het response type en elk succesvol gelezen object.
  • Form builder logt alle option keys ter verificatie.

Fix: UDP-poort blijft gebonden na afbreken config flow

Home Assistant roept flow.async_remove() synchroon aan (zonder await).
Omdat async_remove als async def was gedefinieerd, werd er een coroutine
aangemaakt die nooit werd ge-awaited — de cleanup draaide dus nooit en de
UDP-socket op poort 47808 bleef gebonden. Elke volgende config flow poging
faalde met:

UDP socket failed to bind within 5s — port 47808 may already be in use.

Daarnaast logt HA de waarschuwing:
RuntimeWarning: coroutine 'BACnetConfigFlow.async_remove' was never awaited

Oplossing:

  • async_remove omgezet van async def naar synchrone @callback methode
    (conform de FlowHandler-interface van HA).
  • De async cleanup wordt nu gepland via self.hass.async_create_task(),
    zodat de UDP-socket betrouwbaar wordt vrijgegeven wanneer de flow wordt
    gesloten of afgebroken.
  • Hiermee is de RuntimeWarning opgelost én kan poort 47808 hergebruikt
    worden bij een nieuwe config flow.

Overig

  • Ongebruikte description_placeholders verwijderd uit het select_objects
    formulier.

v1.0.11

· GitHub

v1.0.11 — Port Leak Fix

Fixes "port 47808 already in use" errors that occurred on every retry after the first failed config flow attempt.

Root Cause

When device discovery failed (timeout, unreachable device), the BACnetClient that had bound UDP port 47808 was never disconnected. On the next attempt the config flow created a new client that tried to bind the same port — but the old client still held it. Each retry made it worse.

Additionally, if connect() itself failed (transport timeout), the partially-created NormalApplication was not cleaned up, leaking the socket.

Changes

  • Release port on retry — async_step_discovery() now calls _cleanup_client() (disconnect) before creating a new client, ensuring the previous UDP socket is freed.
  • Release port on connect failure — If _wait_for_transport() fails, connect() now closes the app and sets self._app = None so the port is released immediately.
  • Release port on discovery error — When an exception occurs during discovery, the client is disconnected in the except block rather than kept open.

Action Required

Restart Home Assistant after updating to v1.0.11, then retry adding the BACnet device. The stale socket from previous attempts will be gone after the restart.


Developed by BRDC