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:
Intallation and updating is pretty straight forward, but a summary is given here:
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:
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.
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:
- Updating from 0.1.x.x: Dispable the Fitbit plugin if it's running!
- Updating from 0.1.x.x: Remove the two dlls in /Bin/FitbitSeer
- Updating from 0.2.0.0x: You can delete the GIF-files in /html/Images/FitbitSeer
- Unzip all files to your HomeSeer directory, and overwrite
- 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.
- 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#_=_
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.
Comment