<?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=ESP_Board_Setup</id>
	<title>ESP Board Setup - 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=ESP_Board_Setup"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=ESP_Board_Setup&amp;action=history"/>
	<updated>2026-06-04T22:58:21Z</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=ESP_Board_Setup&amp;diff=27135&amp;oldid=prev</id>
		<title>Chao at 17:21, 18 June 2020</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=ESP_Board_Setup&amp;diff=27135&amp;oldid=prev"/>
		<updated>2020-06-18T17:21:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
* Programming firmware please see on this page [[ESP Relay Board Programming]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* MQTT Debugging please see [[MQTT]]&lt;br /&gt;
&lt;br /&gt;
== Quick Start Quide - AP Point ==&lt;br /&gt;
* Serial port will output verbose debug information, step by step&lt;br /&gt;
* If you want to reset back to factory mode, press BTN2 but be caurful of the high voltage. Board will reset, restart and show up AP mode again.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Steps !! User Action !! Description !!-&lt;br /&gt;
|-&lt;br /&gt;
| Config Network || Power up your board || &lt;br /&gt;
* Board will provide a wifi AP &amp;quot;ESP-Relay-Board&amp;quot; or similar&lt;br /&gt;
* (Also all leds blink for testing purpose) &lt;br /&gt;
|| -&lt;br /&gt;
|-&lt;br /&gt;
| Config Network || Connect to &amp;quot;ESP-Relay-Board&amp;quot; (or similar) it with no password || your phone will then ask you to sign in by pop-up message || -&lt;br /&gt;
|-&lt;br /&gt;
| Config Network || Configure wifi with scan, click show up wifi list and click your Wifi SSID || - || -&lt;br /&gt;
|-&lt;br /&gt;
| Config Network || Connect to SSID&lt;br /&gt;
||&lt;br /&gt;
* Enter Your wifi router password&lt;br /&gt;
|| &lt;br /&gt;
|-&lt;br /&gt;
| Config MQTT || Check MQTT Address &lt;br /&gt;
|| &lt;br /&gt;
* Keep default remote MQTT server address (default iot.electrodragon.com)&lt;br /&gt;
* Optional - Remote MQTT server port (no need change, default 1883)&lt;br /&gt;
* Optional - Remote MQTT server user ID (not used, keep empty)&lt;br /&gt;
* Optional - Remote MQTT server user password (not used, keep empty)&lt;br /&gt;
|| &lt;br /&gt;
|-&lt;br /&gt;
| Config MQTT || Setup your own module topic ID || &lt;br /&gt;
* MQTT Topic ID, for example we use a complex ID: 74dyt6, but final ID is ESP_74dyt6 (not ESP-74dyt6)&lt;br /&gt;
* '''please use a unique complex name''', otherwise if conflict with other users' topic ID, it can not connect&lt;br /&gt;
|| &lt;br /&gt;
|- &lt;br /&gt;
| Config MQTT || Connected Successfully || Board led blink slowly&lt;br /&gt;
|- &lt;br /&gt;
| Control via MQTT || Send commands to control || &lt;br /&gt;
* 1_ON or 1_OFF to MQTT example topic ID ESP_74dyt6 will turn on or off relay 1 &lt;br /&gt;
* same for relay 2&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MQTT APP Control ==&lt;br /&gt;
* Use any MQTT app (for exampe MyMQTT) to control here for example&lt;br /&gt;
Setup for MyMQTT or similar &lt;br /&gt;
* Set only - Server address '''iot.electrodragon.com (IP address 167.88.114.101)&lt;br /&gt;
* Keep default port 1883'''&lt;br /&gt;
&lt;br /&gt;
Subscribe to your own command topic&lt;br /&gt;
* For example, if you use board MQTT topic &amp;quot;74dyt6 &amp;quot;, then the full topic name will be '''ESP_74dyt6''' &lt;br /&gt;
* Please make sure the ID name is unique and complex, better use numbers instead of words&lt;br /&gt;
&lt;br /&gt;
== Board Setup ==&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
* The following is for ESP Relay control board.&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Board Type !! Command  !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ESP Relay Board || 1_ON || Turn on onboard relay 1&lt;br /&gt;
|-&lt;br /&gt;
| ESP Relay Board || 1_OFF || Turn off onboard relay 1&lt;br /&gt;
|-&lt;br /&gt;
| ESP Relay Board || 2_ON || Turn on onboard relay 2&lt;br /&gt;
|-&lt;br /&gt;
| ESP Relay Board || 2_OFF || Turn off onboard relay 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The following is for ESP LED strip board.&lt;br /&gt;
* To use local WLAN command control, you must first know the led board IP address&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Board Type !! Command  !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ESP LED strip board || #00ff00 || turn light to green. ff for green value 255&lt;br /&gt;
|-&lt;br /&gt;
| ESP LED strip board || 192.168.0.111\rgb\00ff00 || turn light to green. 192.168.0.111 is board IP address&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LED status ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LED !! Status&lt;br /&gt;
|-&lt;br /&gt;
| 0.2 seconds very fast blink || board is getting IP address from router, no IP address yet&lt;br /&gt;
|-&lt;br /&gt;
| 5.0 seconds very slow blink || connected to wifi, connect to mqtt server, wait for commands&lt;br /&gt;
|-&lt;br /&gt;
| 0.5 seconds blink || wait for smartconfig&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Update Log ==&lt;br /&gt;
* [https://github.com/Edragon/esp_firmware/tree/master/ESP%20Relay%20Board/arduino For latest firmware, and update log please see this page.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Demo code and update Log ===&lt;br /&gt;
&lt;br /&gt;
R3 version&lt;br /&gt;
* Download R3 firmware here [[File:Relay_board_20161118.zip]]&lt;br /&gt;
* mqtt sever info saved in mqtt_config.txt file&lt;br /&gt;
* After smartconfig, ssid and password saved in config.txt, when power up will always use this setup for wifi&lt;br /&gt;
* support to switch to unique ID (chipID) mode control by sending commands &amp;quot;chipID+ON&amp;quot; (162243ON) to ID topics&lt;br /&gt;
* [[File:Esp_relay_board_firmware_r3.1.zip|Firmware 3.1 download here.]], new firmware implemented on board from 4th Feburary 2017.&lt;br /&gt;
R4 version&lt;br /&gt;
* [[File:Relay_board_firmware_r4.zip|Download R4 firwmare here]]&lt;br /&gt;
# Including two servers config, in ID control mode, send commands &amp;quot;server1&amp;quot; or &amp;quot;server2&amp;quot; to swtich, or edit file &amp;quot;check_server.txt&amp;quot; change 1 for server1, or 2 for server2&lt;br /&gt;
# server 1 &amp;quot;mc&amp;quot; is mqttcloud free server, server 2 &amp;quot;sg&amp;quot; is Singarpore server, optimized for Asia area too.&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
Other Software and Firmware&lt;br /&gt;
* [[ESPeasy]]&lt;br /&gt;
* [[Domoticz]]&lt;br /&gt;
Firmware&lt;br /&gt;
* [https://github.com/Edragon/esp_firmware Old demo code, firmware please download here] &lt;br /&gt;
Demo video&lt;br /&gt;
* [https://www.youtube.com/watch?v=cDZNVRK-ivc Demo video avaialble here.]&lt;br /&gt;
* [https://www.youtube.com/watch?v=Tznk1umc20M  Please see the demo video here]&lt;br /&gt;
Demo code&lt;br /&gt;
* https://github.com/Edragon/esp_firmware&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Obsolette ==&lt;br /&gt;
In board config files for mqtt:&lt;br /&gt;
* mqtt_server_1.lua, mqtt_server_2.lua - including server configuration details&lt;br /&gt;
* wifi_config.txt - your wifi name and password&lt;br /&gt;
* check_mode.txt - check if your board use mac control or not&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Quick Start Quide (Smart-Config, old) ===&lt;br /&gt;
&lt;br /&gt;
* Config Steps&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Steps !! Descriptions !! Screenshot&lt;br /&gt;
|-&lt;br /&gt;
| 0. Power up|| &lt;br /&gt;
* Power up by AC power directly (or USB-TTL CP2102 for debugging)&lt;br /&gt;
* Relay and relay LED will switch on/off twice for debugging purpose.&lt;br /&gt;
|| &lt;br /&gt;
|-&lt;br /&gt;
| 1. Smartconfig || &lt;br /&gt;
* Download IOT espressif apk from google play &lt;br /&gt;
* in app, choose add devices, and enter password of your wifi setup&lt;br /&gt;
* connect esp relay board on power&lt;br /&gt;
* If you only want debug, can just CP2102 USB-TTL board, which provide sufficient power&lt;br /&gt;
* Optionally press BTN2 button to clean in board config&lt;br /&gt;
|| &lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Esp config 01.png | &lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 2. finish smartconfig || &lt;br /&gt;
* click enter in iot app, wait until device found &lt;br /&gt;
|| &lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Esp_config_02.png | configuring&lt;br /&gt;
File:Esp_config_03.png | Done of config&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3. Config your mqtt server ||  &lt;br /&gt;
* download mymqtt app or mqtt dashboad from google play&lt;br /&gt;
* Use mymqtt for example, Config your mqtt server as follow&lt;br /&gt;
 Server: m13.cloudmqtt.com&lt;br /&gt;
 User: jtpfneeq&lt;br /&gt;
 Password	: 4Og5kJ5WYQYT&lt;br /&gt;
 Port: 14967&lt;br /&gt;
|| &lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Esp_config_05_config_mqtt.png | config mqtt&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4. General commands test ||&lt;br /&gt;
* Send commands &amp;quot;ON&amp;quot; or &amp;quot;OFF&amp;quot; to Topic &amp;quot;Light1&amp;quot; or &amp;quot;Light2&amp;quot; &lt;br /&gt;
* You will here the relay coil click, and appliance connected with be switched on or off, LED on or off&lt;br /&gt;
|| &lt;br /&gt;
|-&lt;br /&gt;
| 5. Check mac address for unique control ||&lt;br /&gt;
There are three ways:&lt;br /&gt;
* check the wifi spot, &amp;quot;AI-THINKER-D92069&amp;quot;, D92069 is the MAC ID&lt;br /&gt;
* In above IOT espress config, when config done, also can see D92069&lt;br /&gt;
* Subscribe to topic &amp;quot;Light1&amp;quot;, mac address will be published to this topic, all the time when power up&lt;br /&gt;
|| &lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Esp_config_mac_03.png | mac in wifi spot&lt;br /&gt;
File:Esp_config_mac_01.png | mac in mqtt Light1 topic&lt;br /&gt;
File:Esp_config_mac_02.png | mac showup when smart config done&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 6. Switch to Mac IC control mode ||&lt;br /&gt;
* Send commands, for example mac id is D92069, send &amp;quot;D92069ON&amp;quot; to mqtt topic Light1&lt;br /&gt;
* Board will restart and switch to mac control mode&lt;br /&gt;
* In new mode, use mac ID D92069 as topic&lt;br /&gt;
* commands &amp;quot;1ON&amp;quot; &amp;quot;1OFF&amp;quot; &amp;quot;2ON&amp;quot; &amp;quot;2OFF&amp;quot; to control each relay&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Switch_mac_control_01.png | Send control command&lt;br /&gt;
File:Switch_mac_control_02.png | Send commands to mac topic&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 7. use station mode control ||&lt;br /&gt;
* Connect to wifi spot, for example, &amp;quot;AI-THINKER_D92069&amp;quot;&lt;br /&gt;
* download and use widget &amp;quot;socket control widget&amp;quot; from google play&lt;br /&gt;
* create a new widget, and see the screenshot on right&lt;br /&gt;
* a1, b1 are switch relay on, a0, b0 are switch relay off&lt;br /&gt;
* board station server IP is 192.168.4.1, listen on port 80&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Esp_config_socket_control_01.png | app config &lt;br /&gt;
File:Esp_config_socket_control_02.png | Created widget&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ESP Relay Board]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>