-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental: ANT+ / BLE support for speed #89
base: main
Are you sure you want to change the base?
Conversation
Support for Speed data via ANT+ / BLE
Test single ANT+ server
I managed to get PWR and SPD working at the same time over ANT+:
|
@chriselsen - Hi Chris, I have the upgraded Keiser computer which shows speed - if it’s any use I’m happy to test speed at various watts this evening to compare with peloton graph referenced - I’m assuming it likely works similar to the peloton calcs as the bike has no idea of users weight etc??… |
@nealjane The speed formula for Peleton is based on this article. If you can come up with a similar formula for the Keiser bike, I can definitely implement that. You probably want to get started by graphing displayed speed at various power levels to see if you spot a pattern/formula. |
Hi @chriselsen, Yes - Id seen that article before when I saw your referenced to it in the peloton file - Ive just taken down the speeds and power from my Keiser and its pretty much the same as the Peloton! see attached pdf doc. |
@nealjane Just pushed an update to the Keiser bike driver that calculates speed the same way as the Peleton. Give it a try. |
That’s fantastic Chris!! Will def give it a go tomorrow 🙏 👏👏👏 |
“But as the PWR profile already provides cadence, the SPD profile seemed sufficient.” Just thinking - users with lower spec Garmin watches that don’t have ‘Power profile’ and so won’t see the cadence within the power profile on Ant+ - and so will only get ‘speed’ in that case?? - is this correct? |
Improved readability for ANT+ SaC implementation Improve readability of Peloton + Keiser Power to Speed conversion Improve ANT+ stability
@nealjane Change the ANT+ SPD profile to SaC (speed and cadence). You can now get Speed also without using the power profile. |
That’s great Chris - wasn’t really for my benefit - there’s been a few wanting it on here who have lower spec garmins - so means it’ll work for all Garmin users hopefully👍🏻 Did try and install your update today (spent far too long trying to solve the issue) |
@chriselsen , ok, got it working with fresh eyes this morning.! the new Keiser computer (with Bluetooth converter now built in) clearly has more power and I thinks it’s interfering with Gymnasticon (had to move Gymnasticon closer to bike since I fitted it and still get intermittent drops in power over ant), so I may just replace it with my older computer this am - just for avoidance of doubt. CaS appears under ant sensors on watch, adding shows all power, speed and cadence in indoor bike on my fenix. It tends to loose connection (but I’m putting this down to the new Keiser computer and will see what happens when I swap computers this am) connecting to the Bluetooth on Gymnasticon - zwift/RGT- power drops to zero intermittently on my iphone (both apps have power buffer set to zero). these issues could be connected to the new Bluetooth Keiser computer (although I’ve never had the Bluetooth power dropping to zero previously. |
I found Fulgaz, which shows speed via BLE. But for whatever reason it shows speed of 0 km/h via BLE CPS, even if it is not present (CPS feature set to 0x08). With wheel rotation data present and the CPS feature set to 0x12, it still shows a speed of 0 km/h. I wonder if other software is having similar issues: Seeing the correct speed via BLE CSC and additional non-existent speed of 0 km/h. I pushed one more change, which completely disables speed via CPS. Receivers should therefore only see it via CSC. What's also odd is that my Garmin watch recognizes the BLE CSC service, but then ends up only displaying cadence and no speed. |
Only had time for a quick test of the update this am (kids half term here this week- so won’t be able to do anything until Thursday eve after today - sorry)- think you’ll have some other testers this week as I messaged a few others who were interested in Speed for Gymnasticon. 🤞 good news is - current update has cadence working correctly back in Peloton and RGT. 27/10 - still working perfectly, done a couple of rides and no issues at all with ant connection to my Fenix 6. I’ve tweaked the peloton equation a little for the keiser and it’s now pretty much spot on ..will test for longer when I’ve got over my cold.. - did find this as an alternative speed/distance on github (attached) |
Just to let you know everything seems to works perfect with my IC4 bike and Fenix 6 over ANT (so, power, speed and cadence). I only need to do a last test with my wife Vivoactive 4s as it does not support the power profile, so she need speed and cadence over ANT. I will let you know but if this works, this PR solved everything for me! |
Excellent news! I also did a few hundred km with an IC4 bike and ANT+ to a Garmin watch. Works great. |
This is what I'm seeing too. I can see speed fine when paired over BLE with the Kinetic Fit app, just not on my watch (FR745). I don't have an ANT stick so was hoping to get BLE to work. |
I just found this update a few days ago and implemented everything. I have a Keiser M3i with the older computer that required the M Series Connector and a new Garmin Fenix 6 Pro. When I first set this up, I still had my Connector on for my first few rides. I saw the same dropouts that @nealjane was reporting with the new Keiser computer. I disconnected the M Series Connector and then everything has been running fine for me with very few dropouts during my rides. I'm very new to Garmin (long time Polar user) and don't know too much about ANT+. Is there anything that can be done to have it play nicely with Bluetooth? I tried two different lower cost ANT+ USB Sticks (CHILEAF and LIVLOV) because I wasn't willing to spend $50 on the Garmin version. Is it just the ANT+ signal that is a problem in a Bluetooth environment? |
Hi Cris, chileaf and livlov are basically the same ant+ dongle , it’s the brand I’ve mentioned to a couple of people on here /M3i fb group(basically they look different to the poor performance anself and clones which people have had issues with over last few years.) the new M connect computer drops in power signal over ant+ is a different matter - so just don’t upgrade if you need ant+! |
Hi Neal, thanks for the clarification. I'm glad to hear the chileaf/livlov are good to use; I really didn't want to spend more on the Garmin one. I have the Bluetooth converter; I have since pulled it out of usage (I wasn't getting the Gymnasticon cadence on the Peloton app, so was still using it; realized I had mistakenly used Gymnasticon as a sensor on my Garmin watch, which I fixed and now can see cadence on the Peloton app from Gymnasticon). I am still getting some interference when my wife is in the gym at the same time, which I attribute to other Bluetooth signals present at the same time. I'll try getting the ANT+ stick closer to my watch and see if that helps. I had it tucked away in our workout area. Thanks for the suggestions! |
I've had a lot of success with the Ant+ stick closer to my watch. I do still have occasional disconnects, where the Garmin watch loses the sensor and then reconnects, so only missing a very small amount of data. Not a huge deal to me. If I wanted to put gymnasticon in debug mode where it creates a log file, how would I do that? I've tried reading everywhere here but can't find it. |
Stop Gymnasticon first -
then restart with following (not log file- but closest thing to it) -
|
@crissag -Change this in keiser.js file which will reduce the drops to 0 over ant+ (try 2 seconds instead) - const KEISER_STATS_TIMEOUT_NEW = 1.0; // New Bike: If no stats received within 1 sec, reset power and cadence to 0 |
@nealjane My kesier.js file had this set to 2; It must have been updated in this branch. I also remembered how much I hated the vi editor. |
Hello, long suffering metric-less Garmin and Peloton user here who just wanted to thank you for all the work and report that this branch is working great for me. I'm using a FR745 and am using this ANT+ adapter on a Raspberry Pi 4. Here's a nice example of the metrics reported to the watch aligning with what the bike recorded itself: I'm using all the cabling as described in #12 but do not have the Bike TX connected to the tablet -- when I did that the metrics were correct on my watch but continually dropped out / maxed out on the bike like this: |
@nealjane Thanks for the pointer to this branch. @chriselsen I followed the instructions and got my Pi pushing cadence stats to my Garmin Edge 25 from my IC4 bike. I didn't check which profile gymnasticon selected but for some reason speed was not published (heart rate came from a separate sensor paired directly to the Edge). I'll re-run with debug mode on and see if speed shows up, but otherwise this worked great. Thank you! |
I’m not sure that it works over Bluetooth - ant+ speed should be working though. 👍🏻 |
@nealjane Did setting this to 3s solve your issues with the new Keiser computer as well? I had thought about setting this higher, but the dropouts were less of an issue for me when I moved the pi closer to my watch. |
@crissag - try 3s and see if it sorts out the dropouts if you’ve already got ant+ as close as you can to the bike. |
Turns out I forgot to select "Indoor Mode" on the Edge once the sensors were connected. Speed shows up now along with the other stats. Thanks all! |
With most recent RPi image I am getting I skipped that part and tested the rest with Garmin + IC4. Works like charm! GJ |
Answering my own question with another question. Is it possible that the changes from #58 are not present in the latest img as linked from the README.md ? At least that's where I got my image and it does not have |
That command didn’t work for me either, but current version is write protected etc - I just use raspiconfig to write/lock the image when needed/which works. ptx2 hasn’t been around in almost a year now - so don’t think there will be any furthet updates to the current Gymnasticon without him - Chris Elsens speed additions for ant+ are here though. |
Okay, thanks for clarifying! So, in order to do changes you disable the overlay FS with |
Just wanted to say THANK YOU and also want to update @chriselsen and all others contributers that I've tried this on Flywheel bike and it is reporting speed to my Garmin 520 over ANT+ (can't check BLE as I don't have a head unit that can read BLE signal) so you can cross one of the issues in your list. Not sure how accurate the speed value is, but seems high for the power I am generating. Below are some data points. I am using "power-scale":0.9 parameter in the config file to reduce the power reported to my head unit as I found out my spin bike seems to report about 10% more watts than my friend's high end TACX smart trainer when I did a quick test ride side by side. Even if I don't use the "power-scale" parameter the speed seems high. I know this isn't your doing as you are just reporting whatever the bike is spitting out, but one suggestion would be to add "speed-scale" and "speed-offset" parameter for us to play with to fine tune the values to fi these type of issues. Thank you once again! |
The Flywheel bike should be providing the speed via Bluetooth to Gymnasticon. Therefore Gymnasticon only passes through to ANT+ whatever it receives. |
Thanks for the response. I noticed gymnasticon sends the data as Spd/Cad sensor rather than just Speed sensor. If I search under Speed Sensor for Garmin 520, it can't find it, but it will find it under Spd/Cad sensor. Not sure if this has any overlap with Power sensor as this also provides Cadence. Also I did notice few power drops to zero and speed going to ~4 mph intermittently, but I am not sure what is causing this. I don't recall having this issue before installing this branch (at least for power as I didn't have speed data before). The ANT+ is right below the Garmin head unit so I don't think it is a distance issue from the ANT+ dongle. I'll keep monitoring as I ride and report back any issues with Flywheel bike. Any idea what maybe causing this would be appreciate it and if you need anything from me let me know. Below graph shows overlay of speed vs. power (speed is the area graph and power is the dark line graph). As you can see, power drops to zero 3x times, but speed drops to ~4 mph at many instances. |
Tries to address #75 by:
Changes:
Conscious decisions:
Issues:
Unable to get ANT+ PWR and SPD working at the same timeIt appears that the required different broadcast intervals for PWR and SPD lead to a collision of messages at some pointTo try this out:
overctl -rw
Provide output if things are not working
@ptx2 Would be great if you could have a look at the BLE GATT CSC part.