Pixometer Binding - Anyone interested?

Hi together,

Since i am living in a rented home it is not always that easy to change the wiring or other things for integration in the smarthome.
This situation is the same for my electricity, water and gas measuring devices.
I can’t build in something into the electrical cabinet and water/gas meters are located in the cellar while my flat is under the roof.
So sadly no chance for me to work with one of the great (device based) meter solutions which have been described here so far.

I seem to have found an equivalent replacement for my needs.
Pixometer is a solution that is based on a free app for different operating systems.
They can read the current meter value out of a photo taken within the app.
I think they are aiming for facility management usecases with their paid version, where facility managers document meter readings the whole day and for many people.

But:
They have a free package until you only want to measure 5 meters, which should be fitting for most private usecases.

And:
They provide an API to communicate with your account, meters, readings.


Long story short:
I am using this service and i wanted to dig into binding development anyways.

So i have created a small binding which is inspirated by some of the different api bindings that are around here.
Thanks to the builders of tankerkoenig and airquality, who helped me dive into getting started wich this task.

Currently you can set up a bridge that connects to the api and meter things, which provide current reading value, time of that reading and and a last_refresh channel for the thing.

I am testing this for some time in my environment now and i have the feeling that it is in an early alpha state now.
So if someone is in the same situation or using pixometer already and wants to persist the meters within openhab feel free to poke me.

I will add a jar file here, when i have tested it in my own OH2 environment and not only in the eclipse debug mode.

Information about the Service itself can be found here:

http://pixometer.io/info/

(Sorry only in german and i think they only support german measuring devices at the moment.)

5 Likes

Hi Jerome,

this is Mark from pixolus. We just found your openHAB integration for pixometer. Nice work! May we share this on our blog?

For those interested: webpages and app are localized to English and German currently. The recognition engine is based on machine learning and at this time, we have predominantly data for German meters. It has been confirmed working by British and Australian customers, though, so you might want to give it a try.

If we can do anything to help openHAB integration, tell us (best using the contact form on pixometer.io).

Best,
Mark

1 Like

Hey Mark,

Thanks for showing up and offering your help here.
Also nice to hear, that other than german meters will be supported.

I will try to push some things on my To-Do list forward “zwischen den Jahren” and may contact you in january.
Keep in mind that this is an early state and its still a bit away from the basic functionality i would like to have.
So maybe its a bit too early for a blog share.

Nice project! Thanks for sharing.

I wonder if Pixometer Android app does have a Tasker integration?
It would allow us to simply place an Android phone by the meter and trigger a scan e.g. once a month :slight_smile:

Looking forward to test your binding @Confectrician!

Cheers

10 months silence and one master degree later,
i finally was able to catch up on this topic and provide a WIP-PR to the openhab2-addons repo.

1 Like

Hi,

while the binding didn’t change, the account connection is broken since a while. I get following error:
Status: OFFLINE - COMMUNICATION_ERROR Could not obtain auth token. Please check your configured account credentials. pixometer:apiservice:56cc9112 java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed

I double checked my account credentials to be right. In PaperUI, I can’t enter the auth token, no write to this field is possible.

Is there a way to define a things file for Pixometer account?

Hi,

The token has to be refreshed from time to time, so it wouldn’t make sense to generate and store it by hand.

When you’re credentials are correct, maybe the have changes the api.
But I have not looked into the code for a long time because of the ongoing changes in OH.

I will try to evulate this after my vacation.
Don’t expect an answer before mid/end august. I will be away for the next two weeks.

Hi,

I generated the auth token again on https://pixometer.io/api/v1/api-token-auth/. It generates the same than before, so this is not the problem. For me it looks more like a timeout problem.

Happy when you can check after your vacation.

1 Like

Hey @silvereagle,

I have migrated my PR to the new build system yesterday and wanted to look into this now, but again i am not able to get a running debug environment with eclipse IDE, so i ma not able to follow all debug messages. :slightly_frowning_face:

I will do a fresh eclips install and try it again (for the 100th time now…)

Hey @silvereagle,

I finally was able to set up a test environment and the current codebase seems to work fine for me.

Thanks,
can I check this by openhab snapshot Update?

The pull request build failed. (Maybe caused by a merge conflict.)
I have resolved that and it will hopefully run again.

Did some further refactoring and adressed the currently outstanding review comments.

Debugging looks good.
Let’s see if we can get a running pr-build. (Locally worked fine so far. :man_shrugging:)

Should be possible now from:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.pixometer/2.5.0-SNAPSHOT/

Hi Jerome,

looks good. I can see all my metering values.
Thanks.

1 Like

found this today: Bridge is online, but meters

Status: OFFLINE - COMMUNICATION_ERROR Could not initialize Thing ( pixometer:energymeter:73c4821e ). java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed

1 Like

Hey @silvereagle,

Is the problem still existing or did the things get back?
It sounds like the api wasn’t reachable.

Also i am waiting for review now and i don’t want to change code now, until this process is finished.

Hi @Confectrician,

nothing changed. Bridge is online, but meters keep timed out.

Have you tried to edit the things and save again?
And did you configure debug logging for the bundle?

Hi,

strange! I edited and saved thing. In frontail I see the timeout error, but 2 minutes later items are updated. As I can follow the log, the bridge updated meanwhile.

In PaperUI I still see:
Status: OFFLINE - COMMUNICATION_ERROR Could not initialize Thing ( pixometer:gasmeter:98ec6389 ). java.util.concurrent.TimeoutException: Total timeout 2000 ms elapsed

OK, this sounds like the things are working/updating fine. :thinking:

Possibly i am just doing something wrong in the init part and its simply a missing statement to update the thing status.