1 Star 3 Fork 1

IAMLIUBO / Wechat_MQTT_ESP8266_BaiduIoT

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

微信智能小管家

Wechat mini program

Wechat MQTT ESP8266 Baidu IoT

这是一个微信小程序通过MQTT控制硬件(ESP8266)的Demo,教你通过微信小程序控制自己的硬件。相关文章在知乎专栏: IAMLIUBO的神奇物联网之旅 可以查看。

演示视频地址:B站-微信小程序控制硬件

iOS版微信无法连接百度天工MQTT服务器,暂时不知道为什么,建议先使用Android版微信测试

请依次修改图片中标注的地方,如果还没有注册百度天工账号,可以先用这个账号体验,不确保可以使用多长时间,但是微信小程序的Appid一定要换成你自己的,因为不替换没法使用,页面布局可以根据你的需要自己修改,请忽略我的渣布局~

设备端代码:

官方SDK版本:Wechat_MQTT_BaiduIoT(SDK)

Arduino版本:Wechat_MQTT_BaiduIoT(Arduino)

PS:使用我的百度天工账号体验,一定要记得勾选不校验合法域名、web-view(业务域名)、TLS 版本以及 HTTPS 证书,如果不勾选是没法连接百度天工MQTT服务器的。

修改Appid

Wechat mini program

修改百度天工 IoT Hub账号和连接的网址

Wechat mini program

修改需要订阅的主题

Wechat mini program

Thankful:

微信小程序MQTT架构-爱吃猫粮的鱼

MIT License Copyright (c) 2019 IAMLIUBO Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

微信小程序,MQTT,百度天工 IoT hub,ESP8266。 expand collapse
JavaScript
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
JavaScript
1
https://gitee.com/imliu-bo/Wechat_MQTT_ESP8266_BaiduIoT.git
git@gitee.com:imliu-bo/Wechat_MQTT_ESP8266_BaiduIoT.git
imliu-bo
Wechat_MQTT_ESP8266_BaiduIoT
Wechat_MQTT_ESP8266_BaiduIoT
master

Search