Hardware:
-capacitive soil moisture sensor, does not corrode (Aliexpress)
-Wemos D1 Mini
-connect moisture sensor VCC=>5V (Wemos), GND=>G (Wemos), AUDT=>A0 (Wemos)
Software steps:
Domoticz:
-Create Virtual Sensor, Leaf Wetness (because I like the little green icon); note IDX (in my case 1883)
Wemos:
-Flash Wemos with ESPeasy
ESPEasy:
-Config: Connect to your wifi network
-Controllers: Connect to your Domoticz HTTP
-Devices: add Analog input - internal, !st GPIO-14 (D5) enabled,
Do NOT enable send to Controler.
Memorize Name sensor (in my case Soil) and # name of Values (in my case Analog)
Add formula: (840-%value%)/425*100 (The A0 value is varying between 840-425, Dry-Wet)
Submit
-Tools, advanced, check rules, Submit
-Rules: add
Code: Select all
on Soil#Analog do
SendToHTTP,192.168.2.30,8080,/json.htm?param=udevice&type=command&idx=1883&nvalue=[Soil#Analog]
endon
Now the number below the Leaf Wetness icon is showing the moisture percentage
Done