<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=MQTT_NodeMCU</id>
	<title>MQTT NodeMCU - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=MQTT_NodeMCU"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=MQTT_NodeMCU&amp;action=history"/>
	<updated>2026-06-04T21:09:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=MQTT_NodeMCU&amp;diff=32210&amp;oldid=prev</id>
		<title>Chao: Created page with &quot; == MQTT Debugging Method For ESP8266 == Websocket debugging: thumbnail  * Websocket debugging, login to cloudmqtt, please use your ow...&quot;</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=MQTT_NodeMCU&amp;diff=32210&amp;oldid=prev"/>
		<updated>2021-09-13T03:56:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == MQTT Debugging Method For ESP8266 == Websocket debugging: &lt;a href=&quot;/w/File:CloudMQTT_Websocket_Console.png&quot; title=&quot;File:CloudMQTT Websocket Console.png&quot;&gt;thumbnail&lt;/a&gt;  * Websocket debugging, login to cloudmqtt, please use your ow...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== MQTT Debugging Method For ESP8266 ==&lt;br /&gt;
Websocket debugging: [[File:CloudMQTT Websocket Console.png|thumbnail]]&lt;br /&gt;
&lt;br /&gt;
* Websocket debugging, login to cloudmqtt, please use your own server config (lua file mqtt-config.lua), see the screenshot on right&lt;br /&gt;
* Commands can also send directly via websocket interface&lt;br /&gt;
&lt;br /&gt;
Serial USB interface debugging: [[File:Esp relay board demo.JPG|300px|thumbnail]]&lt;br /&gt;
* Debugging info can be read when you use it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
NodeMCU custom build by frightanic.com&lt;br /&gt;
	branch: master&lt;br /&gt;
	commit: c8037568571edb5c568c2f8231e4f8ce0683b883&lt;br /&gt;
	SSL: false&lt;br /&gt;
	modules: dht,enduser_setup,file,gpio,mqtt,net,node,tmr,uart,wifi&lt;br /&gt;
 build 	built on: 2016-03-29 10:06&lt;br /&gt;
 powered by Lua 5.1.4 on SDK 1.4.0&lt;br /&gt;
set up wifi mode&lt;br /&gt;
&amp;gt; Waiting for smartconfig, IP unavailable..&lt;br /&gt;
Waiting for smartconfig, IP unavailable..&lt;br /&gt;
Waiting for smartconfig, IP unavailable..&lt;br /&gt;
Waiting for smartconfig, IP unavailable..&lt;br /&gt;
Success. SSID: hcwork ; PASSWORD: electrodragon&lt;br /&gt;
Waiting for smartconfig, IP unavailable..&lt;br /&gt;
Waiting for smartconfig, IP unavailable..&lt;br /&gt;
Config done, IP is 192.168.43.134&lt;br /&gt;
Running file mqtt&lt;br /&gt;
connected&lt;br /&gt;
Light2:&lt;br /&gt;
receive OFF liked data on light2&lt;br /&gt;
Light1:&lt;br /&gt;
receive OFF liked data on light1&lt;br /&gt;
Light1:&lt;br /&gt;
received message: ON@light1&lt;br /&gt;
Light1:&lt;br /&gt;
receive OFF liked data on light1&lt;br /&gt;
Light2:&lt;br /&gt;
received message: ON@light2&lt;br /&gt;
Light2:&lt;br /&gt;
offline&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MQTT Server Setup ==&lt;br /&gt;
* '''Only need to run the last command sudo apt-get install mosquitto mosquitto-clients'''&lt;br /&gt;
* wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key&lt;br /&gt;
* sudo apt-key add mosquitto-repo.gpg.key&lt;br /&gt;
* sudo nano /etc/apt/sources.list.d/mosquitto.list -&amp;gt; add -&amp;gt; deb http://repo.mosquitto.org/debian jessie main&lt;br /&gt;
* sudo apt-get update&lt;br /&gt;
* sudo apt-get install mosquitto mosquitto-clients&lt;br /&gt;
Run simple test&lt;br /&gt;
* run this command in one connection -&amp;gt; mosquitto_sub -h localhost -t test&lt;br /&gt;
* run this in other connection -&amp;gt; mosquitto_pub -h localhost -t test -m &amp;quot;hello world&amp;quot;&lt;br /&gt;
Set password&lt;br /&gt;
* sudo mosquitto_passwd -c /etc/mosquitto/passwd ed&lt;br /&gt;
* sudo nano /etc/mosquitto/conf.d/default.conf&lt;br /&gt;
* allow_anonymous false&lt;br /&gt;
* password_file /etc/mosquitto/passwd&lt;br /&gt;
* restart -&amp;gt; sudo systemctl restart mosquitto&lt;br /&gt;
Test again&lt;br /&gt;
* mosquitto_sub -h localhost -t test -u &amp;quot;ed&amp;quot; -P &amp;quot;dragon&amp;quot;&lt;br /&gt;
ufw port setup&lt;br /&gt;
* ufw allow 22&lt;br /&gt;
&lt;br /&gt;
[[category: MQTT]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>