I just wanted to share a solution I employed that has been working pretty well for me. I wanted to build some automations around the presence of my vehicles in my driveway, so I spent a little while thinking about cheap and reliable ways to expose a binary sensor to Home Assistant I could use to trigger those automations. Some ideas came to mind:
- Device in the vehicle that connects via wifi/bluetooth
- Weight sensor under physical parking spot
- Optical sensor monitoring physical parking spot
- Camera pointing at parking spots that can read license plates
All of these seemed doable with various amounts of cost and effort, and I was leaning towards the first one because it seemed the easiest and cheapest. My biggest concern was finding a way to adequately power such a device. I figured some sort of ESP8266 battery powered solution would end up being the best. I still think this could work, but it isn’t want I settled on.
While thinking about that particular problem it dawned on me that I already had deployed several battery powered, long running and constantly connected devices throughout my home and yard to monitor temperature and humidity. A while back I was inspired by this guide: AcuRite Sensors Through to Grafana Dashboard to deploy such a system in my home. I didn’t implement it quite the same way, but I basically have rtl_433 piping AcuRite sensor data into an MQTT broker. At first I was consuming this directly from Home Assistant (yaml configured mqtt sensors), but eventually found it more flexible to run it through Nodered and use Nodered to expose the sensors to Home Assistant while also archiving to InfluxDB.
Having such a system already in place, it occurred to me that a I could do vehicle presence detection by just putting an AcuRite sensor in each vehicle and then using Nodered to expose a binary sensor to Home Assistant that would show as home while signals are being received and move to away as soon as a signal hasn’t been received for a defined threshold. These AcuRite devices transmit every 16 seconds, so that is lowest threshold you could use if you had a very strong reliable signal. I settled on 5 minutes to avoid false positives.
It works great. I have the side benefit of also having temperature and humidity readings from inside my vehicles. From my experience, these sensors run on a couple AA batteries for 2-3 years before needing replacements.