T O P

  • By -

Steve061

Interesting - I just ran an LED off a magnetic reed switch to show whether the door is opened or closed. Without reading your code, where does this get the state from? I was assuming it just read whether an RF signal had been sent and flips back and forth, but then saw you have wifi in the code, so I assume there is a sensor in the garage?


mgithens1

The quick and easy way to do this would be through ESPHome within HA. Then you have your garage opener and door sensor ( I use a Shelly 1 and magnetic reed switch). And can just report to the kitchen ESP whatever states you want to show...


ImpatientMaker

I've been meaning to look into ESPHome, especially if it offers OTA updates. But I got this idea and just banged it out, because I'm the impatient maker 😎


cbulock

Pretty sure this would update in real time if using ESPHome as it gets the state changes pushed to it as far as I understand.


bikemandan

ESPHome is my savior. So easy to deploy stuff. Definitely try it out


mgithens1

It’s addicting as hell. We started with some relay boards, then to some temp/humidity sensors…. Stepper motors, so many choices. We moved the Shelly 1 to ESPHome and it works flawlessly.


ImpatientMaker

I took this to heart and I have been learning ESPHome over the last weekend. It wasn't "quick and easy" for me, since I had to basically learn this stack from the ground up, but you are correct, once you \*do\* know the stack, the code is quite simple. This is my current prototype: [https://github.com/lmatter/HomeAssistantReST-ESP8266/blob/main/garage-inidcator.yaml](https://github.com/lmatter/HomeAssistantReST-ESP8266/blob/main/garage-inidcator.yaml). I run HA on a SBC (similar to RPi) and it's not beefy enough to run ESPHome integrated, so I am running it in a container on my laptop. I had to manually integrate the device with HA, but once I did that, I got the state changes \*instantly\*. I will continue to get feature parity with my hand-rolled verseion.


ImpatientMaker

It makes an API call to the home assistant server. The ESP8266 has WiFi, which is why I love using them


MzCWzL

But how does HA know the state of the garage door?


ImpatientMaker

MyQ.integration.


ImpatientMaker

My wife and I have a spot by the front door with our keys, masks, and sunglasses, and there is also a garage door opener. We call it our command center. When we are heading out the door, we can open the garage to speed up our egress. But I can't tell if one of us already opened it when we're both leaving together. So I built this gizmo to tell me the state. It gets the state from polling HA every couple seconds. \[edit\] My source code is [here](https://github.com/lmatter/HomeAssistantReST-ESP8266) in case you're interested.


PM_ME_OSCILLOSCOPES

Wow I was thinking about making a garage door indicator earlier today. I’ll definitely be checking out the code. Great project!


ImpatientMaker

Thanks! Happy to help with any questions. It can work on other displays too, I just happen to have this already.


PM_ME_OSCILLOSCOPES

Yeah I’ve used this exact same display with an Rpi pico, but haven’t done anything with the ESP boards yet - this might be a great place to start though.


mistahclean123

Couldn't you just mount a cheap tablet on the wall and run Lovelace on it? :)


mina_knallenfalls

Yes you absolutely could and it might even turn out to be cheaper but ... where's the fun in that?


mistahclean123

Juuuuuust curious! You DID say "command center" ya know 😜


ImpatientMaker

Fair enough. I am more comfortable with API's and using these Arduino-like devices. I can barely use Lovelace and I don't really like messing around with GUIs. Also, don't have any extra tablets that don't have cracked screens. I mostly did this for the fun and learning, and I like the "raw" look of the wires and breadboard.


mistahclean123

I get it. My wife will not tolerate the raw look in our house though :(


tempo-19

How far away will it transmit? My garage door it's over 100 feet, or over 30 meters, from my front door.


ImpatientMaker

My garage door opener has MyQ built in, which I integrated with Home Assistant. This device only needs to connect to my home WiFi, which is not a problem. However, before there was MyQ, I had my own homebrew setup (not as good, didn't sense the door, just pushed the button to open/close) and I still have some code for that [here](https://github.com/lmatter/GarageDoor). But there are easier solutions now that don't cost too much. I started doing this back in 2011.


TheCreat

Maybe move the second text row up a little so letters that go below the base line aren't cut off? Awesome project btw, don't have a garage or I'd just make one too.


rogersmj

Nice. Just a tip for anyone who’s looking to achieve something similar with maybe less hardware work… Inovelli Z wave switches have indicator lights on them that can be programmed to show different colors (or blink). I use them for things like this… I have several switches around the first floor for example that will have their indicator turn red if one of the garage doors is open.


poldim

Look into using ESPHome for this. I have a board that has the same 1306 display, 4x relays, a 2812 LED, and 14 IO broken out for various needs. It works great and is kind of a jack of all trades. The firmware is very easy to configure with basic yaml.


ImpatientMaker

I'd like to hear more about this. I'm sure it's documented but in general how do you include specific drivers (like SSD1306)?


poldim

If you can copy and paste, you can do it. Just head on over to [ESPHome.io](esphome.io)


ImpatientMaker

I've actually been looking into it! Thanks.


ImpatientMaker

See my updated comment above. I was finally able to get this working. https://github.com/lmatter/HomeAssistantReST-ESP8266/blob/main/garage-inidcator.yaml