Irrigation garden with buienradar Topic is solved
Moderator: leecollings
-
- Posts: 165
- Joined: Thursday 28 December 2017 14:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Broek op Langedijk
- Contact:
Irrigation garden with buienradar
I can give my gardenplants water with a domoticz on/of switch (with off timer). I want on daily basis water my plants but not when it rains that day. I have also a buienradarswitch ' it rains' in domoticz.
What is the easiest way to script this which I involed the rainswitch? Is it possible whit a blocky? I have no knownledge of lua/dzventz.
What is the easiest way to script this which I involed the rainswitch? Is it possible whit a blocky? I have no knownledge of lua/dzventz.
-
- Posts: 115
- Joined: Saturday 31 August 2013 14:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Eindhoven (NL)
- Contact:
Re: Irrigation garden with buienradar
Maybe read this topic. https://www.domoticz.com/forum/viewtopi ... in#p205499
-
- Posts: 165
- Joined: Thursday 28 December 2017 14:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Broek op Langedijk
- Contact:
Re: Irrigation garden with buienradar
I saw this tread. The problem I encountered is that most of the example scripts are based on Weatherundergroundinfo. WU doens't provided free API's anymore so I use primarily Buienradar. I tried a couple of times to adjust a script to buienradarsensors but that is by no means an easy task for me.
-
- Posts: 109
- Joined: Tuesday 02 October 2018 20:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Irrigation garden with buienradar
Please post you're blocky here. That's easier to see what's going wrong
-
- Posts: 165
- Joined: Thursday 28 December 2017 14:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Broek op Langedijk
- Contact:
Re: Irrigation garden with buienradar
I made this blocky:
It's switch off itself.
Is this the correct way or do I have to use variables? And how do I use this?
I want that only in the evening/night (between 20.00 and 8.00 hour) my irrigation (waterpomp) goes on when my 'lavendel voch' is above 30 (cb).It's switch off itself.
Is this the correct way or do I have to use variables? And how do I use this?
-
- Posts: 109
- Joined: Tuesday 02 October 2018 20:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Irrigation garden with buienradar
I think it could be able to work, but time can't be after 20:00 and before 8:00. Blocky only thinks in one day. Change the and between the time in or and I think it will work.
-
- Posts: 165
- Joined: Thursday 28 December 2017 14:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Broek op Langedijk
- Contact:
Re: Irrigation garden with buienradar
Thx. I adjust it but my blocky doesn't work. After trying some things it looks like the problem is the variable 'lavendel vocht'. If I try another randow variable (by example the lux value outside) it does work.What is the problem with this variable and can I fix this or is there another workaround?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Irrigation garden with buienradar
What is the devicetype / subtype for the device lavendel vocht as shown on the devices tab ?
And please also show the Blockly as it is now after you made the changes in time logic in you answer.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 47
- Joined: Tuesday 28 October 2014 17:55
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.2
- Location: Aalter, Belgium
- Contact:
Re: Irrigation garden with buienradar
The best time is watering garden is in mornings )
-
- Posts: 165
- Joined: Thursday 28 December 2017 14:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Broek op Langedijk
- Contact:
Re: Irrigation garden with buienradar
this is my blocky now (I switched to fixed time):
'Lavendel vocht' is type 'General, Soil Moisture'
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Irrigation garden with buienradar
Because the Soil Moisture device stores its moisture value in another place then most other devices (it uses nValue while most other utility devicetypes use sValue), Blockly is not able to evaluate the value.
You could try below dzVents alternative.
Code: Select all
return {
on = {
timer =
{
'at 09:00',
'at 21:00',
},
},
logging =
{
level = domoticz.LOG_DEBUG, -- set to domoticz.LOG_ERROR when OK
marker = 'Beregening',
},
execute = function(dz)
local soilDevice = dz.devices('Lavendel vocht')
local moisture = soilDevice.moisture
local pump = dz.devices('Waterpomp')
dz.log(soilDevice.name .. ' measures a moisture of ' .. moisture .. ' cb ',dz.LOG_DEBUG)
if moisture < 30 then -- Should this be more ( > ) or less ( < )then 30 ?
pump.switchOn()
pump.switchOff().afterSec(3600)
dz.notify('Beregening', 'De planten worden automatisch beregend',dz.PRIORITY_NORMAL)
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 165
- Joined: Thursday 28 December 2017 14:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Broek op Langedijk
- Contact:
Re: Irrigation garden with buienradar
I try this dzvents script and it works! Great!
Only strange thing is that only the time ' 21:00' works and ' 09.00' not. Maybe it is: 9:00 and not 09:00?
Only strange thing is that only the time ' 21:00' works and ' 09.00' not. Maybe it is: 9:00 and not 09:00?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Irrigation garden with buienradar
09:00 and 9:00 should both work. But I see in your post that you use 09.00 ?
the hour minute divider must be a :
What version do you use ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 165
- Joined: Thursday 28 December 2017 14:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Broek op Langedijk
- Contact:
Re: Irrigation garden with buienradar
I use 2020.2 (latest stable). In use for both times ':' .
If I change to 10:30 It looks likes the script is now running
I checked my log:
It measures 25CB so it's less than 30 so irrigation is not needed.
If I change to 10:30 It looks likes the script is now running
I checked my log:
Code: Select all
2020-05-08 10:30:00.529 Status: dzVents: Info: Beregening: ------ Start internal script: Irrigatiescript2:, trigger: "at 10:30"
2020-05-08 10:30:00.530 Status: dzVents: Debug: Beregening: Processing device-adapter for Lavendel vocht: Soil Moisture device
2020-05-08 10:30:00.531 Status: dzVents: Debug: Beregening: Processing device-adapter for Waterpomp: Switch device adapter
2020-05-08 10:30:00.532 Status: dzVents: Debug: Beregening: Lavendel vocht measures a moisture of 25 cb
2020-05-08 10:30:00.532 Status: dzVents: Info: Beregening: ------ Finished Irrigatiescript2
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Irrigation garden with buienradar
Then please try again tomorrow with the original 'at 09:00'. I just retested with this and it does work as designed.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 36
- Joined: Tuesday 13 August 2019 10:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: Irrigation garden with buienradar
[quote=remko2000 post_id=246340 time=1588676346 user_id=17935]
this is my blocky now (I switched to fixed time):
Schermafbeelding 2020-05-05 om 12.56.35.png
'Lavendel vocht' is type 'General, Soil Moisture'
Schermafbeelding 2020-05-05 om 13.00.00.png
[/quote]
Hello remko2000,
I want to set up an Automat irrigation, too, supported by a soil moisture sensor. Can you tell me which device do you use to get the soil moisture into Domoticz?
Thx,
Zavjah
this is my blocky now (I switched to fixed time):
Schermafbeelding 2020-05-05 om 12.56.35.png
'Lavendel vocht' is type 'General, Soil Moisture'
Schermafbeelding 2020-05-05 om 13.00.00.png
[/quote]
Hello remko2000,
I want to set up an Automat irrigation, too, supported by a soil moisture sensor. Can you tell me which device do you use to get the soil moisture into Domoticz?
Thx,
Zavjah
-
- Posts: 65
- Joined: Monday 25 March 2019 15:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Brunssum, Netherlands
- Contact:
Re: Irrigation garden with buienradar
I use the Mi Flora sensors of Xiaomi
Raspberry Pi 4 With Domoticz - RFXCom - Tuya Wifi LED lights - Chuango Alarm - Zwave+ - Zigbee2MQTT - Anna Thermostat - Broadlink IR, P1 - Eufy Robo Vacuum - Worx Robo Mower
-
- Posts: 65
- Joined: Monday 25 March 2019 15:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Brunssum, Netherlands
- Contact:
Re: Irrigation garden with buienradar
Hi Waaren,
Good morning.
I was having the same problem with my Xiaomi Mi Flora Sensors.
Getting this errors:
2020-08-21 10:03:00.354 Error: EventSystem: Lua script error (Blockly), Name: Tijd Planten meldingen_5 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare nil with number
2020-08-21 10:03:00.354 Error: EventSystem: Lua script error (Blockly), Name: Tijd Planten meldingen_6 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to compare nil with number
I have got 4 sensors, and want to get notifications like you can see in my Blockly.
Can you please help me how to make a script in dzVents so this works?
I already edited your script so it works for one of the sensors for the water. How to make this script working for all 4 plants and also the plant food sensors?
Code: Select all
return {
on = {
timer =
{
'at 09:39',
},
},
logging =
{
level = domoticz.LOG_DEBUG, -- set to domoticz.LOG_ERROR when OK
marker = 'Plant Meldingen',
},
execute = function(dz)
local soilDevice = dz.devices('Zolder Bananenboom Vochtigheid')
local moisture = soilDevice.moisture
dz.log(soilDevice.name .. ' measures a moisture of ' .. moisture .. ' cb ',dz.LOG_DEBUG)
if moisture < 20 then -- Should this be more ( > ) or less ( < )then 30 ?
dz.notify('Bananenboom water', 'De Bananenboom moet water hebben',dz.PRIORITY_NORMAL)
end
end
}
- Attachments
-
- bananenboom.png (31.43 KiB) Viewed 2587 times
Raspberry Pi 4 With Domoticz - RFXCom - Tuya Wifi LED lights - Chuango Alarm - Zwave+ - Zigbee2MQTT - Anna Thermostat - Broadlink IR, P1 - Eufy Robo Vacuum - Worx Robo Mower
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Irrigation garden with buienradar
Happy to help but need some additional information.
Names, types and subtypes of all involved sensors
Per plant the water- and foodlimits to decide when notification is required.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Irrigation garden with buienradar
What/which device do you use and how is it connected? Looking for something myselfremko2000 wrote:...
I want that only in the evening/night (between 20.00 and 8.00 hour) my irrigation (waterpomp) goes on when my 'lavendel voch' is above 30 (cb).
It's switch off itself.
The Gardena one is quite expensive and needs cloud connection which I am not really in favor off
Verzonden vanaf mijn iPhone met Tapatalk
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
One RPi with Pi foundation standard touch screen to display Dashticz
Who is online
Users browsing this forum: No registered users and 0 guests