Closed Peakapot closed 5 years ago
@Peakapot
The missing distance icon is caused by a bug in MM 2.6. The fix for this should be included in the next release ( 2.7 hopefully).
Re the chart mode not working. if you change the mode
in config.json, you will need to restart the MagicMirror to pickup the change. If this doesn't help, please turn on debugging by adding debug: true
to the module's config options, restart the MagicMirror again and report what errors appear in the log or console.
@ianperrin Thank you for getting back to me. I had seen that you asked other people to do this so i followed all the advice from this advice.
https://github.com/ianperrin/MMM-Strava/issues/17
my config.js looks like this:
{
module: 'MMM-Strava',
position: 'middle',
config: {
strava_id: 'myID',
access_token: 'myAccessToken',
// mode: 'chart',
units: 'imperial',
debug: true
}
},
This is the out put from table:
Starting MagicMirror: v2.6.0
Loading config ...
Loading module helpers ...
No helper found for module: alert.
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: clock.
Initializing new module helper ...
Module helper loaded: MMM-Screencast
Initializing new module helper ...
Module helper loaded: calendar
Initializing new module helper ...
Module helper loaded: MMM-Strava
No helper found for module: currentweather.
No helper found for module: weatherforecast.
Initializing new module helper ...
Module helper loaded: MMM-History
Initializing new module helper ...
Module helper loaded: newsfeed
All module helpers loaded.
Starting server on port 8080 ...
Server started ...
Connecting socket for: updatenotification
Connecting socket for: MMM-Screencast
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: MMM-Strava
Starting module: MMM-Strava
Connecting socket for: MMM-History
Starting module: MMM-History
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Launching application.
DIAL Server is running on PORT 8569
Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/myemail%40gmail.com/private-mykey/basic.ics - Interval: 300000
Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/myemail%40gmail.com/private-amykey/basic.ics - Interval: 300000
MMM-Strava: Fetching athlete stats
MMM-Strava: Make request: /api/v3/athletes/myid/stats (GET)
Create new news fetcher for url: http://feeds.skynews.com/feeds/rss/home.xml - Interval: 300000
Create new news fetcher for url: https://www.dailymail.co.uk/news/index.rss - Interval: 300000
MMM-Strava: {"biggest_ride_distance":1191080,"biggest_climb_elevation_gain":460.9,"recent_ride_totals":{"count":10,"distance":47962.30029296875,"moving_time":8714,"elapsed_time":9455,"elevation_gain":342,"achievement_count":14},"recent_run_totals":{"count":0,"distance":0,"moving_time":0,"elapsed_time":0,"elevation_gain":0,"achievement_count":0},"recent_swim_totals":{"count":0,"distance":0,"moving_time":0,"elapsed_time":0,"elevation_gain":0,"achievement_count":0},"ytd_ride_totals":{"count":10,"distance":47962,"moving_time":8714,"elapsed_time":9455,"elevation_gain":342},"ytd_run_totals":{"count":0,"distance":0,"moving_time":0,"elapsed_time":0,"elevation_gain":0},"ytd_swim_totals":{"count":0,"distance":0,"moving_time":0,"elapsed_time":0,"elevation_gain":0},"all_ride_totals":{"count":162,"distance":7039561,"moving_time":800173,"elapsed_time":915517,"elevation_gain":44758},"all_run_totals":{"count":274,"distance":2449633,"moving_time":857534,"elapsed_time":1298496,"elevation_gain":25137},"all_swim_totals":{"count":30,"distance":28950,"moving_time":38517,"elapsed_time":57764,"elevation_gain":0}}
Shutting down server...
Stopping module helper: updatenotification
Stopping module helper: MMM-Screencast
Stopping module helper: calendar
Stopping module helper: MMM-Strava
Stopping module helper: MMM-History
Stopping module helper: newsfeed
This loads the information in a table with the distance symbol missing. I understand you are already aware of this. I have reordered my Strava module so it appears before my calendar and the symbol now appears. Thank you for that work around.
If i uncomment mode: 'chart',
and then reboot the pi the output is as follows:
Starting MagicMirror: v2.6.0
Loading config ...
Loading module helpers ...
No helper found for module: alert.
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: clock.
Initializing new module helper ...
Module helper loaded: MMM-Screencast
Initializing new module helper ...
Module helper loaded: calendar
Initializing new module helper ...
Module helper loaded: MMM-Strava
No helper found for module: currentweather.
No helper found for module: weatherforecast.
Initializing new module helper ...
Module helper loaded: MMM-History
Initializing new module helper ...
Module helper loaded: newsfeed
All module helpers loaded.
Starting server on port 8080 ...
Server started ...
Connecting socket for: updatenotification
Connecting socket for: MMM-Screencast
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: MMM-Strava
Starting module: MMM-Strava
Connecting socket for: MMM-History
Starting module: MMM-History
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Launching application.
DIAL Server is running on PORT 8569
Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/myemail%40gmail.com/private-mykey/basic.ics - Interval: 300000
Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/myemail%40gmail.com/private-amykey/basic.ics - Interval: 300000
MMM-Strava: Fetching athlete activity after 1547337600
MMM-Strava: Make request: /api/v3/athlete/activities?after=1547337600 (GET)
Create new news fetcher for url: http://feeds.skynews.com/feeds/rss/home.xml - Interval: 300000
Create new news fetcher for url: https://www.dailymail.co.uk/news/index.rss - Interval: 300000
MMM-Strava: Error performing request (401 Unauthorized). Check the Access Token.
MMM-Strava: Error while fetching athlete activities.
Shutting down server...
Stopping module helper: updatenotification
Stopping module helper: MMM-Screencast
Stopping module helper: calendar
Stopping module helper: MMM-Strava
Stopping module helper: MMM-History
Stopping module helper: newsfeed
I have tried regenerating my Strava Access Token several times to no avail. I have spent hours trying to figure why it wont work in chart mode and i apologise for having to get you involved. Any help you can give me would be great.
Regards
Dan
@Peakapot - this is a curious one as I can't replicate it using my config and access tokens. I suspect it may be due to Strava's recent changes to the authentication model.
I have made some modifications to the develop
branch which fixes changes the way errors are reported when data can't be returned from the API. Could you try the following for me?
cd MagicMirror/modules/MMM-Strava git checkout develop
Then restart your MagicMirror and post the output from the log (again removing any access tokens)?
@ianperrin what ever changes you have made has fixed the problem.
What did you do?
Thank you for helping me with this.
Regards
Dan
Glad to hear it. I’ve merged these changes back into the master branch so you should be able to switch back there and resume normal service!
cd MagicMirror/modules/MMM-Strava
git checkout master
Then restart your MagicMirror
@ianperrin My API Access Token seems to change every few days. How do i keep my config.js up to date with out doing it manually?
Regards
Dan
Hi Dan
Strava have changed their API security which will require an update to the way the module works.
I’m looking into it, sorry can’t give a timeframe right now.
Ian
On 15 Jan 2019, at 18:04, Daniel notifications@github.com wrote:
@ianperrin My API Access Token seems to change every few days. How do i keep my config.js up to date with out doing it manually?
Regards
Dan
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@ianperrin No problem mate
@ianperrin I am having a problem with chart and i have tried all the advice i can find.
Firstly i would like to thank you for a great module. It's awesome.
My module loads fine with
mode: 'table'
however if i change it tomode: 'chart'
it sticks on "Loading". I have tried resettling the pi and various other things.Also my distance symbol doesn't load. I have tried to look in MMM-Strava.css to see where the symbol is loaded from but can only see the symbols for run, cycle & swim. Screen shot attached.
Any help you can give would be great.
Regards
Dan
edited to add some more information,
Sorry should have mentioned i have already run
sudo apt-get update && sudo apt-get upgrade
and i have also run#cd /home/pi/MagicMirror/modules/MM-Strava && git pull
. I am using a pi 3b with jessie and have the lates MagicMirror installed.