[withings] reimplementation as a openHAB2 binding

After @Pander tried to get the Withings binding working, he opened a ticket over at github that he would have liked to have this as a proper openHAB2 thing:

Both me and @mgbowman had the idea to start with a fresh implementation, and @teichsta already gave his blessing, in a PM to me, back in April 2017 for a friendly reimplementation :slight_smile:

So, without much ado, here is a thread where we can discuss requirements and implementation state :smile:

1 Like

So, to kick the discussion off, here is the list of my devices I use regularly:

  • “Smart Body Analyzer”, the basic WiFi enabled scale

  • “Blood Pressure Monitor”

From those devices, I would like to fetch at least the four items they provide, weight, hearet rate, blood pressure. I am not so sure about the precision of the body fat measurement.

Here are the devices I have as shown in the Health Mate app:

  • Smart Body Analyzer
  • BPM
  • Aura + 2x Aura Sleep Sensors
  • 2x Sleep (newest version) - I haven’t set these up yet, but will do it later today

The main reason I got the new version of the Sleep sensor was I have a “bedtime” routine that I would like to disable / modify if the wife goes to bed earlier than me (or vice versa). It is marketed as having IFTTT integration, but I’m with everybody else and would prefer a native OH2 binding.

I’m going to poke at the Withings API as well as look at some other OSS projects that make use of the API.

One thing that sticks out in their documentation is their notification system but it looks like it requires a public accessible hostname on port 80 or 443

From the glossary

Your URL must:

  • neither contain an IP or ‘localhost’. Only port 80 and 443 are allowed.

Maybe can be integrated via openhab-cloud? :thinking:

1 Like

Hello guys, I am also interested to make it working. If I can somehow contribute to it.

My material:

  • Smart Body Analyzer (but not the fully new one)
  • BPM
  • Thermometer
  • Aura + 2x Aura Sleep Sensors (the old ones)

Could we work together on it somehow ? I would really like to contribute to openhab project.

I think none of us really started on the code yet. I got a bit sidetracked reengineering my system with semantic tags for habot / google assistant support :slight_smile:

But, if @mgbowman has not started something by mid of January or so, I would kick off with coding.

1 Like

I’m using the same devices. I have Body+ or whatever called scale, it is almost the same as ‘Smart Body Analyzer’, but it doesn’t measure the CO2 level in the room, but it gives more on fat mass, etc…

However I only want from this binding to get all of my devices battery level. As I have seen in the API, it returns the battery level for each device (not exact level, but ‘good’, ‘ok’, and ‘low’ or something like this…).

Regarding the binding if some of you want to give it a fresh start, I have some suggestions:

  • OAuth2 instead the OAuth1
  • Implement something like the iCloud binding does.
    Have a ‘Bridge’ which will be the Withings Account, must be set-up manually. After adding the bridge/authentication was successful, it should add each device automatically to the Inbox. Then (to follow OH2 design) the Things should have its own channels which is correspondent to the Thing (scales should have weight, fat mass, etc channels).
2 Likes

:grinning:

I would also be interested by this Binding. I own a Smart Body and Steel

I’m too interesed. I can test if needed.
I have the Withings Scale, BPM and (newer) Sleep

Any news on this? Someone has some free resource to have a look at it? Sadly I don’t have enough time and I haven’t built any binding yet, so it would require much more time for me…

Actually, I started something and got as far as having a working OAuth setup. Now I “only” need to add the data synchronization. And need “only” to stop being distracted by one million other things :smile:

I might have a rough cut WIP pull request by the weekend or so, but first need to finish up the pushbullet action which is also collecting dust on my hard drive.

1 Like

Thanks for your work! I have also started looking into add-on development, so I might help you after you made this first commit.

I also have various devices from Withings (scales, blood pressure meter, sleep sensor) and am therefore also interested in the development of a binding. I am happy to participate in the tests.

Nice to see some many Withings owners looking forward to support in OH2. If you would, please make a donation via BountySource to support the person making this work. The link is on the BountySource badge at the top of the GitHub issue. So far we have two backers.

Here is actually my experimental branch…

I am just about to finish migrating my pushbullet binding to the new build system and openHAB2. Then would continue (or actually “really start”) with the withings binding…

3 Likes

Thanks for your work! I’m waiting for it.

Any progress on this?

Not really, I am still stuck on real-live events keeping me from coding for hobby purposes…

I want to have the pushbullet binding sending messages, and start with the withings one after that. But cannot give any estimate as to the time schedule :frowning:

Do you have an issue on where you are stuck with Push Bullet? Perhaps I can help there. It greatly matter which minor version of Python you use with PB.

Actually, it is just finding time to clean up the code and write a proper README. Whenever I find a few free hours, the pull request should be ready to go.

And the binding is not written in python but properly in java. I migrated my binding from openHAB1, so it actually is all the issues with new architecture, new build system, yadda yadda yadda.

1 Like