Page 1 of 1
Analog soil sensor
Posted: 28 Oct 2019, 20:17
by marktn
Hello,
I have connected a Soil moisture sensor to my analog input.
It works in the ESP 8266, but the value that it sends to domoticz stays 0.
What to do?
Re: Analog soil sensor
Posted: 28 Oct 2019, 22:25
by TD-er
What type of sensor did you define in Domoticz?
When in doubt, define a "custom" sensor in Domoticz.
Re: Analog soil sensor
Posted: 29 Oct 2019, 19:41
by marktn
Auuww.. that was easy. I used Soil moisture, that didn’t work.
Now with the custom sensor it works perfect!
Is there a way to invert the analog value? 0 is the sensor under water, 100 is dry.
Re: Analog soil sensor
Posted: 29 Oct 2019, 20:43
by TD-er
You can use the formula on the device configuration page.
I guess something like this would do:
100-%value%
Re: Analog soil sensor
Posted: 30 Oct 2019, 18:40
by marktn
That doesn't work. Als no info the wiki.
Re: Analog soil sensor
Posted: 30 Oct 2019, 22:40
by TD-er
marktn wrote: ↑30 Oct 2019, 18:40
That doesn't work. Als no info the wiki.
Where do you enter the formula and what exactly do you enter there?
Have you also read this part?
https://www.letscontrolit.com/wiki/inde ... asyFormula
I have to admit it isn't the best documentation, but if you look for "formula" on the wiki, you do find a number of examples.
Re: Analog soil sensor
Posted: 31 Oct 2019, 21:11
by marktn
[/quote]
Where do you enter the formula and what exactly do you enter there?
Have you also read this part?
https://www.letscontrolit.com/wiki/inde ... asyFormula
I have to admit it isn't the best documentation, but if you look for "formula" on the wiki, you do find a number of examples.
[/quote]
I have read that part of the wiki. I think a formula isn't possible to invert the analog signal.
Mark
Re: Analog soil sensor
Posted: 02 Nov 2019, 15:03
by Drum
I could be wrong here, if the value is 100 for dry and 0 for water, could the formula not do something like 100 - value? 100 become 0 and 0 becomes 100
By the way which sensor is it? I am always looking for a better soil moisture sensor.
Re: Analog soil sensor
Posted: 02 Nov 2019, 15:08
by dynamicdave
I use the formula (1024-%value%)/100 in my soil monitor.
Here's a link to the tutorial guide.
http://resources-area.co.uk/node-red-fl ... sensor.pdf
On my set-up I'm using a small-signal transistor to switch the +3V3 rail on/off to the soil sensor (to reduce the effects of corrosion).