@aunrea For now, to get Imperial measurements, remove this line:
https://github.com/m-roberts/MMM-Fitbit2/blob/master/python/get_data.py#L96
Read the statement by Michael Teeuw here.
Posts
-
RE: MMM-Fitbit2
-
RE: MMM-Fitbit2
@Arno-Strasbourg
Seems like it’s possible to get a low-resolution status of device battery levels from the Fitbit API.
It also seems as though the Python library supports this endpoint.However, because it returns a list of devices, targeting the right one may prove to be a little more complicated.
Not much good if the battery level relates to a second tracker that you aren’t actually wearing!
I could possibly do it based on the device with"type": "TRACKER"that has the most recent"lastSyncTime", but I will need to think about it. -
RE: MMM-Fitbit2
@mattx38 As the client secret a password, it is blocked from printing. Just paste the secret into your terminal and press enter - it will work.
This is separate to what @bhepler raised re: SSH. Actually, you can run all of the commands over SSH, but you will need to log in to your Fitbit account in a browser on the Pi in order to generate your access tokens. Alternatively, you can run the script on another machine, generate the tokens and then transfer them onto the Pi (if you have no way to do things on your Pi’s display).
-
RE: MMM-Fitbit2
Hi all (notably, @chsp) - turns out that there was a bug if you had selected the “weight” resource and did not have any weight data for the last 30 days. I have pushed a fix for this, so hopefully you don’t end up with “Loading…” any more!
-
RE: RPI3 running out of memory
@johntech no worries! “Memory” is often confused in this context. Hope you learned something 😁
-
RE: MMM-Fitbit2
@Fr8Trayne Are you SSH’d in to your machine? You need to be on the machine locally, so that the browser can open, and you can log in to Fitbit in the browser.
This is all great feedback though - thanks for being patient!
-
RE: RPI3 running out of memory
@johntech Huh? This is referring to RAM memory, not hard drive space. I was writing to explain how you can extend the swap by using filesystem space to prevent the system crashing from running out of RAM.
Sorry if there was any confusion - I actually manage a Raspberry Pi operating system, so am very familiar with the tools and techniques available.
-
RE: MMM-Fitbit2
@Fr8Trayne It’s a password entry step - it won’t show up in the terminal. Perhaps that is not clear enough, or just isn’t necessary! Just paste and hit ENTER to continue.
-
RE: MMM-Fitbit2
@sdetweil Ok, I see what you’re saying. I’ve added it to the extending functionality GitHub project board. Seems quite minor though.
-
RE: MMM-Fitbit2
Progress % is from 0-100. You have a start point, an end point, and are between the 2. “9% over” and “2% under” are not records of progress.
If I recorded 9% over as 109%, and rounded to 100%, it would indicate that your progress towards your target resting heart rate (RHR) is 100%. 2% under would mean that you are at 98% “complete”.
They may be percentages, but progress is absolute, and your calculations are relative. It would make more sense to keep the RHR data and create a better representation of it (e.g. a histogram - which is what Fitbit actually does).
-
RE: MMM-Fitbit2
@sdetweil I’m not sure that that makes sense. If you have a target resting heart rate of 55, but you’re at 60, what is your progress %?
-
RE: What is the procedure for reviving a dead module?
I have posted the module here. I am looking for testers!
-
MMM-Fitbit2
MMM-Fitbit2 builds upon MMM-Fitbit (which appears to be abandoned), and displays (even more of) your Fitbit data!
It is allows you to display the following data (progress tracked against goal unless mentioned)
- Steps taken
- Calories burnt
- Distance walked
- Active minutes
- Floors climbed
- Resting heart rate (progress is always 100% as there is no goal)
- Remaining water to consume (progress currently not displaying correctly as it approaches zero rather than starts from zero)
- Remaining calories available to consume (progress currently not displaying correctly as it approaches zero rather than starts from zero)
- Time asleep
- Weight (progress currently not displaying correctly as it does not yet consider your starting weight)

This project was a fairly significant re-write, with its long-term vision of being able to display data just as complicated as on the official Fitbit dashboard, where possible. See the README for more information!
This module is currently in need of testing - I am withholding adding it to the Wiki page until it has been used by multiple people for at least a few days without issues.
-
Shared UI Components Library?
Has this ever been considered?
I am aware of the default styles in
css/main.css, but I was wondering if there was anything for more advanced objects.Lots of modules have excellent implementations for showing data, and I thought that it would be useful to avoid duplicating code (and loading in styles, etc. multiple times) if it were possible to abstract these components away, such that they could be used by other modules.
This would improve development speed, UI consistency, maintenance, performance, etc.
-
RE: RPI3 running out of memory
Worth considering increasing your swap file size while you try to determine the cause. That will start using file system space as memory.
Change
CONF_SWAPSIZE=100to#CONF_SWAPSIZE=100in/etc/dphys-swapfileand reboot.Then you can check on the swap size used, and see if it’s a memory leak that just keeps on growing, or something else.
-
RE: What is the procedure for reviving a dead module?
I want to get icons and formatting sorted before I add it publicly. However, you can try it here: https://github.com/m-roberts/MMM-Fitbit2
Also, I need to handle credentials from the config, as currently they are hard-coded into files that are used by the Python Fitbit library. This needs to be handled from the config directly, to support multiple Fitbit accounts on one setup.
-
RE: What is the procedure for reviving a dead module?
@Fr8Trayne I’ve got the following currently supported data:
- Steps Walked (compared to goal)
- Calories Burned (compared to goal)
- Total Distance Walked (compared to goal)
- # of Active Minutes (compared to goal)
- # of Floors Climbed (compared to goal)
- Resting Heart Rate (average for the day)
- Today’s Remaining Water Intake (amount consumed subtracted from goal)
- Today’s Remaining Calories To Consume (amount consumed subtracted from goal)
- Sleep Time (compared to goal)
- Current Weight (last weigh-in, if within the last 30 days)
I need icons for water, food and weight, and some assistance with formatting before I will post it publicly. Perhaps I will create a new forum post for this.
-
RE: What is the procedure for reviving a dead module?
@sdetweil Obviously this would be an option if it weren’t dead. My question was what to do given the fact that a PR is unlikely to be responded to.
@Sean I think that this is probably the way to go, so I’ll do that.
Thanks!
-
What is the procedure for reviving a dead module?
MMM-fitbit has been inactive for over 3 years.
I am interested in picking this project up myself, but I am not sure what the procedure is for doing this.
Should I create a new module name for it, or should I “replace” this module as its active development equivalent?
Thanks!