After creating a script for updating wellness data with the Scriptable App (Update Wellness Data with Scriptable iOS Widgets), I created a set of widgets that provide a quick summary of my recent activity, eliminating the need to open a separate app for a brief overview.
Hi, I got your other script to work (to update wellness data). I like the idea of using scriptable for this type of widgets, great idea! I canât get it to work though, I tried âFitness Chart.jsâ but it wonât load. I editted the athleteID and API_key variables. Pressing the script to run results in a interacting button, but no result (no errors either).
I mustâve made a mistake earlier. Adding the log worked, it now shows me the graph perfectly. If I then remove the logging line, it still works. My bad. To make use of all the graphs youâve created, I must update the API_KEY and userID in all files?
Note: Iâm not a professional programmer. Would it be possible to create a shared config.js file that contains the API_KEY and userID, and then refer to config.js from the other files?
Yeah. Thought of that too, as you asked. Will probably add that. Then itâs even easier to share those scripts (without accidentally publishing the credentials)
This is done now. Iâve updated the scripts and added a description for all widgets.
Iâve updated the overview of the last activity. Couldnât remember what icon is what, so added a description of the fields.
Additionaly if you did the route during the last year more than once, it will check your position on this route. It will show a medal, if you are 1., 2. or 3. place on this route.
Finally added a script with weekly distribution of e.g. distance. (see first post for more).
I have synced your git and updated the config file. That seems to work now, but not for all scripts.
Power curve; it ârunsâ but doesnât return a result (I just see the button âactivateâ, but nothing else)
Activity Fields; exception occurred. Error on line 47:92: TypeError: null is not an object (evaluating âactivity.icu_efficiency_factor.toFixedâ)
Totals year; shows me âTotal 2024â, all values are 0 though
Intervals; it ârunsâ but doesnât return a result (I just see the button âactivateâ, but nothing else)
Activity Fields Big; Error on line 49:382: TypeError: null is not an object (evaluating â(activity.icu_power_hr_z2).toFixedâ)
Fitness chart; works as expected, shows Fitness, Fatigue and Form and corresponding graph
Activity Histogram; Error on line 76:39 TypeError: null is not an object (evaluating âactivity.icu_power_zones.mapâ)
Totals to date; runs, but shows âNo activity found.â
Totals weekly; works as expected, shows bar chart of this weeks distance per day
Activity TiZ; Error on line 54:43 TypeError: null is not an object (evaluating âactivity.icu_zone_times.mapâ)
Is this enough information to debug?
Edit: looking back at post #1, it might have something to do with the fact that I donât have any cycling activities (I donât have a watch that logs power for running, skiing, weightlifting/workouts, hiit).