Repository navigation
Description
Summary
On Home Assistant 2026.9, the OpenEPaperLink integration (v3.0.0, latest) fails to establish its WebSocket connection to the AP. As a consequence, all AP-status sensors (heap, uptime, WiFi RSSI, tag count, run/state, etc.) stay unknown forever, even though the AP is reachable and tag-side sensors work fine (those are loaded via HTTP /get_db, not via WebSocket).
Note: This issue originally also covered an
AttributeError: storage.async_remove_storecrash during integration uninstall. That has been split out into #358 and fixed by #357. This issue now tracks only the WebSocket-never-connects problem.
Environment
- Home Assistant version:
core-2026.9.4(Home Assistant OS 18.3, Supervisor 2026.09.3, Python 3.14.6) - OpenEPaperLink integration version:
3.0.0(latest, no pending update in HACS) - AP hardware: OpenEPaperLink Yellow AP (ESP32), firmware up to date, reachable at
192.168.188.125 - Tags: 2× M3 2.2" (working — checking in every ~40 s,
last_seenis fresh) - Installation: HACS, custom repository
OpenEPaperLink/Home_Assistant_Integration
Reproduction
- Run Home Assistant 2026.9.x with the OpenEPaperLink integration v3.0.0 installed.
- Add the AP integration (Settings → Devices & Services → Add Integration → OpenEPaperLink → enter AP IP).
- Wait for setup to complete (integration shows as "loaded", no setup error reported).
- Open any AP-status sensor, e.g.
sensor.openepaperlink_ap_status,sensor.openepaperlink_ap_betriebszeit,sensor.openepaperlink_ap_tag_anzahl. - Observe that all AP-status sensors stay
unknown/has_value() == Falseindefinitely. - Load the full HA log (Settings → System → Logs → Load full Home Assistant log) and filter for
open_epaper_link.
Expected Behavior
The integration cleanly initializes, the WebSocket connection to ws://<AP_IP>/ws is established, and the AP-status sensors are populated from periodic sys WebSocket messages (status, run_state, uptime, heap, db_size, littlefs_free, ps_ram_free, rssi, wifi_ssid, record_count, low_battery_count, timeout_count).
Actual Behavior
The WebSocket connection to the AP never establishes. The log shows (167 occurrences):
Logger: custom_components.open_epaper_link.coordinator
Source: custom_components/open_epaper_link/coordinator.py:361
Level: ERROR
Count: 167
Message: WebSocket connection error: Cannot connect to host 192.168.188.125:80 ssl:default [Connect call failed ('192.168.188.125', 80)]
Because the WebSocket never connects, _handle_system_message in coordinator.py is never invoked, so self._ap_data stays empty and every AP-status sensor returns None from its value_fn.
Diagnosis
The AP itself is healthy and reachable:
- HTTP requests to
http://192.168.188.125/get_dbsucceed (tag sensors are populated via this endpoint inasync_load_all_tags). - HTTP request to
http://192.168.188.125/sysinfosucceeds (verified viawgetfrom the HA host). - Manual WebSocket upgrade to
ws://192.168.188.125/wssucceeds (verified viacurl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" ...from the HA host — returnsHTTP/1.1 101 Switching Protocols). - The AP was physically rebooted during diagnosis with no improvement.
So the network path is fine; the failure is inside the integration / HA runtime.
Instrumented debugging (adding _LOGGER.warning statements to async_setup_entry, async_start_websocket, _websocket_handler, and the start_websocket callback in __init__.py) revealed this execution trace on HA startup:
19:58:04 [OEPL-DEBUG] platforms forwarded, deciding websocket start
19:58:04 [OEPL-DEBUG] hass.is_running=False, registering EVENT_HOMEASSISTANT_STARTED listener
19:58:19 [OEPL-DEBUG] start_websocket callback firing, hub=<...Hub object at 0x...>
19:58:19 [OEPL-DEBUG] about to call hub.async_start_websocket()
19:58:19 [OEPL-DEBUG] hub.async_start_websocket() returned True
Observations:
hass.is_runningisFalseduring setup, so the integration registers a listener forEVENT_HOMEASSISTANT_STARTED. That listener fires ~13 s later and callsawait hub.async_start_websocket().async_start_websocket()returnsTrue(meaningself.onlineflipped toTruewithin the 60 sCONNECTION_TIMEOUTwindow).- But
_LOGGER.warning("[OEPL-DEBUG-WS] Attempting ws_connect ...")placed at the very top of thewhileloop inside_websocket_handler(the coroutine spawned byasync_start_websocketviahass.async_create_task) never appears in the log. Neither does the downstream_LOGGER.debug("Connected to websocket at %s", ws_url)nor anyWebSocket connection error.
That combination is contradictory: async_start_websocket returns True (which only happens when self.online becomes True), but _websocket_handler — the only place that sets self.online = True — apparently never executes its first line. The instrumented coordinator.py was verified to be on disk (matching MD5 with the edited local copy), __pycache__ was purged, and HA was fully restarted between attempts. The behavior persisted across four full HA restarts.
This suggests the WebSocket task is either silently dropped by the HA task scheduler, blocked before entering _websocket_handler, or there is some caching layer in the HA Python runtime that the author couldn't penetrate within the scope of this investigation.
Impact
- All AP-diagnostic sensors unusable:
sensor.openepaperlink_ap_status,…_laufstatus,…_betriebszeit,…_tag_anzahl,…_ip_adresse,…_wlan_ssid,…_wlan_signalstarke_rssi,…_freier_heap,…_systemzeit,…_tags_mit_schwachem_akku,…_tags_mit_zeituberschreitung,…_datenbankgrosse,…_littlefs_frei,…_freier_psram. - Tag-side sensors (battery, last_seen, temperature, LQI, RSSI, pending_updates, …) are unaffected because they are hydrated from the HTTP
/get_dbendpoint inasync_load_all_tags. drawcustomactions still work (uploaded over HTTP), so end-user automations keep functioning — but any automation that relied on AP-status sensors (e.g. a watchdog alerting when the AP itself goes offline) cannot use the integration's own AP sensors and must derive AP-health indirectly (e.g. from taglast_seenfreshness).
Additional Context
- Confirmed via
ha_get_integrationthat the config entry state isloadedwithdisabled_by=null,reason=null, noerror_reason_translation_key— the failure is silent from HA's perspective. - Tried the usual remediation steps with no success:
- Reload integration via disable → enable (multiple times).
- Completely remove the config entry and re-add it (fresh
entry_id, devices recreated with identicaldevice_ids thanks to stable MAC-based identifiers). - Physically reboot the AP.
- Remove a ghost tag from the blacklist in the integration options.
- Four full HA restarts with
__pycache__purged between attempts.
- The HA deprecation log also flags three additional upcoming-breakage sites in the integration (mentioned here for completeness, separate from the main bug):
device_registry.async_get_devicedeprecated (coordinator.py:733, util.py:172, text.py:227) — stops working in HA 2027.8.device_registry.devicesused as a mapping (util.py:172) — stops working in HA 2027.9.- Entity IDs set with wrong domain
open_epaper_link.<mac>_<suffix>instead ofsensor.<mac>_<suffix>(55×) — stops working in HA 2027.5.
- The last commit touching
custom_components/open_epaper_link/__init__.pyonmainis from March 8, 2026.
Related
- AttributeError: storage.async_remove_store removed in HA 2026.9 — integration uninstall crashes #358 —
AttributeError: storage.async_remove_store removed in HA 2026.9(split out from this issue; fixed by fix(storage): use Store.async_remove() for HA 2026.9+ compat #357). - fix(storage): use Store.async_remove() for HA 2026.9+ compat #357 — Fix PR for AttributeError: storage.async_remove_store removed in HA 2026.9 — integration uninstall crashes #358 (does not address this WebSocket issue).
Activity
[-]AP status sensors stay `unknown` on HA 2026.9 — `storage.async_remove_store` removed, WebSocket never connects[/-][+]AP status sensors stay `unknown` on HA 2026.9 — WebSocket to AP never establishes[/+]fix(storage): use Store.async_remove() for HA 2026.9+ compat
fix: replace device registry calls deprecated in HA 2026.9