ESPEasy with DHT22 and Domoticz

  Domoticz

I’ve found this a very cheap, reliable and easy way to have temperature and humidity measurements that are reported in Domoticz.


Domoticz Setup

Before we start messing with the ESP and connecting the DHT22 to the arduino, we need to create a dummy device to update the status to in Domoticz.

In Domoticz go to Setup > Hardware and, if you don’t have one already, add the dummy hardware (1,2). And then click create a virtual switch.

Now add a new virtual sensor, choose Custom Sensor as the Sensor Type. The name is up to you.

Add Custom Sensor

In Domoticz go to Setup > Devices, locate the custom sensor just created and make note of it’s IDx, we will need it later.

Custom Sensor IDx 365


ESP8266 Setup

I prefer to have the correct and most recent arduino drivers present on my computer, to do this. I install Arduino IDE from the windows 10 store, this way it is kept up to date for me automatically. But obviously there are several way’s to get the drivers.

ESP8266

Next we download the latest version of ESP Easy by letscontrolit. ESP Easy can be found on their github page.

Then flash the firmware by using FlashESP8266.exe

For a much more comprehensive story on how to flash these see their wiki.

Finish the installation by following the last steps on the wiki.

Where to go from here

If everything has gone right you have a useable ESP Easy device now.

As no parameters are set it will go to "AP mode" for configuration.

Use your computer, tablet or smartphone and search a WiFi network named "ESP_Easy_0".

Connect to ESP_Easy_0 using the password "configesp" (without "").

Open your internet browser and type 192.168.4.1 as internet address into the browser. The WiFi setup of the ESP Easy opens.

You can choose your WiFi network now. Select the SSID and enter your passphrase, click connect.

It will take 20 seconds until a result is shown. If you typed everything correctly it will show a message that it is connected to the network and it shows the IP address.

Note the IP address!

Connect your computer or whatever back to your usual network. Open a browser and type the ip address into the browser.

You should see the config pages of ESPEasy now.

Connecting DHT22 to ESP8266

Connecting everything is very simple. Just connect everything up as in the follows. Note that i’m using VU (usb power output pin) to supply 5v to the DHT22

esp6288 and DHT22

Power-up the Arduino and connect to it’s ip adress.

Under the tab controllers input the details of your domoticz.

ESPEasy settings

 

Next, under the devices tab add the MH-Z19 sensor and give the domoticz device IDx for the virtual device that was created at the beginning.

ESPEasy settings

After submitting the settings you should see the device starts to update in Domoticz.

LEAVE A COMMENT