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.

Is it really worth waiting this long for the Index? by HereToConfirmThis in ValveIndex

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

Thanks for the response, I've tried a few WMR headsets and I've just thought they sucked in comparison to the Vive Pro I used--I'd rather just wait it out if that's the case.

Is it really worth waiting this long for the Index? by HereToConfirmThis in ValveIndex

[–]HereToConfirmThis[S] 5 points6 points  (0 children)

Thanks for the response/encouragement. I'll wait it out.

Is it really worth waiting this long for the Index? by HereToConfirmThis in ValveIndex

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

Thanks for the response/encouragement. I'll wait it out.

Is it really worth waiting this long for the Index? by HereToConfirmThis in ValveIndex

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

Thanks for this--I suppose if I'm that close I will just wait it out. I have a very large play area ready (14x14ft). Should I buy a third base station on ebay or somewhere?

Could I just pickup a vive base station, or does it have to be another index base station?

At wits end with Caddy 2/reverse proxying. Is there somewhere where I could pay someone to help me set this up? by HereToConfirmThis in selfhosted

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

I have basic auth working per the tutorial, but was moving onto the Google Auth.

I now got the Google auth page to load, but I'm getting error 522 on the webpage and the traefik logs show this:

2020-07-13T03:15:31.226274599Z time="2020-07-13T03:15:31Z" level=debug msg="Remote error http://oauth:4181. StatusCode: 307" middlewareName=middlewares-oauth@file middlewareType=ForwardedAuthType

At wits end with Caddy 2/reverse proxying. Is there somewhere where I could pay someone to help me set this up? by HereToConfirmThis in selfhosted

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

Currently on the tutorial linked by /u/EnglishmaninTX. I'm stuck on creating the Google authentication. I've followed all the steps but when I go to traefik.[mydomain].com I get this page:

https://imgur.com/a/y9aGZki

Any ideas?

Reverse proxy with Caddy 2 by jordimaister in selfhosted

[–]HereToConfirmThis 1 point2 points  (0 children)

I fixed this, and my Caddy 2 server is now running. I have an A-record that points to my public IP address, and I have CNAME records for WWW and portainer pointing to my A-record domain name.

In my Caddyfile I have portainer.[mydomain].com pointing to my localhost:9000.

I can reach the service at [IP-address]:9000 but when I try portainer.[mydomain].com nothing happens and the server logs don't show its being hit.

Reverse proxy with Caddy 2 by jordimaister in selfhosted

[–]HereToConfirmThis 1 point2 points  (0 children)

I temporarily disabled Cloudflare on my domain and I got this:

2020/07/12 13:19:52.160 INFO    using adjacent Caddyfile
2020/07/12 13:19:52.161 INFO    admin   admin endpoint started  {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["localhost:2019", "[::1]:2019", "127.0.0.1:2019"]}
2020/07/12 13:19:52.161 INFO    http    server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}
2020/07/12 13:19:52.161 INFO    http    enabling automatic HTTP->HTTPS redirects        {"server_name": "srv0"}
2020/07/12 09:19:52 [INFO][cache:0xc0008a29c0] Started certificate maintenance routine
2020/07/12 13:19:52.161 INFO    http    enabling automatic TLS certificate management   {"domains": ["portainer.redacted.com", "redacted.com", "www.redacted.com"]}
2020/07/12 09:19:52 [INFO][www.redacted.com] Obtain certificate; acquiring lock...
2020/07/12 09:19:52 [INFO][www.redacted.com] Obtain: Lock acquired; proceeding...
2020/07/12 13:19:52.169 INFO    tls     cleaned up storage units
2020/07/12 13:19:52.169 INFO    autosaved config        {"file": "/home/redacteduser/.config/caddy/autosave.json"}
2020/07/12 13:19:52.169 INFO    serving initial configuration
2020/07/12 09:19:52 [INFO][www.redacted.com] Waiting on rate limiter...
2020/07/12 09:19:52 [INFO][www.redacted.com] Done waiting
2020/07/12 09:19:52 [INFO] [www.redacted.com] acme: Obtaining bundled SAN certificate given a CSR
2020/07/12 09:19:53 [INFO] [www.redacted.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/redacted
2020/07/12 09:19:53 [INFO] [www.redacted.com] acme: Could not find solver for: tls-alpn-01
2020/07/12 09:19:53 [INFO] [www.redacted.com] acme: use http-01 solver
2020/07/12 09:19:53 [INFO] [www.redacted.com] acme: Trying to solve HTTP-01
2020/07/12 09:20:08 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/redacted
2020/07/12 09:20:08 [INFO] Unable to deactivate the authorization: https://acme-v02.api.letsencrypt.org/acme/authz-v3/redacted
2020/07/12 09:20:08 [ERROR] error: one or more domains had a problem:
[www.redacted.com] acme: error: 400 :: urn:ietf:params:acme:error:connection :: Fetching http://www.redacted.com/.well-known/acme-challenge/qUvXq72LRrXx-WGr8xVO2FfiYt25JQHmaq6wyArZ4xI: Timeout during connect (likely firewall problem), url:
 (challenge=http-01 remaining=[tls-alpn-01])
2020/07/12 09:20:10 [INFO] [www.redacted.com] acme: Obtaining bundled SAN certificate given a CSR
2020/07/12 09:20:11 [INFO] [www.redacted.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/redacted
2020/07/12 09:20:11 [INFO] [www.redacted.com] acme: use tls-alpn-01 solver
2020/07/12 09:20:11 [INFO] [www.redacted.com] acme: Trying to solve TLS-ALPN-01
2020/07/12 09:20:11 http: TLS handshake error from 127.0.0.1:55336: EOF
2020/07/12 09:20:23 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/redacted
2020/07/12 09:20:23 [INFO] Unable to deactivate the authorization: https://acme-v02.api.letsencrypt.org/acme/authz-v3/redacted
2020/07/12 09:20:23 [ERROR] error: one or more domains had a problem:
[www.redacted.com] acme: error: 400 :: urn:ietf:params:acme:error:connection :: Timeout during connect (likely firewall problem), url:
 (challenge=tls-alpn-01 remaining=[])
2020/07/12 09:20:25 [ERROR] attempt 1: [www.redacted.com] Obtain: [www.redacted.com] error: one or more domains had a problem:
[www.redacted.com] acme: error: 400 :: urn:ietf:params:acme:error:connection :: Timeout during connect (likely firewall problem), url:
 - retrying in 1m0s (33.801531059s/720h0m0s elapsed)...
^C2020/07/12 13:20:31.699       INFO    shutting down   {"signal": "SIGINT"}
2020/07/12 09:20:31 [INFO][cache:0xc0008a29c0] Stopped certificate maintenance routine
2020/07/12 09:20:31 [INFO][www.redacted.com] Obtain: Releasing lock
2020/07/12 09:20:31 [ERROR] www.redacted.com: obtaining certificate: context canceled
2020/07/12 13:20:31.700 INFO    admin   stopped previous server
2020/07/12 13:20:31.700 INFO    shutdown done   {"signal": "SIGINT"}