-
-
Notifications
You must be signed in to change notification settings - Fork 126
Connection Methods
The plugin connects to the eWeLink HTTPS API on Homebridge startup to authenticate user credentials, obtain a web socket host and request a list of devices and their current state. This is the only time the HTTPS API is used.
Once Homebridge is running, the plugin uses a web socket connection to:
- Send device updates from Homebridge to eWeLink, and
- Receive real-time updates from eWeLink when devices are controlled outside of Homebridge (e.g. physically or through the eWeLink app)
Since the web socket connection is kept open, there is no need for "polling" for device updates. If a device goes offline then Homebridge will be notified once eWeLink updates the device status. There can be a small delay. If a devices comes back online then Homebridge will be notified once eWeLink updates the device status. Again, there can be a small delay. Homebridge will refresh a device's current status upon being notified it is online.
LAN mode is also available for devices that support this mode. Currently the plugin will:
- Discover eWeLink devices on your local network,
- Send device updates for supported devices, and
- Receive real-time updates when devices are controlled outside of Homebridge (e.g. physically or through the eWeLink app).
- This plugin will discover devices along with their IP addresses on Homebridge startup. Any device that changes IP whilst Homebridge is running will fail to update. You'll either need to restart Homebridge again, or better, give your devices their own static IPs.
- Devices are unable to "alert" Homebridge via LAN mode if they go offline - because they are offline! The only way that Homebridge gets notified of offline devices is through the web socket (see above).
For more information about LAN mode, please visit the eWeLink announcement.