Skip to content

Added heart rate #44

Open
kgstorm wants to merge 10 commits intodoudar:developfrom
kgstorm:heart
Open

Added heart rate #44
kgstorm wants to merge 10 commits intodoudar:developfrom
kgstorm:heart

Conversation

@kgstorm
Copy link

@kgstorm kgstorm commented Jan 28, 2026

Hello!

I love the new changes you made! The averages/max's are great!
I worked on the heart rate monitor display and its working a lot better now.
Heart rate only shows up if a heart rate monitor is detected.

I also made heart rate and calories clickable so you can hide/show them (instead of having the option to hide/show on the configuration page. i thought that was getting messy). If clicked, they will only show an icon on the big overlay and not appear on the mini overlay. Click the icon on the big overlay again to show the data again.

I only tested with the 2 heart monitors that i own. So theres a lot of room for additional testing. But it reliably picks up my heart rate monitors quickly. I can confuse the system by swapping my heart rate monitors during a session, but even then if i restart grupetto it picks up the new signal right away.

Let me know what you think.

~Kevin

@doudar
Copy link
Owner

doudar commented Jan 29, 2026

I will be a few days before I can review this. Thanks for the PR!!

@doudar
Copy link
Owner

doudar commented Jan 31, 2026

@kgstorm - What's the process for pairing a HRM? Through the system dialog?

Also, it seems that on my Peloton, clicking the speed tile seems to close the calories but they don't reliability re-appear when I click the calorie icon or anywhere else.

@doudar
Copy link
Owner

doudar commented Jan 31, 2026

I've tracked it down. If you're pedaling, the interface works as intended. If you're not pedaling, the touches are inconsistent/not working.

@kgstorm
Copy link
Author

kgstorm commented Jan 31, 2026

It just latches onto the first heart rate monitor it finds. And then if it finds a heart rate monitor it just displays the data so there's no configuration needed. I was thinking of having a set up screen on the config menu, but I figured for a side loaded peloton these aren't going to be in busy gyms, they are going to be single users at their home so I thought realistically there's just going to be one monitor have I tried to keep it as simple as possible.

@kgstorm
Copy link
Author

kgstorm commented Jan 31, 2026

I can't say that I have clicked the speed button at all. I'll play around with it on my machine. In the past two days though I did notice that after about 25 or 30 minutes the overlay crashes. I normally have Firefox up and I'm doing some heavy web browsing while I'm on the bike so I'm not sure if the combination of the two is too much for my device. The old version I was running didn't crash, but it also didn't have all of those averages so I'm not sure if it's my new implementation of the heart rate monitor causing the crashes or potentially the averages. I pulled some data and I'm going to try to analyze it.

@doudar
Copy link
Owner

doudar commented Jan 31, 2026

Awesome! Yes, please check into that and let me know. I just did a 1.5 hour ride and it was stable for me the entire time, but the only other thing I was running was the SmartSpin2k Companion app. I haven't tried the HR. I'd really like to see a selection screen for that, but I share your concerns about the main screen clutter. It's probably getting to be time for a gear icon and a settings screen.

@kgstorm
Copy link
Author

kgstorm commented Feb 2, 2026

@doudar
Can you try this latest commit? (I also added your latest changes)
I think I found the issue with the Calories and Heart Rate touches being inconsistent. The overlay was only updating when sensor values changed.
As for the crash analysis, I believe the OS was killing the process under memory/graphics pressure.

I modified the graph update a bit. It doesn't update when the bike is stopped and I changed the graph update rate to 800ms.

I just rode for 50 minutes while doing a Coursera course on Firefox (where i ran into issues for the past week) and it didn't have any issues.
See if this works for you. And have a think about what specifically you would like to see with the menu options. I personally like that the app just displays the heart rate if a monitor is found and remains unseen if not.

@doudar
Copy link
Owner

doudar commented Feb 2, 2026

Will do. Thanks for your work on this!

Re: graphics pressure, I think I/we need to implement the (entire) overlay updating on a timer. The value stream is very fast and doesn't need to update the ui that fast. It's causing some issues if multiple apps are running. There's already a collector/buffer in bleserver.kt, so that could potentially just be moved and used as a single source of truth.

Re: hrm, I like simple as well but in the past I've tried this approach and it causes more problems than it solves because of multi-family apartments, close neighbors, etc. You end up with more support requests/issues/complaints because it pairs to someone else and then there's no way to change it.

On SmartSpin2k I still have an "any" setting which attaches to the first pm or hrm it detects but honestly I should probably ditch it because it causes quite a bit of confusion. image

@doudar
Copy link
Owner

doudar commented Feb 3, 2026

@kgstorm Looks like you're making good progress. Let me know when you need me to review again for a merge.

@kgstorm
Copy link
Author

kgstorm commented Feb 4, 2026

@doudar
Give it a review now. I tried implementing the overlay on a timer. I'm not sure how much it helped as it still was closed by the OS. But i think the real problem is firefox. I just watched your openpelo video again and noticed the moonlight app you called out. i gave that a try and i think that's likely the solution. just staying away from firefox. I'll keep using moonlight and let you know if it crashes again.
I added the heart rate menu like you wanted, which i also like now that its implemented better. Also, since there is a heart rate menu, i figured theres no need to have the show/hide press option. if you dont want the heart rate, just dont add a monitor. So now if you add a monitor and press on the heart rate, it shows as a graph with optional heart rate zones you can input in the heart rate menu.
~Kevin

@troyloftus
Copy link

Another random data point. I'm using Chrome as a browser watching scenery or GCN cycling videos mostly at 1080p for 60-120 minutes and haven't had any overlay crashes. Thanks again everyone for the contributions to this awesome software! I'm not a proficient coder, but I'm a happy guinea pig for testing when I'm home. I'll load up the latest early tomorrow morning.

@doudar
Copy link
Owner

doudar commented Feb 10, 2026

Just updating this here - I'm holding off on this for now, as I've been having some stability issues with it. I don't think the changes in this PR are specific to it, but they do seem to exacerbate it, probably just due to a bit of increased memory usage. I plan to merge this as I really like the feature, but working on stability for now.

@kgstorm
Copy link
Author

kgstorm commented Feb 23, 2026

@doudar can you send what stability issues you've seen and any data you have so I can take a look?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants