Capacitive Soil Moisture Sensor Wemos ESPeasy

Everything about esp8266 and more.

Moderator: leecollings

User avatar
JHO01
Posts: 24
Joined: Wednesday 02 November 2016 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by JHO01 »

Finally got the capacitive soil moisture sensor working in Domoticz

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
Submit.

Now the number below the Leaf Wetness icon is showing the moisture percentage


Done
RPI-3, Z-stick Gen5, RFlink, Zigbee2mqtt, 1-wire DS18B20, Fibaro switches, various RF-433 sockets, BMP018, Somfy, Wemos, Tradfri.
User avatar
JHO01
Posts: 24
Joined: Wednesday 02 November 2016 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by JHO01 »

Next challenge is to make the capacitive moisture sensor water proof. Have a look at my banana collection

1) cut out some plastic of the connector and clamp and solder a telephone wire:
2) Use a 2 cm diameter hose
3) Fill up the inside with silicone
1.jpg
1.jpg (29.39 KiB) Viewed 17470 times
2.jpg
2.jpg (22.71 KiB) Viewed 17470 times
3.jpg
3.jpg (35.07 KiB) Viewed 17470 times
RPI-3, Z-stick Gen5, RFlink, Zigbee2mqtt, 1-wire DS18B20, Fibaro switches, various RF-433 sockets, BMP018, Somfy, Wemos, Tradfri.
misko903
Posts: 51
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by misko903 »

Thank you, I will try it.
Wemos itself is somewhere in the waterproof box together with power adapter?
User avatar
JHO01
Posts: 24
Joined: Wednesday 02 November 2016 13:59
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by JHO01 »

RPI-3, Z-stick Gen5, RFlink, Zigbee2mqtt, 1-wire DS18B20, Fibaro switches, various RF-433 sockets, BMP018, Somfy, Wemos, Tradfri.
misko903
Posts: 51
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by misko903 »

Thanks for sharing, really great idea, and it is working out of the box!
the basic parts are working, yeah!
Image

now i want to integrate it into something like this:
Image

maybe i can add some more sensors to it?
misko903
Posts: 51
Joined: Thursday 27 September 2018 22:58
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Trencin, Slovakia
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by misko903 »

