Read the statement by Michael Teeuw here.
Fitbit
-
3 days of syncing without an issue. Not sure what changed, I did pull the latest dev code for MM but made no changes to the fitbit module.
(of course now that I’ve said this, it will error out during the day :) ) -
Had my first issues in a while last night. The problem was that my router lost internet connection and when it was restored the tokens were expired. I ran the setupAccess.py and got new tokens.
Seems that there should be a better way to reset the module on restart, like if the tokens are expired, the go get new ones. -
The python that accesses the fitbit API is currently having that functionality added, I’m doing some work at the moment to help with install issues and once the work on
python-fitbit
is complete I’ll update again. -
results: [{"message":"Writing credentials to credentials.ini","type":"status"},{"message":"Writing id: 227Z5P and secret: 55b8d28e28533664a52c6ec6a25b51f0","type":"status"},{"message":"Credentials write successful","type":"status"}] nop 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:215: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
i noticed that my mirror stopped getting data updates. it works yesterday but not today, can you help me identify where went wrong?
Note from admin: Please use Markdown on code snippets for easier reading!
-
@chengstark,
Possibly the internet connection was lost during a refresh, this will cause the tokens to get out of date.
I stop MM, re-run the “setupAccess.py” script using credentials from the file, then re-start MM and all is fine, until the next time I have an internet hiccup. -
@kckndrgn thanks, will try
-
I have released a fix for the
.ini
files problem in the latest version on GitHub. You’ll need to delete yourtokens.ini
andcredentials.ini
files and remake them (as well as performing agit pull
) for the fix to be effective. -
For some reason, I’m getting calories displayed, but nothing else. @Vendittelli, does the module have any additional debugging or logging that I can turn on to look through? - I’m not getting any issues in dev mode or in the terminal - it seems that’s the only data I get. When I look in the dev console, I see:
writing steps (data/goal): 0/10000
Writing floors (data/goal): 0/10
writing calories out (data/goal): 1664/2930
writing distance (data/goal) 0/5
writing activeminutes (data/goal): 0/30
writing sleep (data/goal): 0/480When I clear down my tokens.ini and re-run the setupaccess.py, I can see the scope information for the token results includes u’social’, u’settings’, u’profile’, u’sleep’, u’activity’, u’heartrate’, u’weight’, u’nutrition’, u’location’
if that’s helpful…
As a slight aside: @olliewarren411, would you mind sharing your ‘vertical-layout’ css? I’m still trying to get my head around cascading style sheets! -
@darrene That is weird. The module is pretty unadvanced so I don’t have proper debugging, unfortunately. The scope looks correct, are you sure you have synced your Fitbit today? It would explain why calories are displayed as they are calculated automatically so you don’t need to sync them.
-
Thanks for the quick reply @Vendittelli - that could be the answer. I didn’r realise the calories were calculated like that - as you say, it’d certainly explain it.
I’ll have a look into it. If it comes to it, I’ll recreate the app - I seem to remember there are a list of tick boxes for the fitibit attributes and on the pi browser, it was really difficult to tell whether or not they were ticked!