Reading Power Use Data With A Webcam And Python

As any hacker will attest to, whenever an important tool is missing, you might as well just build a new one! That’s the position that [Matt] found himself in when he was attempting to measure the power consumption at his parents’ house. He left the transmitter for the power meter at home, and so the logical thing to do was to set up a webcam and a python script to monitor his dad’s power meter instead of going back to get his.

The power meter that he had handy was a GEO Minim Electricity Monitor. He found it very difficult to extract the data directly from this particular meter, so instead of digging into any of the communications protocols int he meter, he set up a webcam in a box with an LED and monitored it with a specially-written Python script. The script is able to see the particulars of the meter, and then reports back to the computer with all of the relevant data. [Matt] has put this code up on his project site for anyone to use.

This is a great workaround that doesn’t involve delving too deep into the inner workings of the meter in question. You could always build your own power monitoring system though, if that’s more of your style!

5 thoughts on “Reading Power Use Data With A Webcam And Python

  1. Hah, brilliant!! Me likey, although it would be nice to see a video of it in action.

    This jogged some brain cells, and reminded me I did a quick proof-of-concept like this a couple of years ago, for reading a seven-segment display. I never got around to doing a writeup or publishing the video, so here’s the video anyway –

    It worked, but I couldn’t figure out how to handle the uncertainty caused by the transition between two digits.

  2. Nice trick with the fixed points reading of the multimeter digits.

    I needed and searched for something similar for years, asking on the forums and looking for free OCR software that could read numbers from a multimeter screen, but never find the answer. Also, never had the time to implement myself a dumb OCR that could do the job. For me, it was much easier to draft a small hardware acquisition board instead of a software OCR.

    Does OpenCV have the capability to recognize a few digits from a screen filmed with a web cam?

    1. opencv doesn’t by default, but it can do all the bits you need to build your own. Check the paper I linked in the resources section of my github readme. Also there’s a program linked in the resources that can read digits from an image – though I couldn’t get it working reliably.

  3. I found out that some utilities don’t like anything hanging off their meters. In my case I had an old analog meter with a rotating disc in which a small half-inch portion was blacked out on the edge. I ended up using a laser pointer and a photoresistor inside a tube to detect whether the laser was shining on a light or dark section of the disc.

    For the most part this worked well, except for intermittently overcast days where the sudden change in ambient light would cause some false triggers, but after about a month I got a note hanging on my front door that the utility doesn’t allow anything to be attached to the meter. The reader did remove my sensor from the meter, but thankfully didn’t mangle it.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.