Difference between revisions of "ESPEasy"

From Let's Control It
Jump to navigation Jump to search
(41 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[File:ESPEasy1.png]]
 
 
= Introduction =
 
= Introduction =
 
The ESP Easy firmware can be used to turn the ESP module into an easy multifunction sensor device for Home Automation solutions like Domoticz. Configuration of the ESP Easy is entirely web based, so once you've got the firmware loaded, you don't need any other tool besides a common web browser.
 
The ESP Easy firmware can be used to turn the ESP module into an easy multifunction sensor device for Home Automation solutions like Domoticz. Configuration of the ESP Easy is entirely web based, so once you've got the firmware loaded, you don't need any other tool besides a common web browser.
  
The ESP Easy firmware is currently at build R048 an looks stable enough for production purposes as long as it's being used as a sensor device.
+
The ESP Easy firmware is currently at build R120 an looks stable enough for production purposes as long as it's being used as a sensor device.
  
 
ESP Easy also offers limited "low level" actuator functions but due to system instability, this could be less useful in real life applications.
 
ESP Easy also offers limited "low level" actuator functions but due to system instability, this could be less useful in real life applications.
  
= Main page =
+
= Get started =
 +
 
 +
Getting started with the ESP Easy takes a few basic steps. In most cases your ESP module comes with the AT firmware or the NodeMCU LUA firmware. We need to replace the existing firmware with the ESP Easy firmware. We provide a (Windows only) flashtool to make this process an easy job.
 +
 
 +
