Analog Only Gas Meter
tommyjlong opened this issue · 5 comments
I have a gas meter that has 4 analog gauges on it (no digital digits). I am trying out the nohn/watermeter
to see if I can get it to work for my gasmeter. My first attempt didn't work so well, so looking for some help.
Since the watermeter expects at least one digital digit, I found a "0" that is printed on the gasmeter itself that I used to mimic a digital digit. Otherwise I have setup 4 analog gauges. The actual meter I am testing is not the real one, it is a used one I purchased separately so that I could play with it as part of my test setup (for example, I can turn a knob in the back of the meter to change the gauge dials). It came with all the analog gauges set to 0 and that's what I started my testing with. I set the initial value
to 0. Attached is a partial snapshot of the debug output, and none of the gauges were interpreted correctly (however the "0" digital digit seems be recognized properly).
hasErrors: 1
array(7) {
[76]=>
string(46) "Could not interpret . Using last known value 0"
[149]=>
bool(true)
[150]=>
bool(true)
[151]=>
array(1) {
[0]=>
bool(true)
}
[152]=>
array(1) {
[0]=>
string(6) "0.5839"
}
[153]=>
array(1) {
[0]=>
string(4) "0000"
}
[154]=>
array(1) {
[0]=>
float(0.5839)
}
}
lastValue: 0000
value: 0.5839
0000
There are some other quirks with this meter, as some of the gauges are the usual 0 to 9 clockwise, but others are 9 to 0 clockwise.
Looking for some ideas, but for starters, looking for advice on how to get the 0 to 9 clockwise gauges to be recognized properly. BTW, thanks for your work on this :)
First of all: Many gas meters send magnetic impulses you can track with for example reed contacts, hall sensors etc.
Regarding the gauges: What's the original color of the needles? is there any change of getting a better image of the gauges? The current implementation of https://github.com/nohn/analogmeterreader this package is based on requires the needles to be red to be detected correctly.
Thanks for getting back. When I first looked at the README pages, the analog gauges appeared to be all black including the needle, so I thought this might just work for my application. After playing with this a couple of days more and studying the AnalogMeter code, I realized that it was important to have a red needle and the rest of the image be some other color. My needle is black, and all the labels/dials, numbers etc on the meter are also black. I did try a few things to get the needle red, (but of course all the other black items were red as well) and even then most of the time it could not pick the correct cell in the 10x10 matrix because some other cell still had more red pixels.
Since it is a requirement to have a needle be different color, I would suggest adding that to the README page.
I'll close this for now. Best Regards
@tommyjlong could you please send me a few images without post processing?
Sorry. This meter is so strange in so many aspects, I won't support that extreme edge case.