I don’t use GitHub in the way it is supposed to be used. I simple copy my config there whenever I make any changes. I have recently uploaded some new files that made a few minor coding improvements and improved the weather adjustments (which I now use and seem to work quite well). Also I discovered that the sonoff pulsetime settings weren’t correct if using weather adjustments. I don’t use the schedules unless I am on holiday so the last time I did that was early June and they worked well.
However as proved by the recent cock-up with the duplicate globals.yaml file that @Tjeerd found, my copying might not always have been perfect.
I will copy all my files up again so hopefully that will resolve any issues (wait a little while after this post for me to do it)…
I always use irrigation everyday. Yesterday i tried to set irrigation from EVERYDAY to ALTERNATE. UI tell me next irrigation day was 7 sept at 19:00 (it is right) … But today (6 sept) irrigation started at 19:00… Anyone this same problem?
I’ll be honest and say I have never used alternate days but I had a quick look and can see no reason why it didn’t work and whilst it was well over a year ago I am sure I must have tested it back then
Sorry it’s taken so long, I have been crazy busy. Here are a couple of photos to show my hardware install. It’s simply a weatherproof enclosure with a 24Vac power supply, a bridge rectifier, a switchmode power supply, a NodeMCU and two dual channel relay boards. I mounted the PCB’s using nylon stand-offs to a sheet of galvanised steel, cutting out a section near the NodeMCU antenna to prevent shielding / interference.
The bridge rectified provides a DC voltage from the 24Vac power supply which is then fed into the switchmode PSU to give me 5Vdc for the NodeMCU and relay control.
The 24Vac is fed to the solenoids in the garden via the relay contacts.
Since I have a bore, one of the relays is controlling a contactor to start / stop the bore. This contactor has a 24Vac coil.
I hadn’t yet tidied up the wiring in these photos.
I have downloaded @klogg all your files - it is awesome. Got the ESP32 code working, uploaded all the cards, put all the files into the package/garden directory etc. etc.
But I have seem to have an issue with one of the automation scripts. When I try to go to the overview screen all I get is a blank screen. In the log files I get this:
Log Details (ERROR)
Fri Oct 11 2019 22:51:21 GMT-0700 (Pacific Daylight Time)
Error while executing automation automation.irrigation_master_control_switch. Invalid data for call_service at pos 2: not a valid value for dictionary value @ data['entity_id]
helpers/script.py[ERRORS]
Looking at the code in garden_master_control_.yaml — I think there issue is near here:
alias: Irrigation Master Control Switch
initial_state: ‘on’
trigger:
- platform: state
entity_id: input_boolean.irrigation_master_control_switch
- platform: homeassistant
event: start
I just had a very quick look and the code is exactly the same as my local version which works. (Sometimes the GitHub version does get out of step with my local ‘production’ version. As I have said the GitHub version is only a snapshot in time for others to use and modify as fits their purpose).
Do you have the weather scripts in your config? Have you kept the names of the scripts the same as I wrote? The for will fail if there are no scripts with those name patterns (e.g. startswith('Irrigation - '), startswith('Irrigation Weather - ') which is possibly where your error is coming from?
Just a quick update. I got everything working with NO errors! If you anyone runs into similar errors/problems that I had above - drop me a line and I will help where I can.
I also got lovelace all setup as wel.
The last I am trying to figure out is that my start times don’t seem to cause any of the programs to start. So just working on that part. If anyone has run into this issue before - any feedback would be appreciated :).
I just set all this up and my start times also dont seem to run… I found in the code that it calls ‘sensor.time’… i dont have a ‘sensor.time’ in my home assistant… this could be part of the issue. I’ve added this in
there is also a call for ‘sensor.bom_perth_forecast_chance_of_rain_0’… i also dont have this sensor and cant seem to find how to get it, so i’ve just removed the references to it in the code.
Yes, platform: time_date is something that you would likely need in HA for other automations etc, so it wasn’t included in this package. I remember thinking that I should add a comment about that but must have forgotten to do it.
This is where it takes the local weather forecast into account. You could replace that sensor with a similar one from whatever weather service you use
I’ve altered the code slightly (i’ve 3 values) but i think i found 2 issues -
One, when i schedule for anything other than 00 minutes, it doesn’t schedule i.e. if i schedule for 05:30 - it doesnt work, but if i go for 05:00 it does. Manual runs are fine. I’ve not been able to work it out, potentially its just my setup.
Also,
I’ve noticed on a run where it uses adjustments, its using the same duration for each zone in the cycle (zone 1).
I think this is due to garden_irrigation.yaml - lines 458 to 468. Its hard coded to zone1. I’ve not double checked this but it looks like its incorrect.
Having said that, i feel like i have seen it complete durations as per frontend values for scheduled.
(for definite, i’ve seen a scheduled run with adjusted values ran zone1 durations for all zones)
thanks again for sharing an awesome project,
Cheers
Yes, strange as it may seem I think it must have been designed like that. Not because I would have thought it was a good design but I think as I was new to HA I wanted to keep it fairly simple and decided I would never care if my irrigation could only run only on the hour (remember I never even considered at that time that anyone else would be using it). It wi
You are absolutely right!
It’s deepest winter here so I won’t be testing it for a while but I am pretty sure those lines should be:
After updating to 0.103, an error appears in the log and watering does not turn on.
Error:
[homeassistant.components.script] Error executing script script.irrigation_run_a_cycle. Unknown error for call_service at pos 4:
...
...
TypeError: can only concatenate str (not "int") to str
To make it work again, you need to make changes to the garden_irrigation.yaml file: Lines 93 and 97