Sunday, February 20, 2022

AI/Machine Vision Water Meter Reader on a $12 CAD chip (plus Home Assistant integration)

In 2016 I bought and set up the emonPI Raspberry PI-based home energy monitor, which lets me trend and track energy consumption at home. 

Since then I've wanted to track water and gas usage, but until now I could not find any good solutions (within my abilities). We have an Elster C700 water meter but I was wary of tapping into the built-in digital encoder due to a tamper mechanism (this sentence also overstates my ability and ambition... I like solutions that someone else has pioneered first). 

This post is about deploying jomjol's AI-on-the-edge-device project to an ESP32-CAM module in order to get my analog water meter back into Home Assistant for monitoring, trending, and alarming. The audience is interested geeks and ESP32 beginners attempting to deploy this project for the first time. I'm going to expand on jomjol's instructions and talk about some of the mistakes I made along the way. I will also describe the kludgey, roundabout way I integrated data via MQTT back into Home Assistant. 

Results first: 

Home Assistant integration done!

Lots more details "after the jump".