BTicino Classe 100X/300X — 2.0.1
A focused bugfix release for live video reliability.
Fixed
-
WebRTC live video: "Failed to start WebRTC stream: Max number of peers reached" (#60, also seen in #58). The device (BNC1) allows only a limited number of concurrent WebRTC peers. The integration was leaking those peer slots: in offer mode it only recorded the signaling session id when the device sent back an SDP answer, so any offer that was rejected (the device replies with a
terminateevent) or any stream torn down before the answer arrived never sent aterminateto the device. Over time the orphaned peers accumulated until every live view failed. The session id is now captured as soon as the offer is acknowledged, and session close always sends aterminate(with a fallback to the active signaling session), so peers are released correctly. This prevents the slots from filling up; any peers already orphaned before upgrading clear on the device's own timeout (or a device reboot). -
WebSocket manager could exit during startup, disabling real-time events (#58). On Home Assistant start the connection manager could begin while the config entry was still
SETUP_IN_PROGRESS; if the first connect attempt failed at that instant, the reconnect guard broke the loop permanently, leaving the integration with no push WebSocket. The startup path now waits for the entry to finish loading before starting, matching the already-running path.
Tests
- Regression coverage for WebRTC session teardown (no-answer, device-rejected/Max-peers, and the normal answered path) and for the WebSocket manager's deferred start.
Notes
- Real-time push is for call events (
incoming_call/terminate/rescind). Lock/light/sensor state is refreshed by the periodic poll (~5 min) by design. - Live video remains Chrome/Chromium only (device firmware limitation; see the README and the Firefox investigation doc).
Full Changelog: v2.0.0...v2.0.1