Announcement

Collapse
No announcement yet.

Withings Scale Integration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Withings Scale Integration

    I have a Withings scale and was interested in integrating the Withings Health Data into Homeseer. They have an open API, I was going to take a crack at it with Big5 but it looks like it's pretty heavy on the authentication. Anyone want to take a crack at this for me? It may be worthwhile to actually start with this and actually write a health metrics plugin to include other platforms such as Apple and Fitbit (there is a plugin out there for Fitbit already, may be a good starting point)

    I think health integration is both a big part of the futuristic wow factor and could also be pretty useful. Personally, with my health initiatives next year this would be extremely beneficial. Even the simplest interactions prove pretty helpful. I.e. IFTT sends me a notification if I go over a target weight which does actually impact my day's decisions. Same with the announcements that Homeseer plays throughout the workday which remind me to actually get up and away from the desk.

    Let's mate HA and Lifehacking!!!

  • #2
    Sounds like a great opportunity for the plugin authors of BIG5 to demo and document how well their plugin serves this purpose. Have you engaged them yet?
    HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

    Comment


    • #3
      omg...they have to do it (big 5). So we can reproduce it.

      Comment


      • #4
        Withings integrates with IFTTT so you can tie HomeSeer and the Withings Scale together with almost no code at all...
        ---------------------------------------------------
        Jean-Marie G. Vaneskahian
        jean@vaneskahian.com
        ---------------------------------------------------

        Comment


        • #5
          Originally posted by jeanv View Post
          Withings integrates with IFTTT so you can tie HomeSeer and the Withings Scale together with almost no code at all...
          How would I send the weight from Withings to Homeseer with IFTTT?

          Comment


          • #6
            Bad idea. If HS3 knows how big my butt is than it may lock the refrigerator :-)

            Jokes aside Big5 just released a new version 1.21 that is better than ever for handling REST API and JSON API.
            Big5 supports GET, POST, PUT and DELETE plus multiple headers.

            I agree that getting an authentication token is one of the biggest challenges. There are reports in Big5 forum that some users managed to handle oAuth .

            Comment


            • #7
              This is very easy to do and take minutes with IFTTT.
              1. Setup both HomeSeer and Withings on IFTTT
              2. Create a new Applet on IFTTT that uses Withings as a trigger and select "Body Scale New Measurement"
              3. Create and Action using HomeSeer and select "Send A Text Command To HomeSeer"
              4. In the text say "Data From Withings Scale - {{WeightLB}}"
              5. Place a script in your HomeSeer Scripts folder called "check_vcmd.vb"
              Contents of check_vcmd.vb:
              Code:
              Function Main(parm as object)
                      hs.writelog("VCMD", "Starting")
                      ' Convert parm to string
                      Dim RawCommand As String = CType(parm, String)
                      ' Check if this is IFTTT data from the Withings Scale
                      hs.writelog("VCMD", "Data Passed Into Script: " & RawCommand)
                      If RawCommand.Contains("Data From Withings Scale") Then
                          ' Get just the Withings data part that was returned
                          Dim WithingsData As String = RawCommand.Split(New Char() {"-"c})(1).Trim()
                          hs.writelog("VCMD", "Withings Data: " & WithingsData)
                          ' Now here you do whatever you want with the data in the string WithingsData
                          ' You can convert it to a Double, send it to another script, assign it to a device, etc..
                          hs.writelog("VCMD", "Ending")
                          Return "Processed In Script"    ' This is done so no other processing happens by HS3 on this command
                      End If
                      hs.writelog("VCMD", "Ending")
                      Return ""
              End Function
              And that is it! Now you can do whatever you want with that "WithingsData" variable.. Send it to another script, set a device value to it, put it in a database, speak it over the whole house, post it to Twitter

              Here is a video walk though of the process.. Hope this helps...

              ---------------------------------------------------
              Jean-Marie G. Vaneskahian
              jean@vaneskahian.com
              ---------------------------------------------------

              Comment


              • #8
                Wow you really went in depth there! What would be the additional code to assign the value to a device? I'd still like to see a health plugin pursued that could incorporate everything in close to real-time and from multiple platforms. I'll wind up integrating this but personally am not a fan of using IFTTT for too much HA. Ie. I just weighed in and it took to minutes for the associated action to take place (notification that I am a pound over my limit)

                Comment


                • #9
                  Would really like to see a plugin for this. But with a self autentification system ( due to the limit of call per account)

                  Comment


                  • #10
                    After much work I have finally figured out how to get data directly from the Withings API and even have it trigger getting the data after a callback from a Withings scale measurement. It was not trivial and I have a dedicated site just to listen from the callback from Withings, but it works. There is no real tie into HomeSeer though.
                    ---------------------------------------------------
                    Jean-Marie G. Vaneskahian
                    jean@vaneskahian.com
                    ---------------------------------------------------

                    Comment


                    • #11
                      Wow! That could be wrapped into a plugin most likely. What dedicated site?

                      Comment


                      • #12
                        Originally posted by jeanv View Post
                        After much work I have finally figured out how to get data directly from the Withings API and even have it trigger getting the data after a callback from a Withings scale measurement. It was not trivial and I have a dedicated site just to listen from the callback from Withings, but it works. There is no real tie into HomeSeer though.
                        Do you plan to incorporate it into hs?

                        Comment


                        • #13
                          It is not a public site... I just wrote it for myself to see if I could do it. It took me a long while to understand how the access token and refresh tokens on the Withings API worked. It is all written in Python, PHP, HTML and runs on a Linux Server with Apache. There is no tie into HomeSeer at all. It would be quite difficult to make this into a Plug-In unless you have that plug-in hammer the Withings site constantly looking for updates rather than use the callback method that points Withings back to a PHP web service to let it know that new measurements are available.
                          ---------------------------------------------------
                          Jean-Marie G. Vaneskahian
                          jean@vaneskahian.com
                          ---------------------------------------------------

                          Comment


                          • #14
                            I am not sure if I plan to pull this into HS... That was my thought at first, but I am not sure yet... Still working on massaging the data.
                            ---------------------------------------------------
                            Jean-Marie G. Vaneskahian
                            jean@vaneskahian.com
                            ---------------------------------------------------

                            Comment


                            • #15
                              If you could get with the author of Fitbitseer to combine resources it would probably be something that could sell. Also if you could incorporate Apple Health.

                              Comment

                              Working...
                              X