DS18B20 + ESP8266 + ESPEasy

I would like to introduce ESPEasy firmware. So far every sensor and communication was done by using Arduino and coding communication with ESP8266 to have MQTT implementation and integration with OpenHAB instance. Now everything has changed. ESPEasy firmware has Web interface for configuration, auto detection addresses of sensors connected to the almost any ESP8266 type of board. List of supported sensors is also quite impressive.

I will use ESP-01 with DS18B20 which will be used as WiFi temperature sensor. As you may see between VCC and GPIO1 we require resistor 4.7k

Download firmware as binary including flash tool 

ESPEasy repository is here: https://github.com/letscontrolit/ESPEasy/releases

Download the latest version and unzip to the folder. Please download also esptool.py as described in http://iot.formatx.net/esp8266-flashing/.

Flashing

Initial setup

Restart ESP. Now search again for available wifi networks. New WiFi AP “ESP_Easy_0” will appear, password: configesp

If you’re not automatically taken to the log-in page, browse to 192.168.4.1 

Search for you routers WiFi and connect

Now device will restart and you will see screen with IP details. Take note IP and and connect back to your normal WiFi AP.

After connection to Web Interface first we configure Controllers (MQTT + OpenHAB)

1. Download firmware as binary including flash tool 

2. Connect the ESP to Windows PC 
Using either USB/UART of board or separate USB/TTL adapter 

3. Write firmware using flash tool 
Note necessity for GPIO to be LOW to enter flashmode 

4. Restart ESP. WiFi AP “ESP_Easy_0” will appear, password: configesp
(prior to 2.0 the AP was named ESP_0) 
If you’re not automatically taken to the log-in page, browse to 192.168.4.1 

5. Search for you routers WiFi and connect
(if you have multiple AP they will all show up with the same SSID name multiple times) 

6. Reconnect to your WiFi and enter IP adress shown on previous screen

adding details

Click on Devices and now add right type of device. In our case DS18b20

Now let’s configure our temperature sensor. Go to Devices and select GPIO2 and set Name. After submitting ESPEasy automatically scan connected devices and should put and address.

If everything went good, you should be able to see sensor value.

The same is sent to defined MQTT server:

If for some reason Values are not accurate you may consider to correct them by adding some arithmetic:


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *