Hi. During holidays I finally installed my sonoff 4ch in place of the classic irrigation timer. Everything is working perfectly! Thank you klogg!
PS: I’m not using weather adjustments.
Hi klogg,
Are your transformers 24V AC? If so, can you tell me where you got them?
Cheers,
Sean
Yes they are 24V AC.
Are you in the UK? I think I got them from ScrewFix but I will try and find out for sure later.
I am in the Netherlands, but am in the UK often and can have items shipped to an address there.
And just saw ita’s link: I hadn’t realized doorbell transformers are 24V AC. That does simplify things.
thanks both
Did you ever fix this? I have just seen a thread that might be connected Relays change state on boot and restart - how to fix?
or then again it might not. I am by no means an expert.
In thread You linked I’m connecting relays directly to Raspberry PI, but @mviamin is using ESP to control relays - that’s different hardware
Yeah I know but I just thought there might be a connection
I did say I wasn’t an expert!
I did say I wasn’t an expert!
Same here
Hi mviamin,
Perhaps the problem is the type of relay you have. On the “output” side, relays can be set as normally open or normally closed. On the “input” side they can be set as trigger high or trigger low.
Some relays are trigger low.
While others let you choose
The trigger defines whether the NO switch will be closed when your ESP32 GPIO has 1. current is flowing through (high) or 2. when no current is flowing through (low).
I think the best way to have a relay for a water valve is normally open with trigger high.
Cheers,
Sean
Yes, it was fixed. The issue was the 24v power supply supply and/or maybe the way I wired it inverting the + and the -, not sure. When I changed the power supply that behavior disappeared and now all is good. I posted on the other thread as well but i want to mention here that I found this video very informative for newbies wanting to understand the specific function of GPIOs. @Misiu It does not cover RPI, only ESP8266 and ESP32 but there may be a similar one around.
Ha ha, yes I have seen that video and that is what made me wonder if there was a connection. Most of it went over my head though when I watched it but I filed it under, “Things to remember I need to understand better”!
Incidentally, I have updated my fork of @klogg ’ s code on github. While I used most of his code (thanks !! :), i have adapted to my own situation :
- I needed 13 different zones grouped in 2 areas, East and West so I have 2 separate ESPs/Relays for that
- I do not use the Weather Adjustments part. Where I live we have no rain at all for part of the year and quite a bit in the winter, therefore the master on/off switch is good enough. Hope this helps someone as much as the original work helped me…
I have to say I never expected any interest from anyone else when I wrote this. It was my first real HA project and at the time I was just glad to get it working. I am very happy that others are using it and especially happy to see that you have managed to adapt it to your different needs without too much trouble.
Hello everyone, it would be possible to match the time of the sunset with the input_number.set_value service so that the time of the last irrigation is automatically updated with the time of the sunset
Greetings and thank you
Hello, everyone. I have already bought my Hw based on Sonoff 4CH Pro R2 and have been adjusting the code to my seven zones and peterburga Sonoff implementation (had to add some delay to avoid the Web Service of eWelink to crash). But, unfortunately I am stuck and not able to make it work after 3 days looking to the code. I’ve been suffering a lot on each step as I am not an expert on HA and my coding skills are a bit rusty. Can someone please tell me where in the code each of the switches are turned “ON” ?, I am trying to make lot of reverse engenieering to understand where my problems are. A “high level” idea on how the code works would also be useful. Apologies, up front.
@klogg it took me a while to figure out, but your garden_irrigation.yaml on GitHub is a duplicate of globals
Well… I have no idea how I managed that!!
Thanks for pointing it out.
garden_irrigation.yaml
is now as it should be!
Did you recently copy it from GitHub?
As you’ll see from @Tjeerd I uploaded a file incorrectly. It should be ok now if you want to copy it again.
Yes, I uploaded the duplicate code and had to delete it, but I thought it was a duplication and left only one alive, what I did not think is that a whole piece of code was missing because of that. It looks like my coding skills were not so rusty and my self confidence has finally come back to decent levels. Thanks for the clarification.