MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Withings

    Scheduled Pinned Locked Moved Unsolved Requests
    health
    26 Posts 14 Posters 21.0k Views 17 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      Tomekkkkk
      last edited by paviro

      Moin from Hamburg,

      i need help with the Withings Scale.
      http://www.amazon.de/Withings-WS-50-Smart-Analyzer-schwarz/dp/B00BKRQ4E8/ref=sr_1_1?s=drugstore&ie=UTF8&qid=1462363132&sr=1-1&keywords=withings+waage

      There is an API (http://oauth.withings.com/api/doc) and i try to write my own CustomCSS to get the actual weight and some stats at the Mirror.
      Unfortunately, I 'm apparently too stupid for this. Maybe someone with more Skills have the same problem?

      Thank you in advance!

      1 Reply Last reply Reply Quote 3
      • J Offline
        Jaghova
        last edited by

        This module would be great!!!

        Having your health information every morning on the mirror. I also have a withings scale but I am not a programmer, so I can’t help you.

        Anyone that could help us?

        1 Reply Last reply Reply Quote 0
        • D Offline
          darrene
          last edited by

          I too have a Withings scale which I’d be interested in integrating the data from with MM.

          It’s next on my list to take a look at, but I suspect progress is likely to be slow as my skills are very basic :)

          1 Reply Last reply Reply Quote 0
          • D Offline
            darrene
            last edited by darrene

            I’ve been having a very quick play with this python script on my Pi, which demonstrates the API which could form the basis of a simple weight-data retrival module.

            I’m struggling with a few issues at the moment though - I’ve git clone’d and npm install’d, created a test.py file as indicated by the readme and in it I’ve put in it my Withings API key and secret values.

            I had to sudo pip install requests_oauthlib as that was a requirement which wasn’t installed.

            I’m SO nearly there I think! when my test.py file runs, it generates a Withings URL to authorise the app, I authorise on the website and am given an oauth response verification code, but when I paste it back into the script response, I get an error which i think is at the point the script tries to parse them through auth.get_credentials (after this point, the script gets my last measured weight):

             File "test.py", line 8, in <module>
             creds = auth.get_credentials(oauth_verifier)
             File "/home/pi/MagicMirror/modules/python-withings/withings/__init__.py", line 107, in get_credentials
            tokens = oauth.fetch_access_token('%s/access_token' % self.URL)
            File "/usr/local/lib/python2.7/dist-packages/requests_oauthlib/oauth1_session.py", line 304, in fetch_access_token
            token = self._fetch_token(url, **request_kwargs)
            File "/usr/local/lib/python2.7/dist-packages/requests_oauthlib/oauth1_session.py", line 361, in _fetch_token
            raise ValueError(error)
            ValueError: Unable to decode token from token response. This is commonly caused by an unsuccessful request where a non urlencoded error message is returned. The decoding error was No JSON object could be decoded.
            

            Oh well. It’s progress I suppose.

            1 Reply Last reply Reply Quote 0
            • P Offline
              plumcraft
              last edited by

              I got the withings scale, interested about the module you’re building :)

              1 Reply Last reply Reply Quote 0
              • D Offline
                darrene
                last edited by

                So the Python module I was trying to re-use didn’t work. I suspect Withings have changed their API or something else has changed. Following the steps on their website though, did work and I was able to send a command to retrieve my data.

                Now it’s a case of trying to code it up into a module!

                1 Reply Last reply Reply Quote 0
                • M Offline
                  matt25
                  last edited by matt25

                  Hi,

                  Just upload first version of my module. This is more a proof of concept than a complete functional module, but it works fairly well on my mirror.

                  MM_Withings

                  Will update and improve it (especially design, if someone could provide me nice icons) and create new post in module section forum.
                  Module is based on Netatmo module from Christopher Fenner.

                  F 1 Reply Last reply Reply Quote 0
                  • F Offline
                    frog @matt25
                    last edited by

                    @matt25 What do you put in for the application website when creating the application on the withings site? Seems to be needed later when granting access - and I get a 404 error if I just put some random site mane in there.

                    M 1 Reply Last reply Reply Quote 0
                    • M Offline
                      matt25 @frog
                      last edited by

                      @frog I personally simply wrote 127.0.0.1 and no problem. Let me know if it is ok so that I can complete the user guide.

                      F 1 Reply Last reply Reply Quote 0
                      • F Offline
                        frog @matt25
                        last edited by

                        @matt25
                        The problem I had was that I was ssh’ing into my mirror - so I tried running the Withings authorisation process on the mirror using Chrome, but I’m now getting a message that 127.0.0.1 can’t be reached.

                        M 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy