Open chrzr opened 14 hours ago
It indeed generates additional data: the recovery heart rate is measured every minute (max 3 times) and added to the notes field for sessions with a HR above 70% MaxHR. I use a simple bash polling for new files in a folder that are older than 3 minutes.
Why convert to a fit file? Garmin accepts our tcx files direcly (used that for years).
Thanks for the quick reply! Ok so this is intended behaviour - but what still confuses me a bit and what also seems to cause the problems with conversion is the following duplicate data at the end of the tcx file (what i meant by additional, probably phrased wrong)
</Activities>
<Author xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Application_t">
<Name>Open Rowing Monitor</Name>
<Build>
<Version>
<VersionMajor>0</VersionMajor>
<VersionMinor>9</VersionMinor>
<BuildMajor>0</BuildMajor>
<BuildMinor>0</BuildMinor>
</Version>
<LangID>en</LangID>
<PartNumber>OPE-NROWI-NG</PartNumber>
</Build>
</Author>
</TrainingCenterDatabase>/Activities>
<Author xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Application_t">
<Name>Open Rowing Monitor</Name>
<Build>
<Version>
<VersionMajor>0</VersionMajor>
<VersionMinor>9</VersionMinor>
<BuildMajor>0</BuildMajor>
<BuildMinor>0</BuildMinor>
</Version>
<LangID>en</LangID>
<PartNumber>OPE-NROWI-NG</PartNumber>
</Build>
</Author>
</TrainingCenterDatabase>
I tried commenting out the code where the Author data is generated, but then I just get the data above as duplicate, which is why I thought that it must have something to do with parallel execution of the function.
Using the tcx directly works - but I also sometimes had to manually remove the last part of the tcx for Garmin Connect to import the file 🤔 I also like that it converts the data to be more rowing specific (strokes, strokes rate, pace etc.)
Thanks for the quick reply! Ok so this is intended behaviour - but what still confuses me a bit and what also seems to cause the problems with conversion is the following duplicate data at the end of the tcx file (what i meant by additional, probably phrased wrong)
This is just plain weird behaviour. In my current setup (which uses Architecture_Revision, but the core tcx writer is the same) I don't see this behaviour.
I tried commenting out the code where the Author data is generated, but then I just get the data above as duplicate, which is why I thought that it must have something to do with parallel execution of the function.
There is a minute in between. That should be plenty of time to recalculate and write any data. Might be that you keep grabbing the file as soon as it is written. Perhaps give it a bit more time to write?
Using the tcx directly works - but I also sometimes had to manually remove the last part of the tcx for Garmin Connect to import the file 🤔 I also like that it converts the data to be more rowing specific (strokes, strokes rate, pace etc.)
Changing the type of session to "Indoor Rowing" always did that trick for me. Another (easier) approach is to see if your Garmin watch supports the indoor rowing ANT+ profile and add a simple ANT+ dongle to ORM. That actually adds data as not only strokerate gets picked up, but on higher end watches also the distance per stroke and breathing.
Ok so the tcx file is only generated after pressing the reset/end session button? My script indeed only waits 10 seconds after the file is created before triggering the conversion, so I'll up that to 120 seconds just to be safe.
What is weird is that I have older tcx files where I didn't have any watchdog script running and there I see the same duplicate data - maybe I'll try and setup a second SD card with a fresh install to see if it shows the same behaviour 🤔
I actually have a Garmin Instinct 2X and I already have an ANT+ dongle connected for HR monitoring - I'll have to check if my watch supports it. That would indeed make things a bit easier :)
Ok so the tcx file is only generated after pressing the reset/end session button?
It is also generated on a stop or pause.
My script indeed only waits 10 seconds after the file is created before triggering the conversion, so I'll up that to 120 seconds just to be safe.
Yeah, although your next paragraph suggests it isn't due to a too quick pickup.
What is weird is that I have older tcx files where I didn't have any watchdog script running and there I see the same duplicate data - maybe I'll try and setup a second SD card with a fresh install to see if it shows the same behaviour 🤔
In the new architecture it is nicely separated. I am considering a complete rewrite of the tcx recorder as its structure isn't easy to read/understand. I am still thinking about adding a native fit-file writer as it can contain more data than tcx, but it isn't the easiest format to create.
I actually have a Garmin Instinct 2X and I already have an ANT+ dongle connected for HR monitoring - I'll have to check if my watch supports it. That would indeed make things a bit easier :)
That is way cooler if it works. Switched to that approach when @Abasz made it, never looked back.
Hi!
First of all thanks to everyone involved in creating this great piece of open source software 👏 I got my first waterrower, a Joroto MR380, a few weeks ago and was able to retrofit it with ORM in just a few hours.
I also wanted to automate the upload of my acitivities to Garmin Connect, so I created a service which uses inotifywait to trigger the conversion of the .tcx to a .fit file and also the upload to Garmin Connect.
The problem I am currently facing is that sometimes there are additional entries at the end of the tcx file created by ORM.
If I manually remove the additional entries the conversion to .fit and also the upload works without any problems.
I already tried looking for and adapting the corresponding code, which I found in WorkoutRecorder.js, but I just could not fix the issue. In the logging of openrowingmonitor service I see that there are multiple lines regarding the creation of tcx files which I suspect might be the problem here?
Could it be that the corresponding function is called multiple times in parallel causing the additional entries in the tcx?
Any ideas would be appreciated!
Kind Regards, Christoph