How to get device information and control them in eWeLink CUBE?

Devices that connect to eWeLink CUBE through Zigbee directly and through Add-on can be displayed and controlled on the Web console and CAST dashboard. It means that you can check these devices’ state and subscribe to state changes via eWeLink CUBE OPEN API, as well as support for manipulating these devices through APIs.

In order to have a further understanding of the status subscription and device management APIs, we provide an open-source project named “Homebridge eWeLink CUBE plugin” for your reference.

This Plugin takes devices in the eWeLink CUBE system and synchronizes them to the Homebridge system for real-time display and control.

Its workflow begins with the discovery of hosts by searching the LAN network through mDNS, after the user selects the host to connect to, “Homebridge eWeLink CUBE plugin” will first call the permission API to apply for an API access token. After manually confirming the authorization on your hub(iHost, etc) as prompted, the Add-on can successfully obtain the token for subsequent communication with eWeLiNK CUBE system.

Plugin then calls the device query API to get a list of all the devices and will show the obtained list of devices, after the user selects the device that wants to synchronize to Homebridge, Plugin calls eWeLink CUBE device status subscription API to monitor the status changes in real-time. Similarly, if the user controls these devices on Homebridge, the plugin will call the device control APIs to send commands to CUBE for controlling these devices.

With the same process, any developer can develop an Add-on to get the device list in eWeLink CUBE system, subscribe to the devices status, and control the devices. All you need is this Add-on that also supports data communication with third-party systems, devices that managed by eWeLink CUBE can be seamlessly integrated into any third-party system for monitoring and management, like Home Assistance, openHAB, iobroker, etc.

For the latest iHost API documentation, please click here : eWeLink CUBE API document

Homebridge and eWeLink CUBE Plug : Introduction

Homebridge eWeLink CUBE Plug Source Code (Github)
Server code | Front end code