Do you have any tutorials, docs, code or anywhere you can send me for helpful tips on doing this with an IR remote/receiver? I want to automate a garage door and a gate because I accidentally leave them open all the time and they aren’t easy to see from the house so it would be nice to have a notification or state manager on my phone.
I do something similar, I have an ESP8266 microcontroller hooked up to an IR sender/receiver that I can use to send and receive codes from Home Assistant to control some stuff. The module I use takes care of encoding and decoding the IR and simply dumps it to serial, which the micro reads and forwards to Home Assistant via MQTT (and vice versa). It's this one
but it's not hard to do it with a bare IR emitter and receiver. Unfortunately I haven't had have much time lately to document many of my projects for other people, but you can learn a lot from Youtube and Google these days.
Here's a blog post where the original LIRC component in Home Assistant was developed along with some info about how to use it [1]. In here an A/C unit, a TV, and a stereo are all controlled with one little IR LED.
With a little z-wave door sensor (just a magnetic reed switch), you could have Home Assistant run an automation that says "If gate is open at 9:30am, close it." so then you don't even have to log in to click it.
I use an ultrasonic sensor to detect when the door is open or closed. It's very reliable.
I even wired up Home Assistant to contact me (over sms by sending an email to my number@carrier) if the door has been open for >5 minutes, because I was precisely in your position of forgetting to close it.