Room Occupancy with Door Mounted AMG88 Sensors

After a lot of tinkering with various hardware and software I feel like my little room occupancy system is at the point where it’s worth sharing. I’ve been working on a door mounted occupancy counter using AMG88 thermopile sensors, Raspberry Pis, and a custom Swift program.

Each Pi is assigned to two rooms and tracks people as they walk through the door. It publishes the change in count to HA’s MQTT broker and also monitors the topic for any other sensors sharing a room (a hallway, for instance). Optionally the sensor can publish a heat map.

The hardware is pretty simple, it’s just the sensor connected via I2C to the Pi.

So far I’ve had good luck with the counts being accurate, in the last week or so I think I’ve ended up with a miscount twice, which compared to where it started is really something.

There are more specific installation instructions over on GitHub along with a blueprint for an automation to control devices based on occupancy and time of day and a slightly longer longer explanation on my blog.

1 Like