Skip to content

Convert websocket to pysignalr#914

Merged
ic-dev21 merged 1 commit intodvd-dev:mainfrom
nlz242:feature/convert-websocket-to-pysignalr
Mar 27, 2026
Merged

Convert websocket to pysignalr#914
ic-dev21 merged 1 commit intodvd-dev:mainfrom
nlz242:feature/convert-websocket-to-pysignalr

Conversation

@nlz242
Copy link
Copy Markdown
Collaborator

@nlz242 nlz242 commented Mar 21, 2026

Convert home made websocket to pysignalr

Depends on : dvd-dev/python-hilo#400

- Replace hand-rolled WebSocket/SignalR client with pysignalr>=1.3.0
- Rewrite custom_components to use new SignalRHub / SignalRManager from pyhilo
- Rename all 'websocket' identifiers to 'signalr/SignalR' throughout
  (attrs, methods, constants, type annotations)
- Reconnect loop: exponential backoff (5s-300s), clean CancelledError handling,
  backoff reset on clean disconnect
- Catch pysignalr ServerError and connection errors at WARNING, no stack trace
- Fix dropped updated_devices assignment in _handle_device_events
- Guard signalr_event_from_payload against missing 'type' key
@nlz242 nlz242 force-pushed the feature/convert-websocket-to-pysignalr branch from 35d7180 to 989d524 Compare March 25, 2026 20:54
@nlz242 nlz242 changed the title [DONT MERGE - WIP] Convert home made websocket to pysignalr Convert websocket to pysignalr Mar 25, 2026
Copy link
Copy Markdown
Collaborator

@ic-dev21 ic-dev21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ic-dev21 ic-dev21 merged commit 15fd13c into dvd-dev:main Mar 27, 2026
3 checks passed
@marcandrechenier
Copy link
Copy Markdown

Since HA core 2026.4.0, the websocket bug was really preventing the HILO integration to start (due to the python exception). What a nice surprise to see that this issue was already fixed. I confirm that I don't see the exception error and that the HILO integration now starts in HA core 2026.4.0 Thank you @ic-dev21 and sebjacob for reporting. This is really much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants