Good find!
Looks like there is a small coding error when using non-standard fields. The charts don’t use the custom fields. But the Training Advice was using the correct numbers.
@Inigo_Tolosa will surely correct this one quickly.
@Marcos_Dominguez I am not sure about what issue you are experiencing.
Training advice and trend plots are using same source data, that corresponds to the fields you have set in config_athletes.m. In fact these data is requested only once from intervals.
FIELD_rMSSD = "hrv"; % modify only in case you want to pull the value from a custom field
FIELD_SDNN = "hrvSDNN"; % modify only in case you want to pull the value from a custom field
FIELD_RHR = "restingHR"; % modify only in case you want to pull the value from a custom field
Lines you have modified are not relevant and only intended to provide default values just in case the config_athletes.m doesn’t assign any value to this variables.
So the script will finally use what you have writen in config_athletes.m
PopulateImReady4.m is pushing only historical training advise to your intervals account, but not any rMSSD, SDNN nor RHR as ImReady4 doesn’t know this info if it has not been previously received from intervals.
So, check how long in the past you have data for HrvSnapshotRmssd, HrvSnapshotSdrr and RestingHRSnapshot.
I may be wrong, but I’d say that you started to fill these fields 3 days ago.
Apologies if I missed this somewhere else in the thread, but by SDNN doesn’t appear to be populating? Is there some toggle that I need to turn on? My understanding is that it’s a calculated field, so I’m not sure what I’m missing. Appreciate your help.
I’m also getting some errors when I try to back fill training advice. I have updated my config to below. Any thoughts?
trainingAdviceMustBeSentToIntervals = true;
PopulateImReady4
Enter number of days to be populated:
5
Populating training advice since: 2023-10-01
2023-10-01 – ERROR sending Training Advice
2023-10-02 – ERROR sending Training Advice
2023-10-03 – ERROR sending Training Advice
2023-10-04 – ERROR sending Training Advice
2023-10-05 – ERROR sending Training Advice
After debugging a bit, I get an error on line 187 in PopulateImReady4.m.
The server returned the status 422 with message “” in response to the request to URL
https://intervals.icu/api/v1/athlete/iXXXXXX/wellness/2023-10-01.
Error in [webwrite](matlab:matlab.internal.language.introspective.errorDocCallback(‘webwrite’, ‘/MATLAB/toolbox/matlab/external/interfaces/webservices/restful/webwrite.m’, 139)) ([line 139](matlab: opentoline(‘/MATLAB/toolbox/matlab/external/interfaces/webservices/restful/webwrite.m’,139,0)))
[varargout{1:nargout}] = readContentFromWebService(connection, options);
SDNN is not calculated by the matlab script, but pulled from intervals. If it is not shown, it is probably because it is not present in the standard field used by intervals for it. In case you use a custom field to record SDNN, you can set it using the parameter
FIELD_SDNN in MATLAB
To push training advice to intervals, you need to activate custom wellness field training advice shared by @MedTechCD
Ok, thank you. I wonder if I don’t have my garmin forerunner 255 measuring SDNN? Or where can I check in intervals to see if it’s being collect?
RE: custom wellness field - Yes, I had enabled the custom wellness field prior to running the script.
Ah, I found an old wellness file I had downloaded. Looks like hrvSDNN isn’t being captured/recorded by my garmin watch? Is there a setting to turn that on?
You need both the Custom chart and the Custom Welness field.
Ah! Brilliant! Thank you!
Don’t know if you already got this fixed but you first need to copy the folders to your own MatLab drive.
Hi all, is there a way to automate the execution of the ImReady4 Matlab script? Or does everybody execute it manually every day?
I run it manually, daily.
If I miss a day, for whatever reason, the Populate script can run any number of days in the past.
Hi all,
since I haven’t got Matlab I ported the script to Python. You can find it here.
It downloads the wellness data from the Intervals Api and plots it in a graph. This plot gets saved as figure. The TrainingAdvice Code gets also uploaded to Intervals.icu via Api. The credentials must be stored in a separate file called .env
. It also requires some python libraries. You can install them with the command: pip install numpy pandas requests matplotlib python-dotenv
.
You could easily execute this script with Cron on Linux or with Taskscheduler on Windows to run every day. This would make automatically update the Chart within Intervals.
Is there a way to write own charts directly for Intervals? I would love having this in Intervals without any external programs involved.
This is the output:
Nice work. One more alternative.
For this kind of chart, there’s only one place you may be able to add it in Intervals and that’s on an activity. It doesn’t sound like the ‘correct’ way but the Activity Power, HR or Pace pages allow the use of JavaScript and Plotly charts.
The documentation on how to use it is here:
Hi, I found today in “CIQ” such an application for Garmin smartwatches:
I am not the author, just sharing the find
regards
Artur
Thanks for sharing this and also for the rating
I wrote it. It’s just another way to show the wellness data from intervals. But on Garmin devices. The z-scores are fetched from the Intervals api, calculated locally and plotted every time on app startup. It uses the rolling mean/std of the last 30 days.
The source code lives here on GitHub.
Ohh, excellent script, and yes, this needs to be in a cron! On Debian at least you can then install the mailutils
package and then use this command to email the result to yourself in the morning:
mail --content-type=image/png -A Imready4.png -s "ImReady4" YOUR@EMAIL.ADDRESS < /dev/null
I guess I’ll just run it at a late enough time in the morning, or alternatively figure out how to see through the Intervals API whether I’m awake yet (check for a sleep score?).
Hi, is there a way to get that App running on my Fenix 6?