Page 1 of 1

SoilMoisture, Translation

Posted: Tuesday 30 April 2024 16:03
by Toulon7559
According to the API/JSON-definition of Domoticz, soilmoisture is expressed as cbar
Soil Moisture

/json.htm?type=command&param=udevice&idx=IDX&nvalue=MOISTURE

IDX = id of your device (This number can be found in the devices tab in the column "IDX")
MOISTURE = moisture content in cb 0-200 where:

00 - 09 = saturated, 10 - 19 = adequately wet, 20 - 59 = irrigation advice, 60 - 99 = irrigation, 100-200 = Dangerously dry,
Some available sensors do not output solimoisture as cbar, but as % (or something comparable).

Considering the background charaterictics a correct translation is non-linear and dependent on the soil-type.
Probably a specific lookup-table will be appropriate.
For a very rough & simple approximation the following scaling might be suitable,
reversely related to the API-scaling towards a scale of 0 => 100 = Dry = Wet?
Saturated = 100 ~ 96 => cb 00 ~ 09
Adequately Wet = 95 ~ 91 => cb 10 ~ 19
Irrigation advice = 90 ~ 80 => cb 20 ~ 59
Irrigation = 79 ~ 49 => cb 60 ~ 99
Very Dry = 50 ~ 0 => cb 100 ~ 200

Your opinion?

Re: SoilMoisture, Translation

Posted: Tuesday 30 April 2024 16:19
by FireWizard
Hi,

Some Info, that might be of interest:

https://eos.com/blog/soil-moisture/

and

https://cosmos.ceh.ac.uk/measuring

Regards

Re: SoilMoisture, Translation

Posted: Tuesday 30 April 2024 17:10
by waltervl
Centibar is related to a specific soil moisture measuring device.

If you have a measuring device that gives a 1-100 value you will have to look at the manual of that device to see what the manufacturer considers the threshold for irrigation. It could be anything.

Re: SoilMoisture, Translation

Posted: Tuesday 30 April 2024 18:09
by FireWizard
Hi @waltervl

You wrote:
Centibar is related to a specific soil moisture measuring device.
Sorry to say, that is wrong.

A centibar (cbar) is equal to 1/100 bar.

See for definitions: https://en.wikipedia.org/wiki/Bar_(unit) and https://en.wiktionary.org/wiki/centibar

So cbar is not related to a specific device, but of course there exist devices that give a result, expressed in cbar, while other do the same, but expressed in kPa (or Pa) or even something else, like percent.

I agree, that if it is expressed in a scale from 1-100 the manufacture should present a kind of conversion table.

Regards

.

Re: SoilMoisture, Translation

Posted: Tuesday 30 April 2024 23:31
by waltervl
I agree, I was not complete. I should have written: Measuring soil moisture in unit of measure centibar (or equivalent pressure uom) is related to a specific type of soil moisture measuring device.

Re: SoilMoisture, Translation

Posted: Sunday 05 May 2024 16:57
by Toulon7559
related to a specific type of soil moisture measuring device.
exactly is the 'problem' why a general translation is difficult.
My proposal for a very coarse translation also biased by the (usual lack of) knowledge which type of soil is measured.
It does not make sense to try to be accurate if the basic data is 'weak':
aiming for an indicative value is best achievable result .......

Re: SoilMoisture, Translation

Posted: Sunday 05 May 2024 18:19
by waltervl
As said before check the manual of you sensor device that gives a percentage value. There is no general rule to create a conversion.

What measuring device are you using that gives these 0-100% values?

Re: SoilMoisture, Translation

Posted: Thursday 09 May 2024 20:35
by Toulon7559
My Ecowitt WH51 soilmoistsensor has output as %
Input for the functionality is measured AD-value.
Simple 2-point 'calibration' described in the manual is:
- take bone-dry environment and adjust related AD-value as lower reference
- put sensor in glass of water and adjust related AD-value as high reference.
In my opinion hardly has relation to real, non-linear soilmoist characteristics.
In this perspective perhaps also not worthwhile to spend effort for a translation (except as 'technical challenge') ..........