Read the statement by Michael Teeuw here.
Fitbit
-
This is my output of getData.py
pi@Magic-Mirror:~/MagicMirror/modules/MMM-fitbit/python $ sudo python getData.py {"message": "credentials.ini exists", "type": "status"} {"message": "Reading from credentials.ini", "type": "status"} {"message": "Read of credentials.ini successful.", "type": "status"} {"message": "credentials.ini exists", "type": "status"} {"message": "Reading from credentials.ini", "type": "status"} {"message": "Read of credentials.ini successful.", "type": "status"} {"message": "tokens.ini exists", "type": "status"} {"message": "Reading from tokens.ini", "type": "status"} {"message": "Read of tokens.ini successful.", "type": "status"} {"message": "Making API call", "type": "status"} {"message": "API call okay", "type": "status"} {"message": "Tokens valid", "type": "status"} {"values": {"data": 1649, "goal": 10000}, "resource": "steps", "type": "data"} {"values": {"data": 0, "goal": 1}, "resource": "floors", "type": "data"} pi@Magic-Mirror:~/MagicMirror/modules/MMM-fitbit/python $
-
For a little ways now, I’ve been running into an issue where, after running for a day or so, the module stops being able to update. It seems that it’s failing --for some odd reason-- to write the new Refresh Token, so when the Access token is expired, it needs to be re-authorized. I’ve looked through the code and I don’t know a whole lot but I cannot figure out why it’s doing what it’s doing. For now, I have this shell script set to run every night, and that seems to keep it running well enough. I’m sure there’s a better way but until I can get around to learning more, the kludgy way will do.
#!/bin/bash export DISPLAY=:0 pm2 stop MagicMirror python ~/MagicMirror/modules/MMM-fitbit/python/setupAccess.py killall chromium-browser pm2 start MagicMirror exit 0
The first line is there so that it can be run manually over SSH. I did have to log in manually once, but I just told chromium to remember me, so now I don’t have to do anything to re-grant access.
If anyone has a better fix, I’d love to hear your thoughts!
-
Hi.
I start the setupAccess.py and i have got an Error from Chromium Browser.
In the Message stands the the Chromium Browser starts as normal user and not as root.
How can i fix it ?
Sandy
-
Has anyone managed to get this installed on a Raspberry Pi Zero W using Jessie Lite?
When running setupAccess.py I can’t get anywhere as it doesn’t open a browser window so I can’t authenticate.
Any help appreciated.
-
@pyrosmiley I had the same issue and I could change it by setting new rights for the tokens.ini file. Set the rights for write to all (before this only for root access) and the new token can be written. Update works now, let’ see how long …
-
Hello all,
Newbie here. I know I am late trying to put together a MagicMirror, but I just discovered this! Anyway, I am trying to put this Fitbit module on mine, and I when I run “sudo python setupAccess.py”, I get a “python: can’t open file ‘setupAccess.py’: [Errno 2] No such file or directory” error.
I am not sure where I have gone wrong here, as I have followed the instructions thus far found here:
https://github.com/SVendittelli/MMM-fitbit/blob/master/README.md
Any ideas?
Thanks.
-
I fixed it. Newbie mistake, I was in the wrong directory when I tried to excute the command. Having problems now trying to get my steps to show, so I have pouring over all of the info here in the forum…thanks to all who have posted here
-
I got it to work! Great module!
-
Hi! I too am new to MagicMirror (and programming in general) and am trying to install the Fitbit module. Maybe as you have done it so recently you could help me please?
When I enter:
sudo pip install -r python/fitbit/requirements.txt
I get the following error message:
Could not open requirements file: [Errno 2] No such file or directory: ‘python/fitbit/requirements.txt’
Any idea what I am doing wrong or what I need to do?
Thanks!
-