重工电子论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 4055|回复: 0
打印 上一主题 下一主题

阿里云三色灯

[复制链接]

287

主题

668

帖子

5632

积分

学生管理组

Rank: 8Rank: 8

积分
5632
跳转到指定楼层
楼主
发表于 2021-12-11 15:39:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式


  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"}
复制代码
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|cqutlab ( 渝ICP备15004556号

GMT+8, 2024-4-25 00:00 , Processed in 0.190817 second(s), 38 queries .

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表