Quantcast
Channel: ESPHome - Home Assistant Community
Viewing all articles
Browse latest Browse all 1486

First Timer - Chicken Coop Door

$
0
0

Hello.

Sorry if this is a very simple question. I’m just getting started with Home Assistant and ESPHome. I successfully added a temperature sensor and camera to Home Assistant, now I’m trying to automate opening and closing a door for a chicken coop.

I’m using a motor controller board like the TI DRV8833. For one motor, two GPIO inputs are needed, IN1 and IN2. If IN1 high and IN2 low then motor spins forwards. If IN1 low and IN2 high then motor spins backwards.

So far, I’ve tried the following. The “show logs” in ESPHome show that the device has booted succesfully. However I don’t see the two switches in Home Assistant. I saw that one new device was found, but there are no entities attached to the device. Have I made a mistake in this code, for having two switches show up in my Home Assistant dashboard?

esphome:
  name: coop_door
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "ABC"
  password: "123"

switch:
  - platform: gpio
    pin: GPIO0
    id: door_up
    interlock: &interlock_group [door_up, door_down]
  - platform: gpio
    pin: GPIO2
    id: door_down
    interlock: *interlock_group

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

Notes

  • IN1 and IN2 should never be high at the same time
  • Stage 1 is to just add a switch to have add two switches for motor-forwards and motor-backwards
  • Stage 2 (once I get stage 1 working) - I want to add limit switches and timing. I have a switch that gets closed when the door gets all the way up and another when it gets all the way down. I would like to add logic where motor forwards runs the motor only until the upper switch is hit. Likewise motor-backwards should run the motor only until the lower switch is hit. A timeout will also be necessary so that the motor doesn’t run forever in case of switch error

Thank you!

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 1486

Trending Articles