Feature/ethernet support#4
Open
Brunke wants to merge 8 commits into
Open
Conversation
…controls work and statuses sync between HA and OneControl. Automatically names devices using a loaded snapshot/manifest from the native app diagnostics dump.
- Dimmable lights - RGB Lighting control - HVAC Control and Status
phurth
requested changes
May 5, 2026
phurth
left a comment
Owner
There was a problem hiding this comment.
Requesting changes before merge due to several correctness/reliability issues that should be addressed first.
- Runtime table-id fallback can mis-key entities and commands
- File: custom_components/ha_onecontrol/runtime/ids_can_runtime.py
- The IDS runtime falls back to default table_id=0x03 before GatewayInfo arrives. On systems where table_id differs, identity/state keys can be created under the wrong table, then later diverge once real gateway info is known.
- Please avoid hard-coding 0x03 for bootstrap identity mapping, or gate identity/state creation until authoritative table context is known.
- Ethernet discovery can fail hard on UDP bind errors
- File: custom_components/ha_onecontrol/protocol/ethernet_discovery.py
- Discovery binds multiple UDP ports without resilient per-port error handling. A single OSError (port in use/restricted) can abort discovery.
- Please catch bind failures per port, continue with remaining ports, and return partial results with clear diagnostics.
- Ethernet exposes controls that are unimplemented/no-op
- Files: custom_components/ha_onecontrol/button.py, custom_components/ha_onecontrol/coordinator.py
- The button platform now makes controls broadly available, but coordinator paths show Ethernet lockout clear not implemented and metadata refresh disabled for Ethernet.
- Please either implement these operations for Ethernet or hide/disable those buttons for Ethernet to prevent misleading UX.
- Diagnostics redaction appears incomplete for new naming options
- Files: custom_components/ha_onecontrol/diagnostics.py, custom_components/ha_onecontrol/config_flow.py
- Added naming JSON options can be persisted but are not in the explicit diagnostics redaction list.
- Please redact/summarize these fields in diagnostics output to reduce leakage risk when users share bundles publicly.
- Branch is merge-conflicting and needs rebase/revalidation
- PR currently reports merge conflicts. Please rebase onto current main and re-run tests/QA to ensure current migration/pairing behavior is preserved.
After those are addressed, I’m happy to re-review.
Owner
|
Follow-up prioritization to help scope the next revision. Must-fix before merge:
Can be follow-up if needed (but preferred in this PR):
If you want, I can re-review quickly after the first three are addressed and call out any residual risk. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces support for CAN-to-Ethernet Gateways (IDS-CAN protocol) to allow older OneControl systems that lack direct BLE to be integrated into Home Assistant over the local network.
Because the underlying data structures between BLE and the CAN bridge share significant DNA, this implementation reuses the vast majority of the existing entity classes and data parsing logic.
Key Additions:
Network Transport (IdsCanRuntime): Added an Ethernet runtime to handle TCP/UDP sessions, frame decoding, and heartbeat polling with the bridge.
Config Flow & Discovery: Added config flow support for selecting a CAN-to-Ethernet connection. Includes automatic UDP advertisement discovery to pre-fill the host/port (defaults to 192.168.1.1:6969).
Device Metadata Import: The legacy IDS-CAN protocol does not expose device metadata over the network. To solve this, users can now paste the contents of DeviceManifestV1.json and DeviceSnapshotV1.json (obtained via the official app's diagnostic dump) directly into the config flow to automatically map entity names.
Documentation: Updated README.md with setup instructions and steps for generating the metadata JSON files.