possible to get HR log and IBI at the same time?
Thanks for pulling this library together. I'm very psyched to get it working.
I've been able to get it up and running for HR logging purposes. Unfortunately, I've been unable to get the IBI file to write (or even get created). here's the current XML config:
<?xml version="1.0"?>
<HeartRateSettingsProtocol xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Version>1</Version>
<FontName>Arial</FontName>
<UIFontName>Arial</UIFontName>
<UIFontStyle>Regular</UIFontStyle>
<UIFontUseSize>false</UIFontUseSize>
<UIFontSize>20</UIFontSize>
<UIWindowSizeX>350</UIWindowSizeX>
<UIWindowSizeY>250</UIWindowSizeY>
<UITextAlignment>MiddleCenter</UITextAlignment>
<AlertLevel>70</AlertLevel>
<WarnLevel>65</WarnLevel>
<AlertTimeout>120000</AlertTimeout>
<DisconnectedTimeout>10000</DisconnectedTimeout>
<Color>FFADD8E6</Color>
<WarnColor>FFFF0000</WarnColor>
<UIColor>FF00008B</UIColor>
<UIWarnColor>FFFF0000</UIWarnColor>
<UIBackgroundColor>00FFFFFF</UIBackgroundColor>
<UIBackgroundLayout>Stretch</UIBackgroundLayout>
<Sizable>true</Sizable>
<LogFormat>csv</LogFormat>
<LogDateFormat />
<LogFile>\\wsl.localhost\Ubuntu\home\tedals\projects\tangy-temp\data\hrmonitoring\tslade-%date:yyyyMMdd_hhmm%-hrlog</LogFile>
<IBIFile>C:\Users\tslade\OneDrive - Research Triangle Institute\Documents\hrmonitoring\tslade-ibilog.txt</IBIFile>
<HeartRateFile />
<UDP> </UDP>
</HeartRateSettingsProtocol>
A prior iteration had the <IBIFile> entry as \\wsl.localhost\Ubuntu\home\tedals\projects\tangy-temp\data\hrmonitoring\tslade-%date:yyyyMMdd_hhmm%-ibilog, but that file never got created. I tried to trigger something via the right-click context menu in the UI and was unable to make it work because the Windows Explorer interface choked on the %date...% in the filename. So at that point I figured I'd simplify both the filename and the location on disk, but no joy.
Any suggestions?
A lot of this wasn't very fresh in my memory so I dug into it some. The ibi file can only be created if RRIntervals are present from your heart rate monitor, which isn't always the case.
I assume your LogFile is being created still? If it looks like this:
12/4/2025 10:49:36 AM,20,Contact,,""
12/4/2025 10:49:36 AM,30,Contact,,""
that last column is where the RRIntervals goes. You can see mine lacks it. If yours also has "" then it can't write an IBI file unfortunately because that's the data it's based on, and you need a heartrate monitor that supports this.
I did verify using \\wsl.localhost\ubuntu18\home\joe\test.txt worked on my system, so it's not that style of pathing.
internal sealed class IBIFile : FileWriter
{
public IBIFile(string filename) : base(filename)
{
}
public override void Reading(HeartRateReading reading)
{
if (!HasFileWriter) return;
if (reading.RRIntervals == null) return;
if (reading.RRIntervals.Length == 0) return;
if (reading.IsError) return;
AppendLine(string.Join("\r\n", AsMS(reading.RRIntervals)));
}