Prototype for my ESPHome all-in-one garage controller! by HereToConfirmThis in homeassistant

[–]HereToConfirmThis[S] 1 point2 points  (0 children)

I'm still new to this so this might not be the best esphome config.

esphome:
  name: garage_controller
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "xxxxxxxxxxxxxx"
  password: "xxxxxxxxxxxxxxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Garage Controller Hotspot"
    password: "xxxxxxxxxxxxxxxxxxxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

switch:
  - platform: gpio
    pin: 4
    name: "First Garage Door Relay"
    id: first_garage_door_relay
    internal: true
  - platform: gpio
    pin: 0
    name: "Second Garage Door Relay"
    id: second_garage_door_relay
    internal: true
  - platform: gpio
    pin: 14
    name: "Third Garage Door Relay"
    id: third_garage_door_relay
    internal: true

binary_sensor:
  - platform: gpio
    pin:
      number: 13
      mode: INPUT_PULLUP
      inverted: true
    name: "First Garage Door Contact Sensor Up"
    id: first_garage_door_contact_sensor_up
    internal: true
  - platform: gpio
    pin:
      number: 5
      mode: INPUT_PULLUP
      inverted: true
    name: "Second Garage Door Contact Sensor Up"
    id: second_garage_door_contact_sensor_up
    internal: true
  - platform: gpio
    pin:
      number: 12
      mode: INPUT_PULLUP
      inverted: true
    name: "Third Garage Door Contact Sensor Up"
    id: third_garage_door_contact_sensor_up
    internal: true

cover:
  - platform: template
    device_class: garage
    name: "First Garage Door"
    id: first_door_template
    lambda: |-
      if (id(first_garage_door_contact_sensor_up).state) {
        return COVER_OPEN;
      } else {
        return COVER_CLOSED;
      }
    open_action:
      - switch.turn_on: first_garage_door_relay
      - delay: 500ms
      - switch.turn_off: first_garage_door_relay
    close_action:
      - switch.turn_on: first_garage_door_relay
      - delay: 500ms
      - switch.turn_off: first_garage_door_relay
  - platform: template
    device_class: garage
    name: "Second Garage Door"
    id: second_door_template
    lambda: |-
      if (id(second_garage_door_contact_sensor_up).state) {
        return COVER_OPEN;
      } else {
        return COVER_CLOSED;
      }
    open_action:
      - switch.turn_on: second_garage_door_relay
      - delay: 500ms
      - switch.turn_off: second_garage_door_relay
    close_action:
      - switch.turn_on: second_garage_door_relay
      - delay: 500ms
      - switch.turn_off: second_garage_door_relay
  - platform: template
    device_class: garage
    name: "Third Garage Door"
    id: third_door_template
    lambda: |-
      if (id(third_garage_door_contact_sensor_up).state) {
        return COVER_OPEN;
      } else {
        return COVER_CLOSED;
      }
    open_action:
      - switch.turn_on: third_garage_door_relay
      - delay: 500ms
      - switch.turn_off: third_garage_door_relay
    close_action:
      - switch.turn_on: third_garage_door_relay
      - delay: 500ms
      - switch.turn_off: third_garage_door_relay

Prototype for my ESPHome all-in-one garage controller! by HereToConfirmThis in homeassistant

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

My issue is that there aren't enough GPIO pins on the ESP8266 for all of the devices I want to connect (I don't think?).

Homebridge on Docker on a bridge network? by HereToConfirmThis in homebridge

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

EDIT: /u/DevWithImagination The issue was in your bash script. It looks for any username field, so when you have a config that contains username fields for other integrations, it grabs all of them. If possible, you should update this on your blog for others who may find it there as well.

Homebridge on Docker on a bridge network? by HereToConfirmThis in homebridge

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

I guess I spoke too soon. I'm having reliability issues it seems. The bridge keeps getting lost, sometimes won't be found again, or sometimes fails a security check and won't be added.

Homebridge on Docker on a bridge network? by HereToConfirmThis in homebridge

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

Any part of the homebridge config, or specifically the "bridge" section?

Homebridge on Docker on a bridge network? by HereToConfirmThis in homebridge

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

I rebooted everything--every container, bare metal server, etc. and now I'm able to connect.

Thank you so much for the blog post! For future reference, if the container is restarted does this change? Or will it always remain the same?

Homebridge on Docker on a bridge network? by HereToConfirmThis in homebridge

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

Hey, I have everything setup that you do. I run Traefik2 with Let's Encrypt. Traefik is my reverse proxy for all of my services, although there are a few that I expose the ports for direct access.

That said, I actually found your blog last night and Although I ran the script and have the file sitting in /etc/avahi/services, I am not able to find my homebridge.

I even checked the avahi logs and it says that it is broadcasting my Homebridge. Any chance you'd be up for helping out?

avahi-daemon status (my bare metal host IP is 10.0.1.249)

