腾讯云

  1. UA71M12JIE.iotcloud.tencentdevices.com
  2. MQTT服务器地址:UA71M12JIE.iotcloud.tencentdevices.com
  3. 秘钥认证端口号:1883
  1. 设备名称:Sensor
  2. 产品IDUA71M12JIE
  3. 设备密钥:F3gLeeP62pE6Zno3P9486g==
  1. ProductID(产品ID):UA71M12JIE
  2. UserNameUA71M12JIESensor;12010126;564ST;1974703614
  3. Password8f6e6b8f22ae7009de93f6072806a1663fc93bab9b9f0e5263c841ce48b0f9c1;hmacsha256
  1. 属性发布主题:$thing/up/property/UA71M12JIE/${deviceName}
  2. 属性订阅主题:$thing/down/property/UA71M12JIE/${deviceName}

阿里云

https://help.aliyun.com/document_detail/140507.html?spm=a2c4g.30528.0.0.36d03226fwKDEK

  1. MQTT服务器地址:iot-06z00bw411v8sfl.mqtt.iothub.aliyuncs.com
  2. 秘钥认证端口号:1883
  3. UserNameTemperature01&inzpUtrH0d4
  4. Passworde6880c3c7a37dfe01aad9f44177d09e9433165eb1e7b2230f7de7005181e6756
  5. 属性发布主题:/sys/inzpdn28klr/zigbee01/thing/event/property/post
  6. 属性订阅主题:/sys/inzpdn28klr/zigbee01/thing/service/property/set
  7. AccessKey ID: LTAI5tBssMQePmGkrH8FuqJr
  8. AccessKey Secret: 1OQlYQqT2mrh3cjeTCxNnBTRbU9jGT
  9. AccessKey ID: LTAI5tFAq9H5PL2fGw3N4qRJ
  10. AccessKey Secret: aCYoN1CoM1GSHitzir2by1vCEgV0Ap
  11. 登录密码: vRfqYDoITWFjBTa0Q(xR|I!1q8qy!gk6

image.png

  1. {
  2. "method":"thing.service.property.post",
  3. "id":"858926847",
  4. "params":{
  5. "temp":11,
  6. "light":2,
  7. "humi":11,
  8. "ghumi":1
  9. },
  10. "version":"1.0.0"
  11. }

测试成功
image.png

获取值
image.png

自建

  1. {productId} 代表产品ID {deviceNum} 代表设备编号
  2. 订阅主题
  3. /{productId}/{deviceNum}/info/get
  4. /123/123/info/get
  5. 发布主题
  6. /{productId}/{deviceNum}/info/post
  7. /123/123/info/post
  1. tcp://120.78.171.11:1883
  1. #define USERCONF_MQTT_URL ("120.78.171.11:1883") //服务器地址:端口号
  2. #define USERCONF_MQTT_USERNAME ("wengxiulin") //Username
  3. #define USERCONF_MQTT_PASSWORD ("weng2001") //Password
  4. #define USERCONF_MQTT_RECV_TOPIC ("/123/123/info/get") //属性订阅主题
  5. #define USERCONF_MQTT_RECV_QOS (1)
  6. #define USERCONF_MQTT_SEND_TOPIC ("/123/123/info/post") //属性发布主题
  7. #define USERCONF_MQTT_SEND_QOS (1)
  8. #define USER_UUID ("wengxiulin")
  9. 腾讯云
  10. /* 远程服务器信息配置 */
  11. #define USERCONF_MQTT_URL ("UA71M12JIE.iotcloud.tencentdevices.com:1883")
  12. #define USERCONF_MQTT_USERNAME ("UA71M12JIESensor;12010126;564ST;1974703614")
  13. #define USERCONF_MQTT_PASSWORD ("8f6e6b8f22ae7009de93f6072806a1663fc93bab9b9f0e5263c841ce48b0f9c1;hmacsha256")
  14. #define USERCONF_MQTT_RECV_TOPIC ("$thing/down/property/UA71M12JIE/Sensor")
  15. #define USERCONF_MQTT_RECV_QOS (1)
  16. #define USERCONF_MQTT_SEND_TOPIC ("$thing/up/property/UA71M12JIE/Sensor")
  17. #define USERCONF_MQTT_SEND_QOS (1)
  18. #define USER_UUID ("UA71M12JIE")

image.png

  1. 8327e2102a5b8cc7
  2. 79CYBpUU9CCxpaMLTBusU9A0FDP9ApvaBIpW1iKxV2LLa2D