Alibaba cloud IOT provides a device side SDK to connect the device to the Alibaba cloud Internet of things platform. The SDK requires the device to have an IP address, and then establish a connection between the device and the Alibaba cloud Internet of things platform through mqtt.
Overview of gateway access sub equipment
Alibaba cloud IOT provides a device side SDK to connect the device to the Alibaba cloud Internet of things platform. The SDK requires the device to have an IP address, and then establish a connection between the device and the Alibaba cloud Internet of things platform through mqtt. Devices such as ZigBee and KNX do not support IP addresses and cannot integrate the device-side SDK provided by alicloud IOT. For such devices, they need to be connected to the alicloud Internet of things platform through a gateway integrated with the device-side SDK. For the gateway, the connected devices that do not integrate the SDK are called sub devices. The network connection diagram is as follows:
Each type of sub device product needs to be defined on the Alibaba cloud Internet of things platform, and the device identity authentication information needs to be applied for each device. The gateway needs to know the triplet of the sub device to proxy the sub device for device identity authentication on the Alibaba cloud Internet of things platform. At the same time, the gateway also needs to forward the data between the sub device and the Alibaba cloud Internet of things platform.
Pain points of equipment manufacturers
The sub equipment needs a gateway to access the Alibaba cloud Internet of things platform, which means that when the sub equipment manufacturer develops a new product, it faces the following two choices:
1. Develop your own gateway, which is used to discover and connect sub devices, and connect the sub devices to Alibaba cloud Internet of things platform. This scheme requires equipment manufacturers to develop gateway products and invest in software and hardware development and testing resources.
2. Ask the gateway manufacturer to upgrade the firmware of the gateway and find and connect the newly developed sub equipment products.
For gateway manufacturers, the gateway firmware needs to be constantly upgraded to support new sub equipment products. The version is upgraded frequently, and the development and testing resources need to be continuously invested; For equipment manufacturers, the time of firmware upgrade and release by gateway manufacturers is uncontrollable, and may also pay development fees to gateway manufacturers.
If the gateway manufacturer provides the gateway's sub device triplet discovery and sub device data forwarding mechanism in some way, it means that the equipment manufacturer does not need to upgrade the firmware of the gateway when developing new sub device products, and the sub device manufacturer can develop its own sub device products only by purchasing the existing gateway products of the gateway manufacturer; For gateway manufacturers, there is no need to constantly upgrade the firmware of the gateway to avoid continuous resource investment.
In addition to defining the mechanism for discovering the triples of the sub devices between the sub devices and the gateway, the gateway also needs to forward the data from / sent to the sub devices. There are two ways for the gateway to forward the data between the sub devices and the Alibaba cloud Internet of things platform:
Data transparent transmission means that when the gateway receives the uplink data from the sub equipment, the gateway does not process the received data, but directly adds the sub equipment identification information to the data frame and sends it to Alibaba cloud Internet of things platform. The sub equipment manufacturer parses the data in the cloud service of Alibaba cloud Internet of things platform; Similarly, when the cloud service of the sub equipment manufacturer sends data to the sub equipment, the gateway does not process the data from the Internet of things platform and sends the data directly to the sub equipment.
This means that when the gateway receives the uplink data of the sub equipment, it will analyze and convert the data, and then send it to the Internet of things platform. The service of the gateway manufacturer needs to provide API interface to send the data to the sub equipment manufacturer; When the service of the sub equipment manufacturer sends data to the sub equipment, call the cloud service of the gateway manufacturer for data transmission. The service of the gateway manufacturer sends the data to the gateway. The gateway converts the data into a format that can be recognized by the sub equipment and sends it to the sub equipment.
Rexense ZigBee gateway RG4100+
RG4100 + is an ultra small multi-functional smart home gateway developed by Rexense. The device integrates various communication modes of ZigBee, Ethernet and Wi Fi in an ultra small volume. Users can use Wi Fi or Ethernet uplink, and use ZigBee protocol to access a variety of ZigBee smart devices.
Alibaba cloud IOT's intelligent life open platform is a smart home service provided by Alibaba cloud. The service provides mobile app for remote control of connected devices, and provides scene definition, device linkage and other functions. When RG4100 + accesses the intelligent life open platform, it follows the object model data format defined by Alibaba cloud IOT (i.e. the "data conversion scheme" described above). Therefore, RG4100+ can use the functions provided by the intelligent life open platform without deploying cloud services in Alibaba cloud IOT. The RG4100+ scheme is described as follows:
In this scheme, the ZigBee module of Rexense encodes the equipment model, identification, product status change and other information and informs the gateway. The module also receives and processes commands from the gateway. The equipment manufacturer does not need to carry out secondary development on the module, but only needs to connect the pins of the module with the corresponding hardware according to the instructions of the module.
Equipment manufacturers can purchase ZigBee module provided by Rexense to develop products, and connect the product to alicloud IOT without firmware upgrade of RG4100+, so as to control and manage the product through the mobile app provided by Alicloud IOT. The product name and model displayed on the mobile app interface will be the data set by the equipment manufacturer on Alicloud IOT.
The access process of the wall switch product describes an example of how to develop a ZigBee wall switch product through the ZigBee module REX3P of Rexense. Through this process, users can experience how to quickly develop a self owned product and control it through the mobile app provided by Alibaba cloud IOT.