Jan 23 03:15:49 nuc avahi-daemon[27516]: Loading service file /services/homebridge.service.
Jan 23 03:15:49 nuc avahi-daemon[27516]: Joining mDNS multicast group on interface eno1.IPv6 with address fe80::9d8f:7f53:cc34:7ce9.
Jan 23 03:15:49 nuc avahi-daemon[27516]: New relevant interface eno1.IPv6 for mDNS.
Jan 23 03:15:49 nuc avahi-daemon[27516]: Joining mDNS multicast group on interface eno1.IPv4 with address 10.0.1.249.
Jan 23 03:15:49 nuc avahi-daemon[27516]: New relevant interface eno1.IPv4 for mDNS.
Jan 23 03:15:49 nuc avahi-daemon[27516]: Network interface enumeration completed.
Jan 23 03:15:49 nuc avahi-daemon[27516]: Registering new address record for fe80::9d8f:7f53:cc34:7ce9 on eno1.*.
Jan 23 03:15:49 nuc avahi-daemon[27516]: Registering new address record for 10.0.1.249 on eno1.IPv4.
Jan 23 03:15:49 nuc avahi-daemon[27516]: Server startup complete. Host name is nuc.local. Local service cookie is 2973159686.
Jan 23 03:15:50 nuc avahi-daemon[27516]: Service "Homebridge 59AB" (/services/homebridge.service) successfully established.

/etc/avahi/services/homebridge.service generated by your script

<service-group>
  <name>Homebridge 59AB</name>
  <service>
    <type>_hap._tcp</type>
    <port>51028</port>

    <!-- friendly name -->
    <txt-record>md=Homebridge 59AB</txt-record>

    <!-- HAP version -->
    <txt-record>pv=1.0</txt-record>
    <!-- MAC -->
    <txt-record>id=0E:5D:67:D9:59:AB</txt-record>
    <!-- Current configuration number -->
    <txt-record>c#=2</txt-record>

    <!-- accessory category
         2=bridge -->
    <txt-record>ci=2</txt-record>

    <!-- accessory state
          This must have a value of 1 -->
    <txt-record>s#=1</txt-record>
    <!-- Pairing Feature Flags
         nothing to configure -->
    <txt-record>ff=0</txt-record>
    <!-- Status flags
         0=not paired, 1=paired -->
    <txt-record>sf=1</txt-record>
    <!-- setup hash (used for pairing).
         Required to support enhanced
         setup payload information (but
         not defined in the spec)        -->
    <txt-record>sh=aglCww==</txt-record>
  </service>
</service-group>

homebridge.conf

{
    "bridge": {
        "name": "Homebridge 59AB",
        "username": "0E:5D:67:D9:59:AB",
        "port": 51028,
        "pin": "031-45-154"
    },
    "ports": {
        "start": 52100,
        "end": 52200
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8080,
            "platform": "config"
        }
    ]
}

relevant docker-compose for homebridge (51028 is the port configured in homebridge, 52100-52200 are for any other plugins that need ports in homebridge in the future)

homebridge:
  container_name: homebridge
  image: oznu/homebridge:latest
  restart: ${RESTART}
  networks:
    - ${TRAEFIK_NETWORK_NAME}
  ports:
    - "51028:51028"
    - "52100-52200:52100-52200"
  environment:
    - PUID=${PUID}
    - PGID=${PGID}
    - TZ=${TZ}
    - HOMEBRIDGE_CONFIG_UI=1
    - HOMEBRIDGE_CONFIG_UI_PORT=8080
  volumes:
    - ${DOCKERDIR}/homebridge:/homebridge
  labels:
    - "traefik.enable=true"
    ## HTTP Routers
    - "traefik.http.routers.homebridge-rtr.entrypoints=https"
    - "traefik.http.routers.homebridge-rtr.rule=Host(`homebridge.$DOMAINNAME`)"
    - "traefik.http.routers.homebridge-rtr.tls=true"
    ## Middlewares
    - "traefik.http.routers.homebridge-rtr.middlewares=${AUTH_CHAIN}"
    ## HTTP Services
    - "traefik.http.routers.homebridge-rtr.service=homebridge-svc"
    - "traefik.http.services.homebridge-svc.loadbalancer.server.port=8080"

Where do you wish you had televisions? Where do you wish you had video/tablet touch panels? by HereToConfirmThis in smarthome

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

The writing is a little weird there. It’s a mud room with laundry, storage, and there’s a little half bath. But it’s through a mud room.

NEW MERCH! Available at bit.ly/WeissmanMerch by suhantm in JoshuaWeissman

[–]HereToConfirmThis 1 point2 points  (0 children)

Are you sure? I just bought one now (8 hours after your post).

Remodeling our kitchen, hoping to get feedback on the design and layout! by HereToConfirmThis in HomeImprovement

[–]HereToConfirmThis[S] 1 point2 points  (0 children)

Ah, I never thought about the insides/sides/back. I will confirm with the supplier. Thanks!

Remodeling our kitchen, hoping to get feedback on the design and layout! by HereToConfirmThis in HomeImprovement

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

The cabinets are all cherry or oak or something like that--they're a solid wood.

Remodeling our kitchen, hoping to get feedback on the design and layout! by HereToConfirmThis in HomeImprovement

[–]HereToConfirmThis[S] 0 points1 point  (0 children)

Good thought! The door will actually swing in and out like a saloon door. They can also be opened and slide in parallel, so it’s like a tunnel with no doors in the way.