重工电子论坛

标题: 阿里云三色灯 [打印本页]

作者: 李维强-15级    时间: 2021-12-11 15:39
标题: 阿里云三色灯


  1. 三色灯 阿里云
  2. {
  3.   "ProductKey": "a12LzEcBhZL",
  4.   "DeviceName": "device_test_2",
  5.   "DeviceSecret": "fba8fc1089ed47e83f6fec5cdca77cbf"

  6. }
  7. ProductSecret:o4HcYRHq937HGedL
  8. MQTT连接参数
  9. clientId
  10. a12LzEcBhZL.device_test_2|securemode=2,signmethod=hmacsha256,timestamp=2524608000000|
  11. username
  12. device_test_2&a12LzEcBhZL
  13. passwd
  14. 4cf8bf3809556e2b863a31b757b1d4013339afc06f18e27b72703c724ab9078f
  15. mqttHostUrl
  16. a12LzEcBhZL.iot-as-mqtt.cn-shanghai.aliyuncs.com
  17. port
  18. 1883

  19. {"clientId":"a12LzEcBhZL.device_test_2|securemode=2,signmethod=hmacsha256,timestamp=2524608000000|","username":"device_test_2&a12LzEcBhZL","mqttHostUrl":"a12LzEcBhZL.iot-as-mqtt.cn-shanghai.aliyuncs.com","passwd":"4cf8bf3809556e2b863a31b757b1d4013339afc06f18e27b72703c724ab9078f","port":1883}

  20. publish 内容
  21. 位置:/sys/a12LzEcBhZL/device_test_2/thing/event/property/post
  22. {
  23. "method":"thing.event.property.post",               
  24. "id":"123",               
  25. "version": "1.0",            
  26. "sys":{"ack":1},        
  27. "params":{
  28. "LED_Red":{"value": 1},
  29. "LED_Yellow":{"value": 1},
  30. "LED_Green":{"value": 0}
  31. }            
  32. }

  33. Subscribe内容
  34. 位置:/sys/a12LzEcBhZL/device_test_2/thing/event/property/post_reply
  35. 返回值:
  36. {"code":200,"data":{},"id":"123","message":"success","method":"thing.event.property.post","version":"1.0"}
复制代码





欢迎光临 重工电子论坛 (http://www.cqutlab.cn/) Powered by Discuz! X3.1