Read the statement by Michael Teeuw here.
Fitbit
-
OK, So I’m working on this and being new to MM, NodeJS, GIT, etc. is not helping :) (I am a programmer, so at least I have that going for me).
Something that I don’t think was too clear, at least it wasn’t for me. When runningsetupAccess.py
, it’s starting a web service, the direction say tolog into your fitbit account and authorize your app
, what I had to do, on my Pi, was to go to127.0.0.1:8080
. This initiated the redirect to Fitbit, when I logged in I had the check boxes to enable/disable items and the allow/deny buttons.
When I clicked on the “allow” then the terminal with setupAccess running showed that the tokens were getting written out, and indeed the tokens.ini file was finally created. -
I’m having a problem with my fitbit module. (mods if this should be a new thread just let me know).
I can start the MM and the FB data loads, then after a time my ‘credentials.ini’ file gets changed to “undefined” for both entries[Credentials] c_id = undefined c_secret = undefined
Now, when I ran setupAccess.py the file was correct and my tokens file was created. What I’m seeing happen is that after a while the FB module stops refreshing. I’m guessing it’s because the tokens need to be refreshed and because my credentials are gone, it can’t authorize.
Any thoughts?
I’m not sure how to get any logs or info out of the system. I’m running MM through pm2 and I don’t see any log files.TIA
-
Solved my issues.
Saw the following when starting up MM
results: [{"message":"Writing credentials to credentials.ini","type":"status"},{"message":"Writing id: undefined and secret: undefined","type":"status"},{"message":"Credentials write successful","type":"status"}] Create new todo fetcher for list: Groceries - Interval: 60000 Create new todo fetcher for list: Family - Interval: 60000 Whoops! There was an uncaught exception... { Error: process exited with code 1 at terminateIfNeeded (/home/pi/MagicMirror/modules/node_modules/python-shell/index.js:100:23) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/node_modules/python-shell/index.js:88:9) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) executable: 'python', options: null, script: 'modules/MMM-fitbit/python/getData.py', args: null, exitCode: 1 } MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
Tracing the information back, it was in the config.js file. I had an extra set of [] around the credentials data. Not sure how or why I had it that way, but all cleared up now.
-
Hi Guys,
Firstly thank you for creating this module it’s exactly what I wanted!
I’m having an issue with the module running for extended periods of time where it loses connection to fitbit and I need to run “sudo python setupAccess.py” on the python directory again to get it to pull my latest stats from Fitbit.
Do you have any way it can check in with Fitbit every 30 mins or every hour to reconnect and pull the latest stats?
Many thanks
Ollie -
Hi Guys,
this Module is freaking me out… (123456789 are just examples for my API ID)
I just entered this Code in my config.js{ module: 'MMM-fitbit', position: 'top_center', config: [ credentials: { client_id: 123456789, client_secret: 123456789, }, resources: [ 'steps', 'floors', 'caloriesOut', 'distance', 'activeMinutes', 'sleep', 'heart' ] ] },
if i try to start magicmirror it doesnt load because he says there is no valid config.
I opened an issue in github for that and Venditteli says there are some issues with the file ownership of any ini file. Any hint or any workaround is very pleased wellcome.Thank you guys.
Regards
Hellangel
Note from admin: Please use Markdown on code snippets for easier reading!
-
Hi Hellangle1978,
Try the below I saw a few errors in the example code;
{ module: ‘MMM-fitbit’, position: ‘top_center’, config: { credentials: { client_id: '123456789', client_secret: '123456789', }, resources: [ ‘steps’, ‘floors’, ‘caloriesOut’, ‘distance’, ‘activeMinutes’, ‘sleep’, ‘heart’ ] } },
Note from admin: Please use Markdown on code snippets for easier reading!
-
i used your code - not working.
I created as followed in instructions an token.ini worked all out no problem.
Just wen pasting the code in my config.js then after that the mirror will not start. Even if i use sudo npm start on desktop.
Mirror is aways asking for an config or an error in my config after pasting that in config :( -
@Hellangel1987 Can you post the config code you’re using please?
-
Im using your code as provided
-
@Hellangel1987
Yes If possible please paste your entire config file as the error might be elsewhere