Garden Irrigation

In that case my guess is it is something simple like spacing because it validates the config ok for me. I have changed a few things like some names but nothing really else that I think would make a difference (he says knowing that that means nothing when writing code!). I’m sorry that is probably not very helpful.

I am though very interested in this especially if anyone gets any algorithms designed that decide when to irrigate. I spent a long time working on an irrigation system when I first discovered HA a few weeks ago but it was using a Gardena Zone Distributor which has a slightly idiosyncratic way of working. The Chief Gardener here though changed her mind and now just wants separate zones so this looks like a great starting point for my system! :slight_smile:

EDIT: I just remembered I did swap in ALL my code for the switches (I’m using a sonoff 4 channel) so your error might be in that area?

Hi Otto,
I like your esphomeyaml project. Very impressive, well done.
I do wonder if there is a market for an ESP32 based I\O board interfacing via MQTT. I based my HA system around a couple of PiFace IO cards but they have their limitations, most notably not being suitable for real world applications - fine for school or lab workbench but not production environments.
What sort of hardware do most people run your software on?

Yeah, the error suggests switch, but the section of code that causes the issue doesn’t reference switch at all! I don’t understand

I’m planning on using Otto’s software on a couple of NodeMCU’s that I have (ESP8266 chip) to create the hardware side of my code above. The outputs are wired to a relay board to control the solenoids. That’s all there is to it other than a power supply

I have since updated the code to include separate watering day selectors for each program which gives a lot more control. I can post it tomorrow, it’s bed time here!

That’d be great, Thanks!
I’m hoping some of my original bits will be reusable and useful here, if they are I will post them too.

Goodnight.

I don’t know too much about other people, but I use the project almost exclusively on NodeMCU (esp8266 and esp32) boards with mostly self-built relays, lights and actuators. I’m currently trying to move my entire system to use the ESP32 as they just seem a lot more stable and have awesome peripherals like RMT and LEDC.

anyone able to help with the error I am having with this? I cant get my code to pass config verification if I include the second automation “alias: Reticulation Run Program 1”. The code works fine until I include that… the error doesnt seem to relate to it which is why I dont know how to fix it

I copied your code into my dev system, uncommented the automation section and restarted HA. The config has loaded fine so I suggest that is good - as it looks. What code is at the referenced block in your configuration.yaml? Is there some name conflict maybe? Could you post the code around line 101. And did you try a full restart rather than just a ‘Check config’?

here is my config.yaml
image

and switches.yaml only has my broadlink setup:

#switch:
  - platform: broadlink
    host: 192.168.0.71
    mac: '34:ea:xx:xx:xx:xx'
    friendly_name: IR Transceiver
    type: rm_mini
    switches:
      onkyo_amp:
        friendly_name: "Amp Power"
        command_on:  'JgBMAAYABD8AASiSFBEUNRQRFBEUNRQRFDYUNRU1FBEUNhQ1FBEUNhQ1FBEUERQQFDYUERQQFBEUEBQRFDYUNRQRFDYUNRU1FDYUNhQADQUAAAAAAAAAAAAAAAA='
        command_off:  'JgBIAAABKJEUERQ2FBAUERQ2FBAUNhQ2FBAUERQ2FDUUERQ2FDYUEBQ2FDYUNRQRFBEUEBQ2FBEUEBQRFBAUNhQ2FDYUEBQ2FAANBQ=='
      onkyo_amp_cd:
        friendly_name: "Amp CD Input"
        command_on:  'JgBQAAABKJIUEBQ2FBEUEBQ2FBETNhQ2FDYUERM2FDYUERM2FDYUERM2FBEUERM2FBEUERMRFBEUEBQ2FDYUERM2FDYUNhQ2EwAE8gABKEkTAA0FAAAAAAAAAAA='
      onkyo_amp_v1:
        friendly_name: "Amp V1 Input"
        command_on:  'JgBIAAABKJEUERM2FBEUERM2FBEUNhM2FDYUERQ1FDYUERQ2EzYUERQ2EzYUNhQ2FBETERQRExEUERQRExEUERQ1FDYUNhQ2EwANBQ=='
      onkyo_amp_volume_up:
        friendly_name: "Amp Volume"
        command_on:  'JgBIAAABKIwaERM2FBEUERM2FBEUNhM2FDYUERM2FDYUERQ1FDYUERQQFDYUERQQFBEUERMRFBEUNhMRFDYUNhM2FDYUNhQ2EwANBQ=='
        command_off:  'JgBQAAkADMILAAzsAAEqkRQRFDYUEBQRFDYUEBQ2FDYUNRQRFDYUNhMRFDYUNhQQFDYUNhQQFBEUERQQFBEUEBQRFBEUNRQ2FDYUNhQ1FDYUAA0FAAAAAAAAAAA='
      onkyo_amp_mute:
        friendly_name: "Amp Mute"
        command_on:  'JgBIAAABKJIUEBQ2FBEUEBQ2FBETNhQ2FDYUEBQ2FDYUERM2FDYUERQ1FBEUNhQQFBEUERMRFBEUEBQ2FBEUNRQ2FDYUNhQ1FAANBQ=='
        command_off:  'JgBIAAABKJIUEBQ2FBEUEBQ2FBETNhQ2FDYUEBQ2FDYUERM2FDYUERQ1FBEUNhQQFBEUERMRFBEUEBQ2FBEUNRQ2FDYUNhQ1FAANBQ=='

no, i havent tried a full reboot

In my experience you sometimes get fuller, more useful error messages when you do a restart rather than a config check.

I just un-#'d the culprit automation and restarted HA. Got the following in the error log which isn’t much better than I had from the config validator.

2018-05-02 10:57:03 ERROR (MainThread) [homeassistant.components.hassio] starting version 3.2.4
Testing configuration at /config
Failed config
switch:
- Invalid config for [switch]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 101). Please check the docs at Switch - Home Assistant

then the log goes on to print my entire HA config…

OK, I feel like an idiot. I just checked through my code and realised that because I was #'ing out the first automation due to it not being complete yet, I was accidently #'ing out the line automation: which needed to be there for the second automation below! sorted that out and now weverything is sweet. Now to finish coding that first automation and get the hardware completed.

Glad you got it sorted. Happens to us all from time to time…

i wished this whole topic could somehow be origanized and put into modules or something so i can be easier adopted by others.
there’s so much information in this thread, but it’s so cluttered and for a noob hard to understand what works how and how parts interact.
any ideas how this could be done?
i copied lots of parts into my HA config and some parts seem to work, but some parts are missing, and i pull my hair out for 3 weeks now w/o a proper outcome :frowning:

1 Like

I agree.

I plan to put my stuff up at some point in the not too distant future, not because I think it is better than anything else but just because I would like to try to help someone in return for all the help I’ve had in the past here.

I’ll start a new thread when I do.

My code is setup to be used as a package. Check the docs for more info on how to use packages

1 Like

great. i will check that. haven’t worked with packages yet.
btw: i’m using a nodemcu (tasmota firmware) together with a 4 relay board (all from aliexpress). i reuse the 24c ac/ac converter connected to a bridge rectifier and a dc/dc step down converter to power the nodemcu and the relais. works perfectly fine and i the most reliable and cheapest setup i could find.

would you mind sharing your github? i search for your userid but couldn’t find anything.

I don’t have anything on Git but my reticulation code is about in this thread. I’ll post an update in a few days which is closer to a final version