Announcement

Collapse
No announcement yet.

FitbitSeer, a Fitbit plugin for HS3 - Need beta testers

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

  • cheeryfool
    replied
    I hope everyone bought FIT stock as well as their gadgets. Up 50% on today's IPO!
    Unfortunately I did not.

    Leave a comment:


  • gearyt
    replied
    looks like a great way to start a "war" between my wife and I
    Will order 2 over the weekend and install plug-in

    Leave a comment:


  • Moskus
    replied
    Originally posted by TechHA View Post
    * My weight in Fitbit is 165 lbs., in Fitbitseer it's showing up as 74.7 lbs.
    Thanks for catching this. It appears that Fitbit, even if it's an american company, is using SI-units in their database. 165 lbs is 74.7 kg, so I will need to do some conversion. Thanks!

    May I ask you also to double check the "Distance"? Is it the same as it's listed on fitbit.com?


    Originally posted by TechHA View Post
    * On the config screen the 'Submit' button for add new account is sitting in Homeseer's bottom tool bar (see picture)
    Yes, it should be. I noticed that after publishing. I'll solve that later.


    Originally posted by TechHA View Post
    * Also, on the config screen I see how to Add an account but can we also get a list of current accounts and have the ability to remove one? I know it's beta but figured I'd throw the idea out there.
    Perhaps I should explan this:

    If you want to remove an account, just delete the root device for that account and all it's child devices. All the account data is stored in the root.

    Leave a comment:


  • TechHA
    replied
    Nice job on the plug-in so far. I just got a Fitbit today so just figuring things out.

    Some notes so far...
    * My weight in Fitbit is 165 lbs., in Fitbitseer it's showing up as 74.7 lbs.
    * On the config screen the 'Submit' button for add new account is sitting in Homeseer's bottom tool bar (see picture)
    * Also, on the config screen I see how to Add an account but can we also get a list of current accounts and have the ability to remove one? I know it's beta but figured I'd throw the idea out there.

    Thanks for a nice way to keep track of the Fitbits. Look forward to seeing how this plug-in evolves.
    Attached Files

    Leave a comment:


  • dcdelong
    replied
    My wife and I also have FitBits. Will load this up over the week-end.

    Chris

    Leave a comment:


  • Moskus
    started a topic FitbitSeer, a Fitbit plugin for HS3 - Need beta testers

    FitbitSeer, a Fitbit plugin for HS3 - Need beta testers

    NEWS: FitbitSeer now supports OAuth2.0 and therefore now works after the removal of OAuth1.0a on August 1 2016.


    As a proof that it was possible to actually create a plugin without too much effort using my own plugin sample (currently in development, being released very shortly), I wrote a plugin to fetch data from Fitbit.



    My wife and I have Fitbit Ones and we use them 24 hours a day, even when we sleep. We have two girls, 2 and 4 years old, and the youngest is struggling with the last tooth (it's finally over soon!!!), so for us sleep is very important. (But as you can see, the last night wasn't bad at all! First time I've been sleeping through the whole night in two weeks).

    Fitbit will keep track on the last nights sleep, and HomeSeer will remind us to get to bed early if your sleep length or quality isn't satisfactory. If the quality and/or actual sleep time is bad enough and the TV is still on, it'll turn everything media related off.

    It'll also keep track on our internal daily step count contest.



    At the moment it's not very pretty or feature rich, but it should be stable.

    Authorization is oAuth-based. The plugin is based on Fitbit.NET which builds on the Fitbit API. The plugin will update data every 5 minutes, and this should be fast enough to be almost "live" as Fitbit devices aren't updated continously, and it's seldom enough so we don't cross the 150 requests pr hour rate limit. However, this refresh time is user configurable. The plugin is multi-threaded so checking more often shouldn't be a problem.

    Planned features:
    • User can select whitch data to fetch. Example: If you're not interested in sleep, then FitbitSeer will ignore sleep data.
    • Adding triggers and actions is of course possible, but I don't know which triggers and actions are needed...?
    • Possibly convert datafetch from poll to push making the plugin display "live" data, but this is not something needed right away.



    Intallation and updating is pretty straight forward, but a summary is given here:
    1. Updating from 0.1.x.x: Dispable the Fitbit plugin if it's running!
    2. Updating from 0.1.x.x: Remove the two dlls in /Bin/FitbitSeer
    3. Updating from 0.2.0.0x: You can delete the GIF-files in /html/Images/FitbitSeer
    4. Unzip all files to your HomeSeer directory, and overwrite
    5. Updating from 0.1.x.x:Updating from 0.1.x.x: Now open the root devices and go to the Fitbit tab. All accounts needs to be re-authenticated.
    6. Updating from 0.2.0.0: Open the root device, check the "Heartrate" checkbox at the bottom if you have a tracker that reads HR.



    READ THIS ABOUT AUTHENTICATION:
    Authenticating with HomeSeer requires a little "hack". I can't possibly know all the different IPs and ports used for HS, and having a valid return URL is required for OAuth2.0. So that's a problem. I set "http://localhost" as the return URL because then you will KNOW that I am NOT sending this code to anybody else, it is only for you (see privacy statement below). This will not resolve, unless you happen to have a web server (like HS) on the machine you are using. But the URL wont work in any case. We are not interested in the page, but in the URL itself. Here's an example of what you get after you click on the "Authenticate" URL, log in to Fitbit and hit OK:
    Code:
    http://localhost/?code=c821b14f9abdf90ec154140108f83e613e21e7c9#_=_
    Here we are only interested in the part between "code=" and "#_=_", that means the blue bit here:
    http:// localhost/?code=c821b14f9abdf90ec154140108f83e613e21e7c9#_=_
    Copy that bit, and paste it back into the text box in the device settings on the root. If successful, FitbitSeer will fetch your userID and display alot of checkboxes. Just hit "Done" at the bottom, because you are done.

    ... and one last thing:
    Authentication WILL FAIL WITH NO ERROR (at the moment) if there's a "Newtonsoft.Json.dll" in the HomeSeer directory or in the /Bin-folder (if it's in /bin/some_subfolder is fine, however). I encountered that problem when testing the plugin on my main system. Just a heads upp



    Privacy statement:
    I do not log anything at all. There's only (encrypted over HTTPS) communication between your HomeSeer installation and the Fitbit servers, nothing more (that I am aware of, anyway). I really, really don't care how active or little active you are, if you wear your heartrate monitor during sexy time, how much you weigh or how many bottles of water you drink every day.



    Changelog:
    0.2.0.10
    - Added heartrate devices, see image above.
    - New Fitbit.net library
    - New icons!

    0.2.0.0
    - OAuth2.0 conversion with Fitbit.NET 2.0 RC3. BETA!
    - You DO NOT have to remove any devices, all current devices will work!
    - I had to go back to 0.1.0.2 to make this work, so most of the new features I was planning are gone (for now).
    - Known bug: Logging is almost nothing, and I'll fix this soon. If you want to see what's going on, then stop the plugin, enable "Developer Mode" on to of the plugin management page, and restart the plugin. (Remember to uncheck the "Developer Mode" after restarting the plugin or you'll get a console window for each plugin the next time you restart HS!)
    - Known bug: I actually don't know if the check boxes on the root device -> Fitbit-tab works or not. I think they do, but I'm not sure.
    - Know "bug" (but unfixable): If FitbitSeer or HomeSeer is stopped for more than 8 hours, you will need to re-authenticate your accounts.

    0.1.0.1:
    - Added stair count
    - Hopefully corrected for imperial units
    - Corrected "Weight Weight". But please delete that device before upgrading (don't worry, it'll get recreated).
    - Moved the submenu lower on the Configuration page

    If you're upgrading then you just need the exe-file in the updated zip-file below.


    Comments are most welcome!
    If would be great if you give me a hint below if you test it.
    Attached Files
    Last edited by Moskus; November 27, 2017, 06:42 AM.
Working...
X