First of all a big thanks to Samuel Dumont who gave me a start for this project.
The first step is to create a folder where you will store all your files.
- On Linux it will look something like this /home/pi/CowboyMauro/
- On Windows it will look something like this C:\Users\mauro\Documents\CowboyMauro\
After you created this folder, download all the files and extract them in here.
(You can delete the README.md)
In the Cowboy-Info.json file write down your Cowboy email and password.
Create a Strava application. This is how you do it:
Create.Strava.Application.mp4
In the Strava-Info.json file write down your Strava client_id and your client_secret from the application you just created.
Open your browser and go to this URL: https://www.strava.com/oauth/authorize?client_id=YOURCLIENTID&redirect_uri=http://localhost&response_type=code&approval_prompt=auto&scope=activity:write,read
DONT FORGET TO CHANGE THE CLIENT ID
Click Authorize.
Copy YOUR code in the search balk
Open Postman, create a post request to https://www.strava.com/api/v3/oauth/token with these params:
Key | Value |
---|---|
client_id | ReplaceWithYourClientID |
client_secret | ReplaceWithYourClientSecret |
code | ReplaceWithYourCode |
grant_type | authorization_code |
Click the big blue SEND button.
Click Save Response, Save to a file:
Put it in your folder as Strava-Token.json
Make sure that you have Python 3 installed.
Also make sure that these libraries are installed:
- Lxml
- Python_dateutil
- Requests
To import the Node-RED files, you just do this:
2022-04-02.17-24-05.mp4
All you need to do now is for every block that says: CHANGE FILE LOCATION, open that block and change /home/pi/CowboyMauro to the path from the folder that you created at the beginning from this manual.