Connecting to the MQTT broker
Obtaining MQTT details
The MQTT details for each Wi-Fi hub can be found in the ANY door_lock
data.
Specifically, the following fields are used:
iotprodkey
: The Wi-Fi hub’s IoT device management product keyiotdm
: The Wi-Fi hub’s IoT device management nameiotsecret
The Wi-Fi hub’s IoT device management secretiothost
: The MQTT broker host ({iodprodkey}.iot-as-mqtt.cn-shanghai.aliyuncs.com
if unprovided)
Authenticating with the MQTT broker
The Alibaba Cloud IoT Platform documentation describes the MQTT credential format.
Alibaba parameter |
Lockly vaue |
Customizable |
---|---|---|
securemode |
|
Yes |
signmethod |
|
Yes |
deviceName |
|
No |
productKey |
|
No |
deviceSecret |
|
No |
The mqttUsername is used as the clientId.