You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

树莓派HomeBridge eWeLink插件WebSocketClient报200响应异常求助

Hey there, let's work through this problem step by step—those undefined device values and WebSocket unexpected server response (200) errors are usually tied to outdated plugin versions or incorrect regional configuration. Here's what to do:

First, check your HomeBridge config.json file (usually located at ~/.homebridge/config.json). The eWeLink plugin needs the correct region matching your account's registered location:

  • For European accounts: use "region": "eu"
  • For Chinese accounts: use "region": "cn"
  • For US accounts: use "region": "us"
  • For other regions: try "region": "as" (Asia) or "region": "oc" (Oceania)

If you don't specify a region, the plugin might guess incorrectly (like it did with eu-ota.coolkit.cc in your log), leading to failed API calls and undefined data.

The version you're using (circa 2018) is likely incompatible with eWeLink's updated API endpoints. Uninstall the old version and install the latest one:

sudo npm uninstall -g homebridge-ewelink
sudo npm install -g homebridge-ewelink@latest

Newer versions automatically handle the correct API/WebSocket endpoints for your region, fix the API key retrieval issue, and properly parse device data.

Double-check that your config.json has the correct eWeLink username and password. Avoid special characters that might cause parsing issues—if you have them, try changing your password temporarily to test.

Example config.json snippet for eWeLink:

"platforms": [
  {
    "platform": "eWeLink",
    "name": "eWeLink",
    "username": "your-ewelink-email",
    "password": "your-ewelink-password",
    "region": "eu"
  }
]

4. Clear the Local Cache

Your log mentions loading 0 accessories from the local cache—corrupted cache data might be causing issues. Delete the cache file:

rm ~/.homebridge/ewelinkCache.json

Restart HomeBridge after deleting this file, and the plugin will re-fetch fresh device data from eWeLink's API.

5. Restart HomeBridge and Check Logs

After making these changes, restart HomeBridge:

sudo systemctl restart homebridge
# Or if you're running it directly:
homebridge -D

Check the logs again—you should see the plugin successfully fetch your devices (no more undefined values), retrieve a valid API key, and connect to the WebSocket without the 200 error.


内容的提问来源于stack exchange,提问作者stehof

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 09:07:05