This package is an event listener and command forwarder for the OpenWebNet protocol, tailored for Home Assistant integration.
Note on this Fork: This is a modified fork of the original
OWNdlibrary by anotherjulien (v0.7.48). It includes critical hardening for connection stability, keepalive fixes for MH201 gateways, and updates to comply with modern Home Assistant development standards.
- Connection Hardening: Reconnection mechanism now handles all connectivity drops (EOF, TCP resets/RST, aborted connections). Modernized
connect()with strict timeouts to prevent hangs on unreachable hosts. - Robust Command Delivery:
OWNCommandSession.sendrewritten as an iterative loop (3 retries max) instead of recursion, preventing stack overflows on unstable lines. - HA Modernization & Security: Upgraded to target Python 3.14+, replaced
pytzwith nativezoneinfo, and migratedxml.dom.minidomtodefusedxmlto address potential security vectors (Bandit/Ruff clean). - Injectable Sessions:
aiohttpsessions can now be injected directly from Home Assistant'sconfig_flow.
Clone this repository and then execute:
cd OWNd
pip3 install .
python3 -m OWNd --helpTo automatically discover the first available OpenWebNet gateway via SSDP on your local network:
python3 -m OWNdTo skip discovery and force connection to a specific gateway:
python3 -m OWNd --address <IP_ADDRESS> --port <PORT> --password <PASSWORD> --mac <MAC_ADDRESS>Note: Gateway configuration parameters can be retrieved using the BTicino Home+Project application.