I’m creating a Automatic Watering System for my plants. I’ve installed a Soil Moisture Sensor and a Pump to an NodeMCU with ESPEasy on it. So far, I can regulate the pump by a switch in BasicUI and I can see the state of the Moisture Sensor (wet, medium or dry).
My goal is to install an automatic system that automatically activates the pump when a threshold value is exceeded. I did a lot of research and tried to write a rule for it. Unfortunately it has not worked yet.
Thats my rule until now. Very simple but it doesnt work.
rule "Water System"
when
Item Client1_MoistureSens changed
then
logInfo("Test", Client1_MoistureSens.state.toString)
if(Client1_MoistureSens.state > 600){
sendCommand(Pump1, ON) }
end
**2019-11-18 12:49:29.622 [vent.ItemStateChangedEvent] - Client1_MoistureSens changed from 854.0 to 853.0
==> /var/log/openhab2/openhab.log <==
2019-11-18 12:49:29.645 [INFO ] [.eclipse.smarthome.model.script.Test] - 853.0
2019-11-18 12:49:32.603 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:35.606 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:38.608 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:41.607 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:44.605 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:47.605 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:50.606 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:53.607 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:56.602 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:49:59.606 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:50:02.605 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.
2019-11-18 12:50:05.601 [WARN ] [.profiles.RegexTransformationProfile] - Please specify a function and a source format for this Profile in the 'function' and 'sourceFormat' parameters. Returning the original state now.**
I think there is no unit. It is just a number between 0-1024.