Hi Guys,
(Raspi 3, Beta 3.9476)
I’m trying to create script for Irrigation bypass after rainy day or upcoming rain, by comparing rainfall gauge bigger than 2mm or rain expectation (on / off)
I have created Variable irri_bypass as integer.
I can’t get it to work - VAriable value is still just zero.
Thanks
Problem with script
Moderator: leecollings
- michaldobrotka
- Posts: 50
- Joined: Sunday 01 November 2015 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Problem with script
- Attachments
-
- Unbenannt.PNG (14.39 KiB) Viewed 999 times
Domoticz on Raspi 3 and slave on ZeroW (running only with Broadlink plugin), Serial Mysensors GW on Arduino nano, Broadlink RM2, Rehau CO2 USB Stick, RF link 433 MHz, 2x Amazon Echo Dot (Controlicz), ESP2866 witk Espeasy, Sonoff
Re: Problem with script
Hi,
I just did a test in version 3.9478 with an integer variable and a testswitch and blockly changed the variable when I turned the switch on or off. So it looks to me that this idea could work.
In your case: give it a try without the rainfall gauge, just the switch. Switch it manually and check if it works. If it does, try it without the switch, just the rainfall gauge and see if it works.
I just did a test in version 3.9478 with an integer variable and a testswitch and blockly changed the variable when I turned the switch on or off. So it looks to me that this idea could work.
In your case: give it a try without the rainfall gauge, just the switch. Switch it manually and check if it works. If it does, try it without the switch, just the rainfall gauge and see if it works.
- michaldobrotka
- Posts: 50
- Joined: Sunday 01 November 2015 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Problem with script
Hi @mrf68,
I followed your instructions, and simple script only with rainfall gauge is working. OR function with another condition isn’t working.
Thanks
I followed your instructions, and simple script only with rainfall gauge is working. OR function with another condition isn’t working.
Thanks
Domoticz on Raspi 3 and slave on ZeroW (running only with Broadlink plugin), Serial Mysensors GW on Arduino nano, Broadlink RM2, Rehau CO2 USB Stick, RF link 433 MHz, 2x Amazon Echo Dot (Controlicz), ESP2866 witk Espeasy, Sonoff
Re: Problem with script
Problem with the OR statements in your script, is that if rainfall > 2 and rain expected is off, then the first rule wants to set the variable to 1 because of the rainfall, but then it gets to the second rule that wants to set the variable back to 0 because rain expected is off.
Just fyi.
Just fyi.

Who is online
Users browsing this forum: No registered users and 1 guest