eWeLink CUBE provides HTTP-based API for the open capabilities to any third-party application development as well as third-party devices and system integration. With these APIs, a wide range of applications can be realized to meet various feature expansion needs.
Developers can use eWeLink CUBE as a local server system and develop other branded device integration applications via device registration and status synchronization APIs. Register your devices to eWeLink CUBE system and the devices would be shown in the console. The real-time status of the device is synchronized to eWeLink CUBE system via the two-way status synchronization interface, thus, the features of the real-time device status, triggering scene linkage, and device control can be realized on the Web console and CAST dashboard.
In order to have a further understanding of the registration and device management APIs, we provide an open-source Add-on named “eWeLink Smart Home (Github)" for your reference.
The concept of the “eWeLink Smart Home” Add-on is WiFi device synchronization into eWeLink CUBE system. This Add-on searches for “eWeLink Support” devices in the LAN, connect devices through LAN mode, and synchronizes them into CUBE for management, control, and automation. The workflow involves searching for “eWeLink Support” devices that support LAN mode through mDNS, obtaining the LAN communication encryption key of the device through the cloud, and determining if the device type is currently supported by iHost. If supported, the Add-on will display the “Sync” button for device synchronization.
When the user selects the “Sync”, “eWeLink Smart Home” Add-on will first call eWeLink CUBE permission API to apply for an API access token. After manually confirming the authorization on your deveice(iHost etc.) as prompted, the Add-on can successfully obtain the token for subsequent communication with CUBE system. The Add-on will sync the selected devices to eWeLink CUBE system through the device registration API, and you can see the device cards on the center console. Afterward, Add-on will synchronize the status changes from the device to eWeLink CUBE system through the Device status synchronization API, it will also forward the control commands from eWeLink CUBE system to the device through the Device reverse control API so that the user can view the status of the device in real-time, control the device and configure various automations in the Web console and CAST dashboard.
In the future, we will provide open-source “Web API to MQTT” Add-on demo to facilitate the connection of various devices that use MQTT interfaces.
Currently, eWeLink CUBE system supports only a limited number of device types with simple capabilities. However, we will continue to update and support more device types and complex device capabilities in the future.
For the latest iHost API documentation, please click here: eWeLink CUBE API Document
eWeLink Smart Home Add-on : Add-on introduction | Add-on source Code (Github)