I’m currently designing a driveway monitor that will be able to interface via ESPHome in one of several different ways - that part hasn’t been finalized yet. I can do it digitally via 4 GPIO pins or I can send the result via RS232. The output of the driveway monitor will be one of 4 states, VehicleEntered, VehicleExited, VehicleDetectedButDirectionUnknown, SensorAlive. I’m hoping the 3rd state doesn’t occur very often. The 4th state will occur every minute or so, to show that the sensor is still operational. I was thinking of of using MQTT to populate a database of some sort.
The question I have is how can I view the data within Home Assistant? I’d like to be able to look at something, preferably a graph, and see the history of when (date & time) a vehicle has enterer or exited. Does anyone have any suggestions?
If you’re curious about the sensor, I’m using a sensitive (MMC5983MA) magnetometer that’s mounted on a sturdy post next to the driveway. The sensor is rotated 45 degrees, so the vehicles end up passing through both the X and Y axis, that’s how I come up with the direction of travel depending on which axis is triggered first. It uses LoRa to transmit the trigger back to a base station which will probably connect to HA via a microcontroller programmed with ESPHome.
Any help is appreciated.