Foreword
Wins MQTT server can connect many devices, which involves management
Now do the project most people will choose to use all of the device management page.
But the extent of the upgrade chapter introduction pages only realize MQTT communication control, also can not manage
In fact to get web management device, and the device user first page must bind hook, it must have a database
So we'll do a chapter or page in the data management software, security papers, used to manage all the equipment we MQTT
The reason why the introduction of web control in the upgrade chapter, because just upgraded chapter introduces Web server
This time to build on the progress!
Later we will embed the page number to the public inside the micro-channel, direct the public micro channel number control device can be achieved MQTT
But I have to wait for public micro-channel number written papers, in fact, I would like to offer to you many, many.
I do not expect that we can learn to put all the source code, I hope everyone's mind can thoroughly understand how everything is done!
Nagging little bit more
If you want to learn basic Web page: https://www.cnblogs.com/yangfengwu/category/1587497.html
Hurry to open the software
Build a html
Js achieve the download page MQTT package
https://docs.emqx.io/sdk_tools?category=MQTT_Clients download link
We use this
About js package
paho-mqtt.js fully functional
paho-mqtt-min.js does not support SSL
Use paho-mqtt.js
Copied to your html directory
Js package introduced
<script src="paho-mqtt.js" type="text/javascript"></script>
The official gave the example
https://www.eclipse.org/paho/clients/js/
We directly copied
IP address and port number link under the modified
API介绍 https://www.eclipse.org/paho/files/jsdoc/index.html
注:MQTT实现WebSocket通信的端口号是 8083
测试
结语
最终大家做好了这个html,直接放到云端的Web服务器里面咱就可以远程访问了