Domoticz: Hardware and dummy device. Tests with ESP Easy

Table of Contents

Domoticz dummy device  allow to recover measures (temperature probe, detector of presence…) or to send orders to a DIY connected object, for example a relay. Virtual devices can also be used to display information retrieved from an online service (weather, air quality, road traffic,…). We’ll see how to retrieve measures temperature and humidity from a probe made with ESP Easy and how to drive a relay with a WeMos D1 Mini.

Creating a virtual device (Dummy)

Go to the menu settings then material

domoticz materiel dummy

In the Type list, choose Dummy (Does nothing, use for virtual switches only).

Name material. If you have developed probes (or other connected object) using firmware ESP Easy, give a descriptive name with the node number to help you more easily find you in your cloud of objects.

In my case, I standardized the name with the material used, ESPEasy, the number of the node. Here, it gives Wemos_ESPEasy_1.

Note. You can create a single virtual hardware to control all your devices, it’s just a matter of organization and now. I find easier and clearer to group devices on same hardware. If we remove the material, associated devices will be deleted at the same time.

onfiguration materiel dummy

Once established, you will have a new material in your list with a button create virtual sensors.

domoticz creer capteurs virtuels

Create a virtual device (sensor)

Press create virtual sensors. Give it a name. We will get the measure of a digital Barometer (made in this article). In the list, choose Temp-Humidity-Baro. 

domoticz dispositif virtuel creation

Go to the devices. You will find your new sensor. You now have sound ID (Idx) needed to show action from a script, an ESP Easy object…

domoticz-espeasy-barometre-virtuel wemos d1 mini bmp180

Receive and display measurements from a sensor

In this example, go to the interface of ESP Easy configuration and indicate the IDX No. 22 to the sensor BMP180.

esp easy idx domoticz barometre bmp180

I configured sending measures every 20 seconds. It is too much, especially for use on battery of course.

Retrun on Domoticz. Refresh the pages of the devices. You should receive the first data.

domoticz capteur barometre reception mesures

Now go to weather, you’ll find your barometer.

domoticz barometre esp easy bmp180

In Temperature, you will find the temperature measured by the BMP180 with the dew point calculated at each reception of measurement.

domoticz sonde temperature esp easy bmp180

Send a command from a virtual sensor: drive a relay…

Now imagine you want to drive a relay using ESP Easy. Return to material to create a new sensor. Choose the type of switch (Switch).

domoticz capteur virtuel relai interrupteur

Go to the switches and edit.

domoticz commande relai

wemos d1 mini relai shield


Choose an icon, for example Generic which symbolizes a power button. in the Action On field enter the command. In this example, I used a relay shield on a Wemos D1 Mini (presented here). The http request is written as

http://ip/control?cmd,gpio,id,0 ou 1

what gives

  • to activate:, 5, 1
  • for disable:, 5, 0

Can also determines a delay before sending a command (ON or OFF). The switch-on delay is cut immediately after the receipt of the status change. The extinction time-out is counted after execution of the command. Very practical and very simple implementation, this solution avoids develop scenarios in many situations. Here are two small cases of application:

  • If we detect presence in a room, we light the lamp immediately (time ignition = 0) and we turn it off after 30 seconds (delay extinction = 30).
  • One detects the opening of the automatic gate, we send a signal on the dry contact using a relay after 20 seconds (delay ignition = 20) and free the relay 1 second (after extinction = 1).

Save and go back on the switches pages.

domoticz capteur virtuel configuration

Press the button, you should hear ‘Slam’ the relay.

domoticz capteur virtuel on

That is, it’s over for this short presentation on the sensors and virtual devices under Domoticz. Very simple to implement and very powerful.

Click to rate this post!
[Total: 0 Average: 0]

Thanks for your reading

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question
We will be happy to hear your thoughts

Leave a Reply

Read more
DIY Projects
DIY Projects