= Applications =
 +
 
 +
{| class="wikitable"
 +
!colspan="2" style="font-size:24px; color:white; background-color: black;"|Sensors (Input)
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| PulseCounting || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Temperature
 +
|-
 +
| [[PulsCounter | TCR5000]] [[File:TCR5000.jpg|100px|link=]] || [[TemperatureSensor | Dallas DS18b20]] [[File:DS18B20.jpg|100px|link=]] [[ MLX90614 | MLX90614]] [[File:MLX90614.png|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Barometric Pressure || style="font-size:16px; color:white; background-color: #0077dd;" align="center"|Lux
 +
|-
 +
| [[BarometricSensor | BMP085]] [[File:BMP085.png|100px|link=]] [[BME280 | BME280]] [[File:BME280.png|100px|link=]] [[BMP280 | BMP280]] [[File:BMP280.png|100px|link=]]  [[MS5611 | MS5611]] [[File:MS5611.png|100px|link=]] || [[LuxSensor | BH1750]] [[File:BH1750.jpg|320px|100px|link=]] [[LuxSensor2 | TSL2561]] [[File:TLS2561.png|320px|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Humidity || style="font-size:16px; color:white; background-color: #0077dd;" align="center"|RFID
 +
|-
 +
| [[HumiditySensor | DHT]] [[File:DHT11.png|100px|link=]] [[DHT12 | DHT12]] [[File:DHT12.png|100px|link=]] [[HumiditySensor2 | SI7021]] [[File:SI7021.png|100px|link=]] [[SHT1X | SHT1X]] [[File:SHT1X.png|100px|link=]] || [[RFID | Wiegand]] [[File:WiegandRFID_1.jpg|100px|link=]] [[RFID2 | PN532]] [[File:PN532.png|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Distance || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Switch
 +
|-
 +
| [[DistanceSensor | HC-SR04]] [[File:HC-SR04.jpg|100px|link=]] || [[Switch | Switch]] [[File:Lightswitch.jpg|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Analog || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| More Analog
 +
|-
 +
| [[ Analog | Analog]] [[File:Analog.png|100px|link=]] || [[PCF8591 | PCF8591]] [[File:PCF8591Module.jpg|100px|link=]] [[ADS1115 | ADS1115]] [[File:ADS1115.png|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Digital inputs || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Infrared Receivers
 +
|-
 +
| [[MCP23017 | MCP23017]] [[File:MCP23017DIP28.jpg|100px|link=]] [[PCF8574 | PCF8574]] [[File:PCF8574.jpg|100px|link=]]  || [[IR | IR]] [[File:TSOP4838.png|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Dust || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Voltage & Current
 +
|-
 +
| [[DustSensor | GP2Y10]] [[File:GP2Y10.png|100px|link=]] || [[INA219 | INA219]] [[File:INA219.png|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Weather || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Motion
 +
|-
 +
| [[VentusW266 | Ventus W266]] [[File:Ventusw266.png|150px|link=]] || [[MPU6050 | MPU 6050]] [[File:Mpu-6050.jpg|80px|link=]]
 +
|}
 +
 
 +
{| class="wikitable"
 +
!colspan="2" style="font-size:24px; color:white; background-color: black;"|Actuators (Output)
 +
 
 +
|-
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Build-in output || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Build-in output
 +
|-
 +
| [[GPIO | Output pin]] [[File:LED.png|100px|link=]] [[IRTX | IR Led]] [[File:IRLED.png|100px|link=]] || [[GPIO | Output pin]] [[File:Servo.png|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Relays || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| Extra IO
 +
|-
 +
| [[Relais | Relays]] [[File:Relaisbordje.jpg|100px|link=]] || [[MCP23017 | MCP23017]] [[File:MCP23017DIP28.jpg|100px|link=]] [[PCF8574 | PCF8574]] [[File:PCF8574.jpg|100px|link=]]
 +
|-
 +
 
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| PWM drivers || style="font-size:16px; color:white; background-color: #0077dd;" align="center"|
 +
|-
 +
| [[PCA9685 | PCA9685]] [[File:PCA9685Module.jpg|100px|link=]] ||
 +
|}
 +
 
 +
{| class="wikitable"
 +
!colspan="2" style="font-size:24px; color:white; background-color: black;"|Other
 +
|-
 +
|style="font-size:16px; color:white; background-color: #0077dd;" align="center"| LCD || style="font-size:16px; color:white; background-color: #0077dd;" align="center"| OLED
 +
|-
 +
| [[LCDDisplay | LCD Display]] [[File:LCDDemo.jpg|100px|link=]] ||  [[OLEDDisplay | OLED Display]] [[File:OLED.png|100px|link=]]
 +
|}
 +
 
 +
= Tutorials =
 +
* [[Tutorial_ESPEasy_Firmware_Upload | Using the flashtool to upload the ESP Easy firmware]]
 +
* [[Tutorial_Arduino_Firmware_Upload | Using the Arduino IDE to upload the ESP Easy firmware]]
 +
* [[Tutorial_Domoticz_Switch | Using the ESP Easy as a simple input switch in Domoticz]]
 +
* [[Tutorial_OpenHAB_Switch | Using the ESP Easy to control a LED of Relay from OpenHAB]]
 +
* [[Tutorial_Rules | Rules, a modest way to locally control something in ESP Easy ]]
 +
* [[EasyGlobalSync | GlobalSync ]]
 +
 
 +
= Hardware Tips 'n Tricks=
 +
* [[Power | Power stability]]
 +
* [[Relays | Relays]]
 +
* [[Breadboards | Breadboards]]
 +
* [[Interference | WiFi interference]]
 +
 
 +
= Examples =
 +
* [[Analog Pressure sensor | Analog Pressure Sensor]]
 +
* [[DC Voltage divider | DC Voltage divider]]
 +
 
 +
= Loading firmware =
 +
 
 +
== Stable ==
 +
Firmware image R120
 +
 
 +
* [http://www.letscontrolit.com/downloads/ESPEasy_R120.zip ESP Easy firmware (image)]
 +
 
 +
== Release candidates ==
 +
 
 +
Firmware image R147_RC8
 +
 
 +
* [http://www.letscontrolit.com/downloads/ESPEasy_R147_RC8.zip ESP Easy firmware (image)]
 +
 
 +
[[Tutorial_ESPEasy_Firmware_Upload]]
 +
 
 +
= Protocol selection =
 +
 
 +
The ESP Easy supports several Home Automation controllers or web-services that collect sensor data.
 +
 
 +
[[EasyProtocols]]
 +
 
 +
= Configuration =
 +
To get you on track with the ESP Easy, we provide a tutorial to demonstrate the basics [[Tutorial_Domoticz_Switch]]
 +
For all further applications, please check their respective wiki page [[Main_Page#Applications | Applications]]
 +
 
 +
 
 +
= ESP Easy web interface =
 +
The ESP Easy has a user-friendly web interface for all configuration settings. They are locally stored in flash memory and retained on power-off.
 +
We will explain all configuration pages and settings:
 +
 
 +
== Main page ==
 
[[File:ESPEasy_Main.png]]
 
[[File:ESPEasy_Main.png]]
  
Line 15: Line 139:
  
  
= Configuration =
+
== Config page ==
 +
Main settings can be found under "Config" page.
  
The ESP Easy has a user-friendly web interface for all configuration settings. They are locally stored in flash memory and retained on power-off.
 
 
== Config page ===
 
 
[[File:ESPEasy_Config.png]]
 
[[File:ESPEasy_Config.png]]
 
Main settings can be found under "Config" page.
 
  
 
'''Name''' Can be set to an easy to remember name for this system. Can also be used in MQTT communication templates.
 
'''Name''' Can be set to an easy to remember name for this system. Can also be used in MQTT communication templates.
Line 31: Line 151:
  
 
'''WPA Key''' The key used on your Wifi Access Point
 
'''WPA Key''' The key used on your Wifi Access Point
 +
 +
'''WPA AP Mode Key''' The key that ESP Easy will use if it starts as a Wifi Access Point to set the first time configuration
  
 
'''Unit nr''' Each ESP Easy unit needs a unique number in the range 1-31. <span style="color:red">This is important for MQTT connections and the Node list! Do not forget to set this field to a non-zero value, not conflicting with other units.</span>  
 
'''Unit nr''' Each ESP Easy unit needs a unique number in the range 1-31. <span style="color:red">This is important for MQTT connections and the Node list! Do not forget to set this field to a non-zero value, not conflicting with other units.</span>  
Line 44: Line 166:
 
'''Sensor Delay''' Set the delay between sensor reporting in seconds.
 
'''Sensor Delay''' Set the delay between sensor reporting in seconds.
  
'''Sleep Mode''' Tick this field to use the ESP in deepsleep mode for low power operation.
+
'''Sleep Mode''' Tick this field to use the ESP in deepsleep mode for low power operation. Read more: [[SleepMode]]
  
 
Optional
 
Optional
Line 56: Line 178:
 
'''ESP DNS''' Enter you local DNS server IP address. Usually the IP of your local internet router.
 
'''ESP DNS''' Enter you local DNS server IP address. Usually the IP of your local internet router.
  
== Hardware page ===
+
== Hardware page ==
 
[[File:ESPEasy_Hardware.png]]
 
[[File:ESPEasy_Hardware.png]]
  
Line 65: Line 187:
 
'''Pin mode x''' Select an optional boot state for this pin, either output low or high
 
'''Pin mode x''' Select an optional boot state for this pin, either output low or high
  
 +
I2C is a well known standard to let multiple devices communicate over just two wires (and ground). We use it to connect sensors to ESP Easy. You can connect multiple sensors to the same two wires. Don't forget to use pull-up resistors on both SDA and SCL, unless one of your sensors already has them mounted on board.
  
== Devices page ===
+
== Devices page ==
 
[[File:ESPEasy_Devices.png]]
 
[[File:ESPEasy_Devices.png]]
  
 
This is a list of tasks that the ESP Easy will perform. A sensor needs to be defined here to get the values send to your controller.
 
This is a list of tasks that the ESP Easy will perform. A sensor needs to be defined here to get the values send to your controller.
  
 +
After selecting a new device, press the ? button to get specific help on this device!
  
== Tools page ===
+
<span style="color:red">Most common mistake if your values remain 0: The ESP Easy mainly targets Domoticz and the internal framework is entirely build upon the IDX field. This needs to match Domoticz. If you run a different protocol, it can be any value but must be non-zero. Just choose '1' in those cases...</span>
 +
 
 +
== Tools page ==
 
[[File:ESPEasy_Tools.png]]
 
[[File:ESPEasy_Tools.png]]
  
Line 78: Line 204:
  
  
== Tools Advanced page ===
+
=== Tools Log page ===
 +
 
 +
This page can be used for debugging issues. The debug level is set to '2' by default and will show sensor readings. Debugging levels can be changed under Tools/Advanced.
 +
 
 +
If your system runs fine, you can set the level to '0' to turn of logging. This will save valuable RAM!
 +
 
 +
 
 +
=== Tools Advanced page ===
 
[[File:ESPEasy_Tools_Advanced.png]]
 
[[File:ESPEasy_Tools_Advanced.png]]
  
Line 86: Line 219:
 
It is also used for the Generic HTTP protocol. Create your custom template here.
 
It is also used for the Generic HTTP protocol. Create your custom template here.
  
'''Message Delay''' To prevent overloading your controller or webservice, a delay between reports can be set. Defaults to 1000 milliseconds. <span style="color:red">For ThingSpeak, you need to set this to 15000! to have multiple sensor readings working</span>  
+
'''MQTT Retain Msg'''
 +
 
 +
'''Message Delay''' To prevent overloading your controller or webservice, a delay between reports can be set. Defaults to 1000 milliseconds. <span style="color:red">For ThingSpeak, you need to set this to 15000! to have multiple sensor readings working</span>
 +
 
 +
'''Fixed IP Octet''' Special network config where the ESP starts with DHCP to get the basic network config and then sets the last octet to a fixed IP.
 +
 
 +
'''Use NTP''' To enable internal software clock, synchronized using internet time.
 +
 
 +
'''NTP Hostname''' Can be left empty as it defaults to pool.ntp.org. Can be changed here if needed.
 +
 
 +
'''Timezone Offset''' Offset in minutes to GMT. In the Netherlands this should be '60'
  
 +
'''DST''' Daylight Saving Time. Must be set manually when DST is active to adjust the time.
  
== Get started ==
+
'''Syslog IP''' Enter your syslog server IP if you have one running and want to debug something.
To get you on track with the ESP Easy, we provide a tutorial to demonstrate the basics [[Tutorial_Domoticz_Switch]]
+
 
 +
'''Syslog level''' Level of log messaging to the syslog server. Can be set between 0 - 4 (0=no logging, 1=error, 2=error+info, 3=error+info+debug, 4=error+info+more debug)
 +
 
 +
'''UDP port''' This is used for communication between ESP unit's. 65500 is just a sample. Use a number that does not conflict with other systems on your network as the ESP uses broadcast messages.
 +
<span style="color:red">If you have a syslog server running, do not enter 514 here!</span>. This fields needs to be non-zero to have the node list running.
 +
 
 +
'''Enable Serial Port''' Enable/disable the serial port.
 +
 
 +
'''Serial log level''' Level of log messaging to the serial port. Can be set between 0 - 4 (0=no logging, 1=error, 2=error+info, 3=error+info+debug, 4=error+info+more debug)
 +
 
 +
'''Web log level''' Level of log messaging to the web gui. Can be set between 0 - 4 (0=no logging, 1=error, 2=error+info, 3=error+info+debug, 4=error+info+more debug)
 +
 
 +
'''Baud Rate''' Serial port baud rate
 +
 
 +
'''WD I2C Address''' I2C address to send watchdog messages to. Experimental feature to feed a ATTiny based external watchdog.
 +
 
 +
'''Custom CSS''' Tick this box to use a custom CSS (style sheet). You must first upload a "esp.css" file one to use this.
 +
<span style="color:red">The CSS filesize can not exceed 4 kbyte!</span>.
 +
 
 +
'''Use SSDP''' SSDP is a network protocol based on the Internet Protocol Suite for advertisement and discovery of network services and presence information. This option toggles this service.
 +
 
 +
'''Rules''' Tick this checkbox to enable the Rules section for scripting the device. Else the rules aren't visible and editable and won't be processed at all.
 +
 
 +
'''I2C ClockStrechLimit'''
 +
 
 +
'''Global Sync'''
 +
 
 +
=== Tools I2C scan ===
 +
If one or more I2C devices are connected to the ESP Easy, you can use this scan feature to verify if devices can be located using their I2C address. If no device is shown, you likely made a mistake on wiring or the I2C configuration in the Hardware page.
 +
 
 +
If the I2C scanner lists an address, it will also list some well known devices that are fixed or typically found on that address. It does NOT mean that the detected device is verified to work in any way. I2C devices use a 7 bit address and the ESP will just scan all 127 possible addresses. If a device listens to some address it will acknowledge this to the ESP. It does not report the type of device so the ESP can only tell that something is listening!
 +
 
 +
 
 +
=== Tools Settings up/download ===
 +
 
 +
The ESP Easy settings can be saved to your computer so you can restore them if they are lost or you just want to restore them after some experimenting. You can also upload a custom style sheet.
 +
 
 +
The system recognizes only two filenames:
  
For all further applications, please check their respective wiki page [[Main_Page#Applications | Applications]]
+
'''config.txt'''
  
== Protocol selection ==
+
This file contains the ESP main configuration settings, except security data. The filesize should be 32k.
 +
You can exchange this file with other people if you like, because WPA keys and config password are not stored into this file.
  
The ESP Easy supports several Home Automation controllers or web-services that collect sensor data.
+
Security data cannot be saved or restored from file!
  
[[EasyProtocols]]
 
  
= Loading firmware =
+
'''esp.css''' (Custom Style Sheet, max 4 kb !)
[[Tutorial Arduino Firmware Upload]]
 
  
= Connections =
+
If you want to customize the web gui you can upload (a small) css file. Remember that the webgui is only there for configuration so customization is limited. You may use the following stylesheet as an working example or template for further customization. And don't forget to activate the uploaded stylesheet in the TOOLS>ADVANCED section by enabling the "Custom CSS" option.
  
= Serial Commands =
+
<pre style="margin:0%;20%;">
It is possible to configure your esp Easy by the web graphical interface, you can also use some commands to configure it using the serial console. These commands are provided to assist in emergency situatons where you cannot get access to the web gui.
+
* {
 +
font-family: verdana,sans-serif;
 +
font-size: 13px;
 +
}
 +
h1 {
 +
color: black;
 +
font-size: 16pt;
 +
}
  
The following commands can be used by the esp easy.
+
h1::after {
 +
content: " (Powersocket Livingroom)";  /* Give your Device an additional selfexplaing name after the topmost headline */
 +
}
  
'''Delay''' Set the update interval of your attached devices. "Delay 10" means new values are being sent to your controller every 10 seconds.
+
h6 {
 +
color: black;
 +
font-size: 10pt;
 +
text-align: center;
 +
}
 +
.button-menu {
 +
background: #3498db;
 +
background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
 +
background-image: -moz-linear-gradient(top, #3498db, #2980b9);
 +
background-image: -ms-linear-gradient(top, #3498db, #2980b9);
 +
background-image: -o-linear-gradient(top, #3498db, #2980b9);
 +
background-image: linear-gradient(to bottom, #3498db, #2980b9);
 +
-webkit-border-radius: 7;
 +
-moz-border-radius: 7;
 +
border-radius: 7px;
 +
color: #ffffff;
 +
padding: 3px 10px 3px 10px;
 +
border: solid #1f628d 1px;
 +
text-decoration: none;
 +
margin:0px 2px;
 +
}
  
'''Debug''' Set the debug level. 1: Error 2: Info 3: Debug 4: Debug more. "Debug 4" sets the debug level to debug_more.
+
.button-menu:hover {
 +
background: #8fd4ff;
 +
background-image: -webkit-linear-gradient(top, #8fd4ff, #3498db);
 +
background-image: -moz-linear-gradient(top, #8fd4ff, #3498db);
 +
background-image: -ms-linear-gradient(top, #8fd4ff, #3498db);
 +
background-image: -o-linear-gradient(top, #8fd4ff, #3498db);
 +
background-image: linear-gradient(to bottom, #8fd4ff, #3498db);
 +
text-decoration: none;
 +
margin:0px 2px;
 +
}
  
'''IP''' Set a static ip adres.
+
.button-link {
 +
border: 1px solid;
 +
border-radius: 5px;
 +
background:ButtonFace;
 +
color:ButtonText;
 +
border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
 +
padding: 5px 15px;
 +
text-decoration: none;
 +
}
 +
.button-link:hover {
 +
background-color:Highlight;
 +
color:HighlightText;
 +
}
 +
.button-link:active {
 +
border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
 +
}
 +
th {
 +
background-color: #369;
 +
color: #ffffff;
 +
padding: 10px;
 +
}
 +
td {
 +
padding: 7px;
 +
}
 +
table {
 +
color: black;
 +
border-collapse:collapse;
 +
}
 +
.div_l {
 +
float: left;
 +
}
 +
.div_r {
 +
background-color: #080;
 +
border-radius: 7px;
 +
color: white;
 +
float: right;
 +
margin: 2px;
 +
padding: 1px 10px;
 +
}
 +
.div_br {
 +
clear: both;
 +
}
  
'''WifiSSID''' Set the SSID of your homenetwork. "WifiSSID yournetworkname"
+
</pre>
  
'''WifiKey''' Set the WPA key of your homenetwork "WifiKey yoursecretkey"
+
=== Tools Firmware update using OTA ===
 +
Once your first ESP Easy firmware is loaded using the serial interface, subsequent updates can be loaded using the Wifi connection (if your unit has 1MB flash or more!).
 +
More details on OTA firmware update: [[EasyOTA]]
  
'''WifiAPKey''' Set the spa key of this esp unit. This key needs to be used by clients when they want to connect in AP modus.
+
= Command Reference =
  
'''WifiScan''' Scan for active wifi networks. This can be used to test if your wifi is recognized and to verify whether the wifi part is working or not.
+
[[ESPEasy Command Reference]]
  
'''WifiConnect''' Connect to wifi.
+
= System variables Reference =
  
'''WifiDisConnect''' Disconnect from your wifi network.
+
[[ESPEasy System Variables]]
  
'''Reboot''' Reboot esp module
+
= Support and discussion =
  
'''Reset''' Reset the esp module to it's defaults. It uses the values from the sketch when it's uploaded.
+
* [http://www.letscontrolit.com/forum/ Forum]
  
'''Save''' Save changes to the esp's EEPROM
+
== Source code development ==
 +
* [https://github.com/letscontrolit Github]
  
'''Settings''' Show the current settings stored in the esp's EEPROM
+
Want to contribute? Anyone is invited to do so, but please read this first: [[ESPEasyDevelopmentGuidelines]]

Revision as of 14:21, 24 February 2017

Introduction

The ESP Easy firmware can be used to turn the ESP module into an easy multifunction sensor device for Home Automation solutions like Domoticz. Configuration of the ESP Easy is entirely web based, so once you've got the firmware loaded, you don't need any other tool besides a common web browser.

The ESP Easy firmware is currently at build R120 an looks stable enough for production purposes as long as it's being used as a sensor device.

ESP Easy also offers limited "low level" actuator functions but due to system instability, this could be less useful in real life applications.

Get started

Getting started with the ESP Easy takes a few basic steps. In most cases your ESP module comes with the AT firmware or the NodeMCU LUA firmware. We need to replace the existing firmware with the ESP Easy firmware. We provide a (Windows only) flashtool to make this process an easy job.

Applications

Sensors (Input)
PulseCounting Temperature
TCR5000 TCR5000.jpg Dallas DS18b20 DS18B20.jpg MLX90614 MLX90614.png
Barometric Pressure Lux
BMP085 BMP085.png BME280 BME280.png BMP280 BMP280.png MS5611 MS5611.png BH1750 BH1750.jpg TSL2561 TLS2561.png
Humidity RFID
DHT DHT11.png DHT12 DHT12.png SI7021 SI7021.png SHT1X SHT1X.png Wiegand WiegandRFID 1.jpg PN532 PN532.png
Distance Switch
HC-SR04 HC-SR04.jpg Switch Lightswitch.jpg
Analog More Analog
Analog Analog.png PCF8591 PCF8591Module.jpg ADS1115 ADS1115.png
Digital inputs Infrared Receivers
MCP23017 MCP23017DIP28.jpg PCF8574 PCF8574.jpg IR TSOP4838.png
Dust Voltage & Current
GP2Y10 GP2Y10.png INA219 INA219.png
Weather Motion
Ventus W266 Ventusw266.png MPU 6050 Mpu-6050.jpg
Actuators (Output)
Build-in output Build-in output
Output pin LED.png IR Led IRLED.png Output pin Servo.png
Relays Extra IO
Relays Relaisbordje.jpg MCP23017 MCP23017DIP28.jpg PCF8574 PCF8574.jpg
PWM drivers
PCA9685 PCA9685Module.jpg
Other
LCD OLED
LCD Display LCDDemo.jpg OLED Display OLED.png

Tutorials

Hardware Tips 'n Tricks

Examples

Loading firmware

Stable

Firmware image R120

Release candidates

Firmware image R147_RC8

Tutorial_ESPEasy_Firmware_Upload

Protocol selection

The ESP Easy supports several Home Automation controllers or web-services that collect sensor data.

EasyProtocols

Configuration

To get you on track with the ESP Easy, we provide a tutorial to demonstrate the basics Tutorial_Domoticz_Switch For all further applications, please check their respective wiki page Applications


ESP Easy web interface

The ESP Easy has a user-friendly web interface for all configuration settings. They are locally stored in flash memory and retained on power-off. We will explain all configuration pages and settings:

Main page

ESPEasy Main.png

This is an informational page that provides some technical and operational parameters. The bottom half shows a node list of all known ESP units that are running in your network (this is optional and needs to be configured in tools/advanced) The list only shows live systems.


Config page

Main settings can be found under "Config" page.

ESPEasy Config.png

Name Can be set to an easy to remember name for this system. Can also be used in MQTT communication templates.

Admin Password Can be set if you want to protect your system config with a password.

SSID Wifi network SSID

WPA Key The key used on your Wifi Access Point

WPA AP Mode Key The key that ESP Easy will use if it starts as a Wifi Access Point to set the first time configuration

Unit nr Each ESP Easy unit needs a unique number in the range 1-31. This is important for MQTT connections and the Node list! Do not forget to set this field to a non-zero value, not conflicting with other units.

Protocol Select the protocol for your Home Automation controller or webservice like ThingSpeak.

Locate Controller You can set the controller based on it's DNS hostname or it's IP address.

Controller IP/Hostname Set IP or hostname for the controller

Controller Port Set the TCP port used on your controller or webservice.

Sensor Delay Set the delay between sensor reporting in seconds.

Sleep Mode Tick this field to use the ESP in deepsleep mode for low power operation. Read more: SleepMode

Optional

ESP IP You can set a static IP for this ESP unit. Set to 0.0.0.0 to use DHCP

ESP GW If using a static IP, enter the gateway (not needed if no connection to internet is needed!)

ESP Subnet Enter the local used subnet, usually 255.255.255.0

ESP DNS Enter you local DNS server IP address. Usually the IP of your local internet router.

Hardware page

ESPEasy Hardware.png

SDA Select the data pin used for I2C communications.

SCL Select the clock pin used for I2C communications.

Pin mode x Select an optional boot state for this pin, either output low or high

I2C is a well known standard to let multiple devices communicate over just two wires (and ground). We use it to connect sensors to ESP Easy. You can connect multiple sensors to the same two wires. Don't forget to use pull-up resistors on both SDA and SCL, unless one of your sensors already has them mounted on board.

Devices page

ESPEasy Devices.png

This is a list of tasks that the ESP Easy will perform. A sensor needs to be defined here to get the values send to your controller.

After selecting a new device, press the ? button to get specific help on this device!

Most common mistake if your values remain 0: The ESP Easy mainly targets Domoticz and the internal framework is entirely build upon the IDX field. This needs to match Domoticz. If you run a different protocol, it can be any value but must be non-zero. Just choose '1' in those cases...

Tools page

ESPEasy Tools.png

Some maintenance tools.


Tools Log page

This page can be used for debugging issues. The debug level is set to '2' by default and will show sensor readings. Debugging levels can be changed under Tools/Advanced.

If your system runs fine, you can set the level to '0' to turn of logging. This will save valuable RAM!


Tools Advanced page

ESPEasy Tools Advanced.png

Subscribe Template Used for MQTT subscription. Selecting a MQTT protocol will automatically fill this field

Publish Template Used for MQTT publishing. Selecting a MQTT protocol will automatically fill this field It is also used for the Generic HTTP protocol. Create your custom template here.

MQTT Retain Msg

Message Delay To prevent overloading your controller or webservice, a delay between reports can be set. Defaults to 1000 milliseconds. For ThingSpeak, you need to set this to 15000! to have multiple sensor readings working

Fixed IP Octet Special network config where the ESP starts with DHCP to get the basic network config and then sets the last octet to a fixed IP.

Use NTP To enable internal software clock, synchronized using internet time.

NTP Hostname Can be left empty as it defaults to pool.ntp.org. Can be changed here if needed.

Timezone Offset Offset in minutes to GMT. In the Netherlands this should be '60'

DST Daylight Saving Time. Must be set manually when DST is active to adjust the time.

Syslog IP Enter your syslog server IP if you have one running and want to debug something.

Syslog level Level of log messaging to the syslog server. Can be set between 0 - 4 (0=no logging, 1=error, 2=error+info, 3=error+info+debug, 4=error+info+more debug)

UDP port This is used for communication between ESP unit's. 65500 is just a sample. Use a number that does not conflict with other systems on your network as the ESP uses broadcast messages. If you have a syslog server running, do not enter 514 here!. This fields needs to be non-zero to have the node list running.

Enable Serial Port Enable/disable the serial port.

Serial log level Level of log messaging to the serial port. Can be set between 0 - 4 (0=no logging, 1=error, 2=error+info, 3=error+info+debug, 4=error+info+more debug)

Web log level Level of log messaging to the web gui. Can be set between 0 - 4 (0=no logging, 1=error, 2=error+info, 3=error+info+debug, 4=error+info+more debug)

Baud Rate Serial port baud rate

WD I2C Address I2C address to send watchdog messages to. Experimental feature to feed a ATTiny based external watchdog.

Custom CSS Tick this box to use a custom CSS (style sheet). You must first upload a "esp.css" file one to use this. The CSS filesize can not exceed 4 kbyte!.

Use SSDP SSDP is a network protocol based on the Internet Protocol Suite for advertisement and discovery of network services and presence information. This option toggles this service.

Rules Tick this checkbox to enable the Rules section for scripting the device. Else the rules aren't visible and editable and won't be processed at all.

I2C ClockStrechLimit

Global Sync

Tools I2C scan

If one or more I2C devices are connected to the ESP Easy, you can use this scan feature to verify if devices can be located using their I2C address. If no device is shown, you likely made a mistake on wiring or the I2C configuration in the Hardware page.

If the I2C scanner lists an address, it will also list some well known devices that are fixed or typically found on that address. It does NOT mean that the detected device is verified to work in any way. I2C devices use a 7 bit address and the ESP will just scan all 127 possible addresses. If a device listens to some address it will acknowledge this to the ESP. It does not report the type of device so the ESP can only tell that something is listening!


Tools Settings up/download

The ESP Easy settings can be saved to your computer so you can restore them if they are lost or you just want to restore them after some experimenting. You can also upload a custom style sheet.

The system recognizes only two filenames:

config.txt

This file contains the ESP main configuration settings, except security data. The filesize should be 32k. You can exchange this file with other people if you like, because WPA keys and config password are not stored into this file.

Security data cannot be saved or restored from file!


esp.css (Custom Style Sheet, max 4 kb !)

If you want to customize the web gui you can upload (a small) css file. Remember that the webgui is only there for configuration so customization is limited. You may use the following stylesheet as an working example or template for further customization. And don't forget to activate the uploaded stylesheet in the TOOLS>ADVANCED section by enabling the "Custom CSS" option.

* {
	font-family: verdana,sans-serif;
	font-size: 13px;
}
h1 {
	color: black;
	font-size: 16pt;
}

h1::after {
	content: " (Powersocket Livingroom)";  /* Give your Device an additional selfexplaing name after the topmost headline */
}

h6 {
	color: black;
	font-size: 10pt;
	text-align: center;
}
.button-menu {
	background: #3498db;
	background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
	background-image: -moz-linear-gradient(top, #3498db, #2980b9);
	background-image: -ms-linear-gradient(top, #3498db, #2980b9);
	background-image: -o-linear-gradient(top, #3498db, #2980b9);
	background-image: linear-gradient(to bottom, #3498db, #2980b9);
	-webkit-border-radius: 7;
	-moz-border-radius: 7;
	border-radius: 7px;
	color: #ffffff;
	padding: 3px 10px 3px 10px;
	border: solid #1f628d 1px;
	text-decoration: none;
	margin:0px 2px;
}

.button-menu:hover {
	background: #8fd4ff;
	background-image: -webkit-linear-gradient(top, #8fd4ff, #3498db);
	background-image: -moz-linear-gradient(top, #8fd4ff, #3498db);
	background-image: -ms-linear-gradient(top, #8fd4ff, #3498db);
	background-image: -o-linear-gradient(top, #8fd4ff, #3498db);
	background-image: linear-gradient(to bottom, #8fd4ff, #3498db);
	text-decoration: none;
	margin:0px 2px;
}

.button-link {
	border: 1px solid;
	border-radius: 5px;
	background:ButtonFace;
	color:ButtonText;
	border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
	padding: 5px 15px;
	text-decoration: none;
}
.button-link:hover {
	background-color:Highlight;
	color:HighlightText;
}
.button-link:active {
	border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
}
th {
	background-color: #369;
	color: #ffffff;
	padding: 10px;
}
td {
	padding: 7px;
}
table {
	color: black;
	border-collapse:collapse;
}
.div_l {
	float: left;
}
.div_r {
	background-color: #080;
	border-radius: 7px;
	color: white;
	float: right;
	margin: 2px;
	padding: 1px 10px;
}
.div_br {
	clear: both;
}

Tools Firmware update using OTA

Once your first ESP Easy firmware is loaded using the serial interface, subsequent updates can be loaded using the Wifi connection (if your unit has 1MB flash or more!). More details on OTA firmware update: EasyOTA

Command Reference

ESPEasy Command Reference

System variables Reference

ESPEasy System Variables

Support and discussion

Source code development

Want to contribute? Anyone is invited to do so, but please read this first: ESPEasyDevelopmentGuidelines