[homeconnectdirect] Improve handling of appliances that power down WiFi (avoid OFFLINE ↔ UNKNOWN toggling)
# **Feature Request: Improve handling of appliances that power down WiFi (avoid OFFLINE ↔ UNKNOWN toggling)**
## **Summary**
Some Home Connect appliances—especially dryers and washing machines—completely power down their WiFi module when switched off. In this state, the device becomes fully unreachable on the network (no ARP, no ICMP, no TCP).
The HomeConnectDirect binding reacts by repeatedly attempting WebSocket reconnects, which results in cyclic Thing status transitions:
- `OFFLINE (COMMUNICATION_ERROR): Could not connect to ws://<ip>/homeconnect`
- `UNKNOWN: No route to host`
- back to `OFFLINE`
- repeating indefinitely
This leads to noisy logs and constant status flapping, even though the appliance is simply “off” and behaving as designed.
## **Current Behavior**
When the appliance powers down WiFi:
1. WebSocket handshake fails → binding sets Thing to **OFFLINE**
2. Next reconnect attempt cannot reach the IP at all → binding sets Thing to **UNKNOWN**
3. Next attempt again fails handshake → **OFFLINE**
4. Cycle repeats every reconnect interval
This results in log spam and unstable Thing state, although the underlying condition is normal and expected.
### **Example log excerpt (openHAB 4.2.0, HomeConnectDirect 4.3.0‑1734537758)**
```
2026-07-19 10:16:10.489 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'homeconnectdirect:dryer:370e5912e8' changed from OFFLINE (COMMUNICATION_ERROR): Could not connect to ws://192.168.69.49:80/homeconnect to UNKNOWN
2026-07-19 10:16:13.590 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'homeconnectdirect:dryer:370e5912e8' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): No route to host
2026-07-19 10:16:13.591 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'homeconnectdirect:dryer:370e5912e8' changed from OFFLINE (COMMUNICATION_ERROR): No route to host to OFFLINE (COMMUNICATION_ERROR): Could not connect to ws://192.168.69.49:80/homeconnect
```
## **Affected Appliance**
- **Siemens Dryer**
Model: *WT7YH780* (Home Connect capable, but WiFi fully powers down when off)
## **Why this matters**
For appliances that intentionally shut down WiFi:
- The OFFLINE/UNKNOWN toggling does not provide meaningful information.
- The log noise makes it harder to spot real issues.
- The Thing appears unstable even though the situation is normal.
- Users cannot configure the reconnect behavior.
## **Requested Improvements**
I’d like to propose one or more of the following enhancements:
### **1. Stable “SLEEPING” or “UNREACHABLE” state**
Instead of toggling between OFFLINE and UNKNOWN, the binding could enter a stable state when the device is unreachable for a longer period.
### **2. Configurable reconnect interval**
Allow users to set a longer retry interval (e.g., 1–10 minutes) for appliances known to power down WiFi.
### **3. Optional “silent offline” mode**
Suppress repeated identical warnings when the device is unreachable, while still updating the Thing state.
### **4. Smarter state transitions**
Avoid switching between OFFLINE and UNKNOWN when both errors indicate the same underlying condition (device unreachable).
### **5. Detection heuristic**
If the device has been unreachable for N consecutive attempts, treat it as “WiFi powered down” and reduce reconnect frequency.
## **Benefits**
- Cleaner logs
- More stable Thing state
- Better user experience for appliances that intentionally shut down WiFi
- Reduced confusion for users who see constant flapping
2 条评论