My Garden Irrigation

Great news. Thanks for letting me know and keep me informed of anything else::wink:

That’s fine, you have already put a lot of work into this.

My thoughts are that the second sonoff will be installed to control an irrigation system at a remote location and i would love it to be able to run independantly of my HA
This could be done with either by setting the schedules on ewelink or by flashing tasmota and using timers.
I will have a look to see how much i can control the eWelink with ifttt as i’d like a simple automation to shut it down during rainy days. Or if there’s an alternative in tasmota (but i dont want to mess with cloudmqtt bridges and similar stuff)

If it all fails ill fall back to duplicating your code and control it remotely.
If i end up changing all the entities with some modifier, is there some way i could make my work accessible to you?

Yes, I’d love to see it if you do that. I guess GitHub is the best way but I don’t yet know how it works properly… Let’s see what happens, if you go down that route.

This won’t be an issue for long!

Maybe not for you, but for me in the UK, who knows??
:slight_smile:

I am a fan of daylight saving time.
I hope that it will remain. :wink:

A reminder that due to a breaking change in HA v0.91.0 to change from

sensor.dark_sky_forecast_daytime_high_temperature_0
to
sensor.dark_sky_forecast_daytime_high_temperature_0d

in

script.garden_temperature_data

in

garden_weather_data_collection.yaml

1 Like

Thanks for the dark_sky reminder.

I would like to check if my ESP with Tasmota is available before starting any irrigation program, manual or scheduled.

What do you suggest me to test and where in the code?

Thanks

The script to irrigate a zone already checks if the ‘valve’ is available. If it is not then it does not continue.

I’ve tried, powering off my ESP with Tasmota and the cycle start.

My switch.zone1_valve, for example, is defined like this

  - platform: mqtt
    name: "zone1 valve"
    command_topic: "cmnd/Esp/POWER1"
    state_topic: "stat/Esp/POWER1"
    qos: 0
    payload_on: "ON"
    payload_off: "OFF"
    state_on: "ON"
    state_off: "OFF"
    retain: false

Someone else might have to help here with the MQTT as I use Discovery but I am fairly certain there need to be some kind of indication as to whether it is online, offline or unavailable.

What state does the ESP show it the Dev-States page? when it is off line?

Where is checked if online in the code?

Have you tried powering off your Sonoff or Esp?

If my Esp is powered off, it cannot reply to any MQTT request, I was thinking of using a device_tracker managed by NMAP “pinging” the device.

Found “my” issue

I forgot to set the availability_topic

So now the switches are like this

  - platform: mqtt
    name: "zone1 valve"
    command_topic: "cmnd/Esp/POWER1"
    state_topic: "stat/Esp/POWER1"
    availability_topic: "tele/Esp/LWT"
    qos: 0
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    state_on: "ON"
    state_off: "OFF"
    retain: false

and where they are not available I get “unavailable” as switch state and the cycle does not start

Thanks

Little question: in my garden i’ve 4 valves. Code by @klogg using 5 valves.
So at every update i do a full search in all .yaml files to remove manually the zone 5 code.
Is there a better way to operate?
For example an option to set switch.zoneX_valve to hidden and a more check by the code that, if a switch zone valve with attribute = hidden is found, then hide it also in lovelace UI and skip from a script automation…?

Hi klogg, I’m new to home assistant and I like your project.
Since I haven’t a SmartWeather station nor there is one where I live I’ll drop this service. What I’ll loose?

Only the ability to have your watering times automatically adjusted depending on how much rain has fallen in the last x days. To be honest I have never used any of the weather adjustments that I included in this project but they are there to be used and I believe they work quite well if you can get the right data.

@itajackass
Hey, sorry I completely forgot to reply to you. I was away when I read your question and it escaped my mind when I returned.

I believe it shouldn’t be too hard to remove zone 5. I tried to make the code as simple as possible to add or remove zones.

Thanks, I’ll loose all weather adjustment? Can I still have a weather adjustment based on forecast from DarkSky (ie system will not watering if a thunderstorm is coming)?

No, just the rainfall, it also looks at temperature over the last few days.

Not as I have written it but there is nothing to stop you adding a script to make any adjustments you want. You say you are new to HA but if you are comfortable with writing some code/yaml (or want to learn) this could be a good exercise for you because you can experiment with your own weather adjustment scripts in place of mine without breaking anything else.

Good. So I’ll have to learn yaml (writing software is my work :grinning: )