I put a magnetic reed switch on the garage door frame and a rare earth magnet on the garage door. The state of the switch is the state of the door. I have an Insteon device (not recommended) to report the state of the magnetic switch. Perhaps an ESP device powered by batteries, waking up on a state change, reporting state change and battery voltage and then going back to sleep?
If you want something battery powered, then go zigbee. I've had one of the old Aqara door sensors on my front door since early 2021 & it's still going strong on its original battery.
It's Zigbee 1.2, so it won't switch to a different router automatically if it loses comms, but I'm happy with the tradeoff.
I have also seen people using camara feed to recognize whether the door open or close. Can't find it now.
for sure there are other means. IR beam pointing at a mirror on the door, and then to light sensor, to form a break-light sensor? using supersonic distance sensor to check whether door being open, like OpenGarage, is another interesting idea.
Why would you want to have battery power? You have automatic doors, so you do have power there. Normally it's 24V on garage automations, use that for powering your esp. That's what i have, and then i use same esp for open/ close garage with my phone, too
Do you have any specific model in mind? Ok, one of options would be shelly blu door&window, i guess, it does have tilt information. However, my experience with it are somewhat mixed (can have a delay).
Any other model perhaps?
I have tried a Zooz LR Z-Wave tilt sensor and can't recommend it. It uses a CR2023 and was spotty in winter.
The three Ecolink tilt sensors, non LR, have been dependable for years now. TILTZWAVE2.5-ECO . I don't see them on Amazon though, so I don't know what the story is.
I’m using a Sonoff SV module to control my garage door and to read its status using a reed sensor. That way, with a single module I can both operate the door and know when it’s open or closed.
The module can be powered with a voltage between 5 and 24V, so it’s ideal for garage doors.
I don't like batteries, either, but sometimes running wires is problematic.
I like the idea, but it would have to be battery powered with wireless communication because wires to it would eventually break. (It would also be an earthquake sensor )
I have been keeping an eye out for 24VAC to 5VDC or 3.3VDC power supply. It is easy to find a cheap 80-220VAC to 5 or 3.3VDC. Note for USA: if using on 240VAC, check spec as 220VAC devices will fail ... learned the hard way. Also note, these cheap power supplies would never get regulatory approval.
Better Alternative to sonoff SV is Shelly UNI (8 - 24 VAC, 9 - 28 VDC and 5 VDC, two "relays", inputs, adc...). A guy made a complete controller with it, it has opening - closing state reading via ADC and motor pin, etc... HERE