this post was submitted on 22 Dec 2024
16 points (100.0% liked)

Programming

17666 readers
427 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

I created a solution...with a pi 4 but it just doesn't seem to work very well. OCR is very finicky and while I was able to get pytesseract to pull the images off of a webcam, the numbers that get returned are very wrong. It looks like they only allow businesses to pull the powermeter data if I am reading this right: https://www.pge.com/en/save-energy-and-money/energy-saving-programs/smartmeter.html

My rate has increased 6 times this year, so power is very expensive here: 50c per KWH...on the lowest consumption rate. I need to figure out how to cut back or get solar panels. But I want to see in near real time how much energy we are using.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 4 points 18 hours ago (1 children)

Don't know about PGE's API, but for the OCR stuff, you may get better results with additional preprocessing before you pass images into tesseract. e.g. crop it to just the region of interest, and try various image processing techniques to make the text pop out better if needed. You can also run tesseract specifically telling it you're looking at a single line of data, which can give better results. (e.g. --psm 7 for the command line tool) OCR is indeed finicky...

[โ€“] [email protected] 2 points 18 hours ago

Ill try it out. I put psm 11 at one point, but got 000000 back out unless my camera was just in the perfect spot. Then i would get around 1/2 the numbers right.