I have inverted the formula, to correspond the Soil Moisture sensor values in Domoticz (using theme Aurora)
00 - 09 ==> "saturated
10 - 19 ==> "adequately wet"
20 - 59 ==> "irrigation advice"
60 - 99 ==> "irrigation"
> 99 ==> "Dangerously dry"
(definitions from this post viewtopic.php?t=23443#p180501)

now the formula is: (%value%-350)/(800-350)*100
where the values are 350 = sensor in the water, 800 = dry sensor - not real clay values!
I used the same sensor - DIY More Capacitive Soil Moisture Sensor v1.2
manuloup
Posts: 31
Joined: Sunday 23 November 2014 16:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by manuloup »

Hi,

I just installed Espeasy on my Wemos D1, and I also have a soil sensor connected (YL-67 type).

The soil is connected to A0-Gnd and 3.3V. It seems working, has the soil sensor has been detected.

espeasy 1.jpg
espeasy 1.jpg (101.01 KiB) Viewed 15078 times
espeasy 2.jpg
espeasy 2.jpg (81.78 KiB) Viewed 15078 times

If I enable send data, my device is updated in domoticz but stays at 0.
If I disable it, even with the rule, nothing happens, my device is not updated anymore in domoticz.

espeasy 3.jpg
espeasy 3.jpg (50.38 KiB) Viewed 15078 times

I did not understand : -Devices: add Analog input - internal, !st GPIO-14 (D5) enabled,
I only have A0 connected. I did not find anything for GPIO 14 - D5 to enable it.

Any idea ?

Thanks for your help.

Manu
Last edited by manuloup on Monday 13 May 2019 7:00, edited 1 time in total.
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
tlambin
Posts: 12
Joined: Tuesday 16 May 2017 22:12
Target OS: -
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by tlambin »

here the same issue
I hope someone can help us
Mdieli
Posts: 12
Joined: Saturday 14 February 2015 11:18
Target OS: Linux
Domoticz version: BETA
Location: The Netherlands
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by Mdieli »

manuloup wrote: Sunday 12 May 2019 19:22
...
tlambin wrote: Sunday 12 May 2019 22:22 ...
It is good i came across both of your posts. I changed Domoticz server a few days ago, and forgot to update the soil sensor to the new server.
I did it yesterday, but was wondering why the data still didn't got updated. It wasn't since the 12th.
I first thought of problems with my server and the reachability from it. Even tried to force a browser JSON but that worked.

Unfortunately, i have no clue where to find the solution.. :(
marcojpolet
Posts: 63
Joined: Thursday 04 February 2016 20:18
Target OS: -
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by marcojpolet »

Hi all,

Which version of ESPEasy do you use? Also, did you check the log in the ESPEasy menu? You could also set that to a higher level of detail, perhaps that gives a clue.

Regards,
Marco
tlambin
Posts: 12
Joined: Tuesday 16 May 2017 22:12
Target OS: -
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by tlambin »

Hi Marco

I use R120 version of esp easy

marcojpolet
Posts: 63
Joined: Thursday 04 February 2016 20:18
Target OS: -
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by marcojpolet »

Hi,

Thanks. Perhaps consider the mega branch, for me it's very stable (15 days+ without interruptions). But please also share the log details, this might help too.

Regards,
Marco
tlambin
Posts: 12
Joined: Tuesday 16 May 2017 22:12
Target OS: -
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by tlambin »

:D it’s working :D
If have installed the ESPEasy_mega-20190511
Here some pictures
tlambin
Posts: 12
Joined: Tuesday 16 May 2017 22:12
Target OS: -
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by tlambin »

more pictures to come
Attachments
IMG_0350.jpg
IMG_0350.jpg (245.24 KiB) Viewed 14828 times
IMG_0349.jpg
IMG_0349.jpg (273.24 KiB) Viewed 14828 times
IMG_0348.jpg
IMG_0348.jpg (139.55 KiB) Viewed 14828 times
tlambin
Posts: 12
Joined: Tuesday 16 May 2017 22:12
Target OS: -
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by tlambin »

the last pictures
Attachments
IMG_0352.jpg
IMG_0352.jpg (129.73 KiB) Viewed 14828 times
IMG_0347.jpg
IMG_0347.jpg (96.63 KiB) Viewed 14828 times
Nilesh579
Posts: 1
Joined: Monday 03 June 2019 13:29
Target OS: -
Domoticz version:
Location: India
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by Nilesh579 »

Quite practical answer!!
manuloup
Posts: 31
Joined: Sunday 23 November 2014 16:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by manuloup »

Hi,

I guess I also have to calibrate the sensor. Is there a simple way to do it ?

Thanks,

Manu
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
tlambin
Posts: 12
Joined: Tuesday 16 May 2017 22:12
Target OS: -
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by tlambin »

Put soil in a jar and put it in the oven until all moisture is vaporized.

Read the value in the devices tab. In my case 820 This will be your 0%

Add water over the soil until the water stays on the soil. Read the value in the devices tab again. In my case 360 This will be your 100%

Now check the “calibration enable“ checkbox in the tab “devices” “task settings” and fill out your values
acaonweb
Posts: 78
Joined: Thursday 23 March 2017 14:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by acaonweb »

JHO01 wrote: Monday 09 July 2018 17:14 Finally got the capacitive soil moisture sensor working in Domoticz

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
Submit.

Now the number below the Leaf Wetness icon is showing the moisture percentage


Done
Just two questions to understand better :)
why don't send value to controller but use rules?
why use http instead mqtt?
manjh
Posts: 731
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Capacitive Soil Moisture Sensor Wemos ESPeasy

Post by manjh »

I connected to an ESP, using VCC, Gnd and A0. How difficult could it be.
Then added a device as described.
Should work, but doesn't: my A0 value stays at zero....
Any ideas?
Hans
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests