ptx2 / gymnasticon

Make obsolete and/or proprietary exercise bikes work with popular cycling training apps like Zwift, TrainerRoad, Rouvy and more.
https://ptx2.net/posts/unbricking-a-bike-with-a-raspberry-pi
MIT License
297 stars 38 forks source link

Experimental: ANT+ / BLE support for speed #89

Open chriselsen opened 2 years ago

chriselsen commented 2 years ago

Tries to address #75 by:

Changes:

Conscious decisions:

Issues:

To try this out:

overctl -rw

sudo apt-get update --allow-releaseinfo-change
sudo apt-get install git
cd
git clone https://github.com/ptx2/gymnasticon.git
cd gymnasticon
sudo service gymnasticon stop
sudo setcap cap_net_raw+eip $(eval readlink -f $(which node))
git fetch origin pull/89/head:antble-speed
git checkout antble-speed
npm install
npm run build
npm link
gymnasticon

Provide output if things are not working

@ptx2 Would be great if you could have a look at the BLE GATT CSC part.

chriselsen commented 2 years ago

I managed to get PWR and SPD working at the same time over ANT+:

nealjane commented 2 years ago

@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??…

chriselsen commented 2 years ago

@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.

nealjane commented 2 years ago

@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. Keiser is clearly working out the speed from a table as the speed only increases when the power increases to the next threshold. keiser speed.pdf

chriselsen commented 2 years ago

@nealjane Just pushed an update to the Keiser bike driver that calculates speed the same way as the Peleton. Give it a try.

nealjane commented 2 years ago

That’s fantastic Chris!! Will def give it a go tomorrow 🙏 👏👏👏

nealjane commented 2 years ago

“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?

chriselsen commented 2 years ago

@nealjane Change the ANT+ SPD profile to SaC (speed and cadence). You can now get Speed also without using the power profile.

nealjane commented 2 years ago

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)

nealjane commented 2 years ago

@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.

nealjane commented 2 years ago

@chriselsen replaced Keiser computer with older one (no built in ftms Bluetooth just BLE) and it’s working much better - Garmin picked up power and CaS immediately. Had no drops in ant connection (see attached). 2D5D5107-5996-445C-B2CD-AC7F70417BD8. Speed is 9B7081ED-19AC-49B7-AE82-FF9EF3DADF1B a little lower ~2mph at low power, but pretty much same at higher power.- so great job!

Zwift still doing the power drop to zero intermittently - coinciding with ‘stats timeout: restarting BLE scan’ on Gymnasticon readout. (See pic) 8210AB6B-1F03-4CE3-9B19-4AED8DC7B012 Think I’ll stick with the older computer - ant ‘power’ hasn’t been that clean (no drops) since I fitted the new computer!👏

chriselsen commented 2 years ago

@nealjane For the intermittent power drops to 0: That's easy to fix. Just change the value for KEISER_STATS_TIMEOUT_NEW from 1.0 to 1.5 in the file "src/bikes/keiser.js". The re-build and try it again. I can include a separate Pull request that fixes that.

For the new console: If it doesn't use BLE Beacon but FTMS instead, Gymnasticon will probably detect it as an IC4 bike instead of the Keiser. I'm not surprised that you are running into issues with that. You would need to create a new issue and provide a bunch of log files to get this working.

Your speed and cadence output via ANT+ look pretty good (outside the speed drops due to the power drops). Let me know if you see any more funky things.

nealjane commented 2 years ago

Great, Will have a go at what you suggested. (Changing timeout )- although it has been working flawlessly for past 6 months on original setting

New computer still gives off the original BLE beacon as well as the ftms. I’m sticking with older computer as Gymnasticon does everything I need ant and now (with speed added)for connection to my Garmin watch. Fabulous work Chris - again!👏👍🏻

nealjane commented 2 years ago

@chriselsen Altered timeout to 1.5 and it definitely helped - still had 6 timeouts within 7 minute ride - so may just try 2s.

2s and all the drops are pretty much gone. Speed is a touch out vs the ones I recorded the other night - but that’s just a case of finding a wheel diam in sensor settings that works - which I can do over next few days - fab! 🙏

chriselsen commented 2 years ago

@nealjane Just pushed another change with a bunch of smaller improvements, including the timeout fix for the Keiser bike. You should try setting the wheel diameter to 2.096 meter, which corresponds to 700x23C. If the speed is still out of sync, the power->speed formula needs adjustments.

chriselsen commented 2 years ago

Good catch! I fixed it above. The current branch is called antble-speed.

nealjane commented 2 years ago

Tested this am with current update you pushed last night.

SPEED over ANT Fenix saw power and speed instantly over ant (power/watts needs to get up to ~26 before it shows any mph - otherwise it doesn't show anything, you wouldn't know it was connected on the watch screen (which took me while to realise the other day!) Ive updated the graph I did previously and overlaid Gymnasticon on top of original Keiser speeds/ peloton graph. It looks like Gymnasticon speed is ~3mph lower than peloton/keiser currently. I've double checked Power shown on Keiser computer and over bluetooth/ gymnasticon and it matches so reading are right (as close as I can get with a moving target anyway) - wheel was set to 2.096m

No dropouts over bluetooth seen on Zwift with the 2s.

keiser speed vs Gymnasticon.pdf

nealjane commented 2 years ago

Realised its probably best to take the Fenix (wheel size) out of the equation! - so I've run Gymnasticon with Debug to check speed vs power and Ive update the graph (attached),- could it be using the P<26 for all power calculations??

ill post debug text separately keiser speed vs Gymnasticon Debug.pdf

nealjane commented 2 years ago

NODE_DEBUG=gymnasticon:bike* gymnasticon --bike keiser [2021-10-21T10:53:52.176Z] connecting to bike... Keiser M3 bike version: 6.38 (Stats timeout: 2 sec.) [2021-10-21T10:54:14.526Z] bike connected d8:b0:b5:6a:ce:3b [2021-10-21T10:54:14.614Z] ANT+ stick opened [2021-10-21T10:54:14.805Z] received stats from bike [power=20W cadence=65rpm speed=0km/h] [2021-10-21T10:54:14.829Z] pedal stroke [timestamp=1634813654810 revolutions=1 cadence=65rpm power=20W] [2021-10-21T10:54:15.129Z] received stats from bike [power=20W cadence=65rpm speed=0km/h] [2021-10-21T10:54:15.450Z] received stats from bike [power=20W cadence=66rpm speed=0km/h] [2021-10-21T10:54:15.720Z] pedal stroke [timestamp=1634813655719.0908 revolutions=2 cadence=66rpm power=20W] [2021-10-21T10:54:15.772Z] received stats from bike [power=20W cadence=66rpm speed=0km/h] [2021-10-21T10:54:16.099Z] received stats from bike [power=20W cadence=66rpm speed=0km/h] [2021-10-21T10:54:16.427Z] received stats from bike [power=20W cadence=67rpm speed=0km/h] [2021-10-21T10:54:16.615Z] pedal stroke [timestamp=1634813656614.6133 revolutions=3 cadence=67rpm power=20W] [2021-10-21T10:54:16.753Z] received stats from bike [power=20W cadence=67rpm speed=0km/h] [2021-10-21T10:54:17.079Z] received stats from bike [power=20W cadence=68rpm speed=0km/h] [2021-10-21T10:54:17.497Z] pedal stroke [timestamp=1634813657496.9663 revolutions=4 cadence=68rpm power=20W] [2021-10-21T10:54:17.725Z] received stats from bike [power=21W cadence=68rpm speed=0km/h] [2021-10-21T10:54:18.043Z] received stats from bike [power=21W cadence=68rpm speed=0km/h] [2021-10-21T10:54:18.370Z] received stats from bike [power=21W cadence=68rpm speed=0km/h] [2021-10-21T10:54:18.380Z] pedal stroke [timestamp=1634813658379.3193 revolutions=5 cadence=68rpm power=21W] [2021-10-21T10:54:19.014Z] received stats from bike [power=21W cadence=68rpm speed=0km/h] [2021-10-21T10:54:19.262Z] pedal stroke [timestamp=1634813659261.6724 revolutions=6 cadence=68rpm power=21W] [2021-10-21T10:54:19.339Z] received stats from bike [power=21W cadence=68rpm speed=0km/h] [2021-10-21T10:54:19.664Z] received stats from bike [power=21W cadence=68rpm speed=0km/h] [2021-10-21T10:54:20.145Z] pedal stroke [timestamp=1634813660144.0254 revolutions=7 cadence=68rpm power=21W] [2021-10-21T10:54:20.314Z] received stats from bike [power=21W cadence=69rpm speed=0km/h] [2021-10-21T10:54:20.636Z] received stats from bike [power=22W cadence=69rpm speed=0km/h] [2021-10-21T10:54:20.965Z] received stats from bike [power=22W cadence=69rpm speed=0km/h] [2021-10-21T10:54:21.014Z] pedal stroke [timestamp=1634813661013.5906 revolutions=8 cadence=69rpm power=22W] [2021-10-21T10:54:21.299Z] received stats from bike [power=22W cadence=69rpm speed=0km/h] [2021-10-21T10:54:21.615Z] received stats from bike [power=22W cadence=69rpm speed=0km/h] [2021-10-21T10:54:21.884Z] pedal stroke [timestamp=1634813661883.1558 revolutions=9 cadence=69rpm power=22W] [2021-10-21T10:54:21.942Z] received stats from bike [power=22W cadence=69rpm speed=0km/h] [2021-10-21T10:54:22.595Z] received stats from bike [power=22W cadence=69rpm speed=0km/h] [2021-10-21T10:54:22.753Z] pedal stroke [timestamp=1634813662752.721 revolutions=10 cadence=69rpm power=22W] [2021-10-21T10:54:23.566Z] received stats from bike [power=22W cadence=70rpm speed=0km/h] [2021-10-21T10:54:23.612Z] pedal stroke [timestamp=1634813663609.8638 revolutions=11 cadence=70rpm power=22W] [2021-10-21T10:54:23.893Z] received stats from bike [power=22W cadence=70rpm speed=0km/h] [2021-10-21T10:54:24.216Z] received stats from bike [power=22W cadence=70rpm speed=0km/h] [2021-10-21T10:54:24.468Z] pedal stroke [timestamp=1634813664467.0066 revolutions=12 cadence=70rpm power=22W] [2021-10-21T10:54:24.859Z] received stats from bike [power=25W cadence=76rpm speed=0km/h] [2021-10-21T10:54:25.257Z] pedal stroke [timestamp=1634813665256.4802 revolutions=13 cadence=76rpm power=25W] [2021-10-21T10:54:25.504Z] received stats from bike [power=25W cadence=76rpm speed=0km/h] [2021-10-21T10:54:25.826Z] received stats from bike [power=25W cadence=81rpm speed=0km/h] [2021-10-21T10:54:26.000Z] pedal stroke [timestamp=1634813665997.221 revolutions=14 cadence=81rpm power=25W] [2021-10-21T10:54:26.150Z] received stats from bike [power=25W cadence=81rpm speed=0km/h] [2021-10-21T10:54:26.738Z] pedal stroke [timestamp=1634813666737.9617 revolutions=15 cadence=81rpm power=25W] [2021-10-21T10:54:26.793Z] received stats from bike [power=25W cadence=82rpm speed=0km/h] [2021-10-21T10:54:27.447Z] received stats from bike [power=25W cadence=84rpm speed=0km/h] [2021-10-21T10:54:27.454Z] pedal stroke [timestamp=1634813667452.2473 revolutions=16 cadence=84rpm power=25W] [2021-10-21T10:54:27.774Z] received stats from bike [power=53W cadence=84rpm speed=15km/h] [2021-10-21T10:54:27.786Z] wheel rotation [timestamp=1634813667778 revolutions=1 speed=15km/h power=53W] [2021-10-21T10:54:28.101Z] received stats from bike [power=53W cadence=84rpm speed=15km/h] [2021-10-21T10:54:28.168Z] pedal stroke [timestamp=1634813668166.533 revolutions=17 cadence=84rpm power=53W] [2021-10-21T10:54:28.282Z] wheel rotation [timestamp=1634813668281.04 revolutions=2 speed=15km/h power=53W] [2021-10-21T10:54:28.426Z] received stats from bike [power=60W cadence=83rpm speed=14km/h] [2021-10-21T10:54:28.821Z] wheel rotation [timestamp=1634813668820.0115 revolutions=3 speed=14km/h power=60W] [2021-10-21T10:54:28.890Z] pedal stroke [timestamp=1634813668889.4246 revolutions=18 cadence=83rpm power=60W] [2021-10-21T10:54:29.072Z] received stats from bike [power=63W cadence=83rpm speed=17km/h] [2021-10-21T10:54:29.264Z] wheel rotation [timestamp=1634813669263.8704 revolutions=4 speed=17km/h power=63W] [2021-10-21T10:54:29.396Z] received stats from bike [power=63W cadence=83rpm speed=17km/h] [2021-10-21T10:54:29.613Z] pedal stroke [timestamp=1634813669612.3162 revolutions=19 cadence=83rpm power=63W] [2021-10-21T10:54:29.708Z] wheel rotation [timestamp=1634813669707.7292 revolutions=5 speed=17km/h power=63W] [2021-10-21T10:54:30.044Z] received stats from bike [power=64W cadence=84rpm speed=17km/h] [2021-10-21T10:54:30.155Z] wheel rotation [timestamp=1634813670151.5881 revolutions=6 speed=17km/h power=64W] [2021-10-21T10:54:30.327Z] pedal stroke [timestamp=1634813670326.6018 revolutions=20 cadence=84rpm power=64W] [2021-10-21T10:54:30.361Z] received stats from bike [power=64W cadence=84rpm speed=17km/h] [2021-10-21T10:54:30.596Z] wheel rotation [timestamp=1634813670595.447 revolutions=7 speed=17km/h power=64W] [2021-10-21T10:54:31.011Z] received stats from bike [power=64W cadence=84rpm speed=17km/h] [2021-10-21T10:54:31.041Z] wheel rotation [timestamp=1634813671039.306 revolutions=8 speed=17km/h power=64W] [2021-10-21T10:54:31.047Z] pedal stroke [timestamp=1634813671040.8875 revolutions=21 cadence=84rpm power=64W] [2021-10-21T10:54:31.335Z] received stats from bike [power=64W cadence=85rpm speed=17km/h] [2021-10-21T10:54:31.484Z] wheel rotation [timestamp=1634813671483.1648 revolutions=9 speed=17km/h power=64W] [2021-10-21T10:54:31.660Z] received stats from bike [power=65W cadence=85rpm speed=17km/h] [2021-10-21T10:54:31.750Z] pedal stroke [timestamp=1634813671746.7698 revolutions=22 cadence=85rpm power=65W] [2021-10-21T10:54:31.929Z] wheel rotation [timestamp=1634813671927.0237 revolutions=10 speed=17km/h power=65W] [2021-10-21T10:54:31.988Z] received stats from bike [power=65W cadence=85rpm speed=17km/h] [2021-10-21T10:54:32.311Z] received stats from bike [power=65W cadence=85rpm speed=17km/h] [2021-10-21T10:54:32.371Z] wheel rotation [timestamp=1634813672370.8826 revolutions=11 speed=17km/h power=65W] [2021-10-21T10:54:32.453Z] pedal stroke [timestamp=1634813672452.652 revolutions=23 cadence=85rpm power=65W] [2021-10-21T10:54:32.815Z] wheel rotation [timestamp=1634813672814.7415 revolutions=12 speed=17km/h power=65W] [2021-10-21T10:54:32.962Z] received stats from bike [power=71W cadence=84rpm speed=16km/h] [2021-10-21T10:54:33.168Z] pedal stroke [timestamp=1634813673166.9377 revolutions=24 cadence=84rpm power=71W] [2021-10-21T10:54:33.285Z] received stats from bike [power=104W cadence=84rpm speed=20km/h] [2021-10-21T10:54:33.292Z] wheel rotation [timestamp=1634813673288 revolutions=13 speed=20km/h power=104W] [2021-10-21T10:54:33.614Z] received stats from bike [power=113W cadence=85rpm speed=23km/h] [2021-10-21T10:54:33.625Z] wheel rotation [timestamp=1634813673620 revolutions=14 speed=23km/h power=113W] [2021-10-21T10:54:33.872Z] pedal stroke [timestamp=1634813673872.82 revolutions=25 cadence=85rpm power=113W] [2021-10-21T10:54:33.935Z] received stats from bike [power=113W cadence=85rpm speed=23km/h] [2021-10-21T10:54:33.949Z] wheel rotation [timestamp=1634813673948.0696 revolutions=15 speed=23km/h power=113W] [2021-10-21T10:54:34.277Z] wheel rotation [timestamp=1634813674276.1392 revolutions=16 speed=23km/h power=113W] [2021-10-21T10:54:34.580Z] pedal stroke [timestamp=1634813674578.7024 revolutions=26 cadence=85rpm power=113W] [2021-10-21T10:54:34.591Z] received stats from bike [power=113W cadence=88rpm speed=23km/h] [2021-10-21T10:54:34.605Z] wheel rotation [timestamp=1634813674604.2087 revolutions=17 speed=23km/h power=113W] [2021-10-21T10:54:34.911Z] received stats from bike [power=113W cadence=88rpm speed=23km/h] [2021-10-21T10:54:34.933Z] wheel rotation [timestamp=1634813674932.2783 revolutions=18 speed=23km/h power=113W] [2021-10-21T10:54:35.235Z] received stats from bike [power=113W cadence=88rpm speed=23km/h] [2021-10-21T10:54:35.261Z] pedal stroke [timestamp=1634813675260.5205 revolutions=27 cadence=88rpm power=113W] [2021-10-21T10:54:35.266Z] wheel rotation [timestamp=1634813675260.348 revolutions=19 speed=23km/h power=113W] [2021-10-21T10:54:35.590Z] wheel rotation [timestamp=1634813675588.4175 revolutions=20 speed=23km/h power=113W] [2021-10-21T10:54:35.881Z] received stats from bike [power=121W cadence=89rpm speed=22km/h] [2021-10-21T10:54:35.932Z] wheel rotation [timestamp=1634813675931.3994 revolutions=21 speed=22km/h power=121W] [2021-10-21T10:54:35.940Z] pedal stroke [timestamp=1634813675934.6777 revolutions=28 cadence=89rpm power=121W] [2021-10-21T10:54:36.205Z] received stats from bike [power=121W cadence=88rpm speed=22km/h] [2021-10-21T10:54:36.275Z] wheel rotation [timestamp=1634813676274.3813 revolutions=22 speed=22km/h power=121W] [2021-10-21T10:54:36.531Z] received stats from bike [power=121W cadence=88rpm speed=22km/h] [2021-10-21T10:54:36.617Z] pedal stroke [timestamp=1634813676616.4958 revolutions=29 cadence=88rpm power=121W] [2021-10-21T10:54:36.626Z] wheel rotation [timestamp=1634813676617.3633 revolutions=23 speed=22km/h power=121W] [2021-10-21T10:54:36.962Z] wheel rotation [timestamp=1634813676960.3452 revolutions=24 speed=22km/h power=121W] [2021-10-21T10:54:37.178Z] received stats from bike [power=121W cadence=89rpm speed=22km/h] [2021-10-21T10:54:37.291Z] pedal stroke [timestamp=1634813677290.653 revolutions=30 cadence=89rpm power=121W] [2021-10-21T10:54:37.305Z] wheel rotation [timestamp=1634813677303.3271 revolutions=25 speed=22km/h power=121W] [2021-10-21T10:54:37.498Z] received stats from bike [power=121W cadence=88rpm speed=22km/h] [2021-10-21T10:54:37.647Z] wheel rotation [timestamp=1634813677646.309 revolutions=26 speed=22km/h power=121W] [2021-10-21T10:54:37.824Z] received stats from bike [power=121W cadence=88rpm speed=22km/h] [2021-10-21T10:54:37.973Z] pedal stroke [timestamp=1634813677972.4712 revolutions=31 cadence=88rpm power=121W] [2021-10-21T10:54:37.996Z] wheel rotation [timestamp=1634813677989.291 revolutions=27 speed=22km/h power=121W] [2021-10-21T10:54:38.150Z] received stats from bike [power=121W cadence=89rpm speed=22km/h] [2021-10-21T10:54:38.333Z] wheel rotation [timestamp=1634813678332.273 revolutions=28 speed=22km/h power=121W] [2021-10-21T10:54:38.470Z] received stats from bike [power=123W cadence=89rpm speed=22km/h] [2021-10-21T10:54:38.648Z] pedal stroke [timestamp=1634813678646.6284 revolutions=32 cadence=89rpm power=123W] [2021-10-21T10:54:38.676Z] wheel rotation [timestamp=1634813678675.255 revolutions=29 speed=22km/h power=123W] [2021-10-21T10:54:38.791Z] received stats from bike [power=167W cadence=89rpm speed=26km/h] [2021-10-21T10:54:38.966Z] wheel rotation [timestamp=1634813678965.4702 revolutions=30 speed=26km/h power=167W] [2021-10-21T10:54:39.256Z] wheel rotation [timestamp=1634813679255.6855 revolutions=31 speed=26km/h power=167W] [2021-10-21T10:54:39.321Z] pedal stroke [timestamp=1634813679320.7856 revolutions=33 cadence=89rpm power=167W] [2021-10-21T10:54:39.439Z] received stats from bike [power=206W cadence=90rpm speed=31km/h] [2021-10-21T10:54:39.500Z] wheel rotation [timestamp=1634813679499.092 revolutions=32 speed=31km/h power=206W] [2021-10-21T10:54:39.743Z] wheel rotation [timestamp=1634813679742.4985 revolutions=33 speed=31km/h power=206W] [2021-10-21T10:54:39.765Z] received stats from bike [power=203W cadence=89rpm speed=31km/h] [2021-10-21T10:54:39.987Z] wheel rotation [timestamp=1634813679985.905 revolutions=34 speed=31km/h power=203W] [2021-10-21T10:54:39.995Z] pedal stroke [timestamp=1634813679994.9429 revolutions=34 cadence=89rpm power=203W] [2021-10-21T10:54:40.085Z] received stats from bike [power=203W cadence=89rpm speed=31km/h] [2021-10-21T10:54:40.230Z] wheel rotation [timestamp=1634813680229.3115 revolutions=35 speed=31km/h power=203W] [2021-10-21T10:54:40.475Z] wheel rotation [timestamp=1634813680472.718 revolutions=36 speed=31km/h power=203W] [2021-10-21T10:54:40.699Z] pedal stroke [timestamp=1634813680669.1 revolutions=35 cadence=89rpm power=203W] [2021-10-21T10:54:40.721Z] wheel rotation [timestamp=1634813680716.1245 revolutions=37 speed=31km/h power=203W] [2021-10-21T10:54:40.754Z] received stats from bike [power=213W cadence=93rpm speed=30km/h] [2021-10-21T10:54:40.968Z] wheel rotation [timestamp=1634813680967.6445 revolutions=38 speed=30km/h power=213W] [2021-10-21T10:54:41.049Z] received stats from bike [power=210W cadence=91rpm speed=30km/h] [2021-10-21T10:54:41.220Z] wheel rotation [timestamp=1634813681219.1646 revolutions=39 speed=30km/h power=210W] [2021-10-21T10:54:41.329Z] pedal stroke [timestamp=1634813681328.4407 revolutions=36 cadence=91rpm power=210W] [2021-10-21T10:54:41.371Z] received stats from bike [power=210W cadence=91rpm speed=30km/h] [2021-10-21T10:54:41.470Z] wheel rotation [timestamp=1634813681470.6846 revolutions=40 speed=30km/h power=210W] [2021-10-21T10:54:41.700Z] received stats from bike [power=206W cadence=90rpm speed=31km/h] [2021-10-21T10:54:41.716Z] wheel rotation [timestamp=1634813681714.091 revolutions=41 speed=31km/h power=206W] [2021-10-21T10:54:41.958Z] wheel rotation [timestamp=1634813681957.4976 revolutions=42 speed=31km/h power=206W] [2021-10-21T10:54:41.998Z] pedal stroke [timestamp=1634813681995.1074 revolutions=37 cadence=90rpm power=206W] [2021-10-21T10:54:42.029Z] received stats from bike [power=206W cadence=90rpm speed=31km/h] [2021-10-21T10:54:42.201Z] wheel rotation [timestamp=1634813682200.904 revolutions=43 speed=31km/h power=206W] [2021-10-21T10:54:42.350Z] received stats from bike [power=206W cadence=90rpm speed=31km/h] [2021-10-21T10:54:42.445Z] wheel rotation [timestamp=1634813682444.3105 revolutions=44 speed=31km/h power=206W] [2021-10-21T10:54:42.662Z] pedal stroke [timestamp=1634813682661.7742 revolutions=38 cadence=90rpm power=206W] [2021-10-21T10:54:42.688Z] wheel rotation [timestamp=1634813682687.717 revolutions=45 speed=31km/h power=206W] [2021-10-21T10:54:42.932Z] wheel rotation [timestamp=1634813682931.1235 revolutions=46 speed=31km/h power=206W] [2021-10-21T10:54:42.996Z] received stats from bike [power=206W cadence=92rpm speed=31km/h] [2021-10-21T10:54:43.175Z] wheel rotation [timestamp=1634813683174.53 revolutions=47 speed=31km/h power=206W] [2021-10-21T10:54:43.314Z] pedal stroke [timestamp=1634813683313.948 revolutions=39 cadence=92rpm power=206W] [2021-10-21T10:54:43.418Z] wheel rotation [timestamp=1634813683417.9365 revolutions=48 speed=31km/h power=206W] [2021-10-21T10:54:43.641Z] received stats from bike [power=215W cadence=93rpm speed=30km/h] [2021-10-21T10:54:43.670Z] wheel rotation [timestamp=1634813683669.4565 revolutions=49 speed=30km/h power=215W] [2021-10-21T10:54:43.921Z] wheel rotation [timestamp=1634813683920.9766 revolutions=50 speed=30km/h power=215W] [2021-10-21T10:54:43.959Z] received stats from bike [power=215W cadence=93rpm speed=30km/h] [2021-10-21T10:54:43.966Z] pedal stroke [timestamp=1634813683963 revolutions=40 cadence=93rpm power=215W] [2021-10-21T10:54:44.173Z] wheel rotation [timestamp=1634813684172.4966 revolutions=51 speed=30km/h power=215W] [2021-10-21T10:54:44.288Z] received stats from bike [power=247W cadence=92rpm speed=32km/h] [2021-10-21T10:54:44.409Z] wheel rotation [timestamp=1634813684408.2966 revolutions=52 speed=32km/h power=247W] [2021-10-21T10:54:44.613Z] received stats from bike [power=285W cadence=92rpm speed=37km/h] [2021-10-21T10:54:44.620Z] pedal stroke [timestamp=1634813684616 revolutions=41 cadence=92rpm power=285W] [2021-10-21T10:54:44.626Z] wheel rotation [timestamp=1634813684617 revolutions=53 speed=37km/h power=285W] [2021-10-21T10:54:44.821Z] wheel rotation [timestamp=1634813684820.935 revolutions=54 speed=37km/h power=285W] [2021-10-21T10:54:44.941Z] received stats from bike [power=316W cadence=90rpm speed=39km/h] [2021-10-21T10:54:45.015Z] wheel rotation [timestamp=1634813685014.4119 revolutions=55 speed=39km/h power=316W] [2021-10-21T10:54:45.209Z] wheel rotation [timestamp=1634813685207.8887 revolutions=56 speed=39km/h power=316W] [2021-10-21T10:54:45.283Z] pedal stroke [timestamp=1634813685282.6667 revolutions=42 cadence=90rpm power=316W] [2021-10-21T10:54:45.403Z] wheel rotation [timestamp=1634813685401.3655 revolutions=57 speed=39km/h power=316W] [2021-10-21T10:54:45.594Z] received stats from bike [power=321W cadence=88rpm speed=39km/h] [2021-10-21T10:54:45.602Z] wheel rotation [timestamp=1634813685598 revolutions=58 speed=39km/h power=321W] [2021-10-21T10:54:45.792Z] wheel rotation [timestamp=1634813685791.4768 revolutions=59 speed=39km/h power=321W] [2021-10-21T10:54:45.921Z] received stats from bike [power=321W cadence=88rpm speed=39km/h] [2021-10-21T10:54:45.968Z] pedal stroke [timestamp=1634813685964.4849 revolutions=43 cadence=88rpm power=321W] [2021-10-21T10:54:45.987Z] wheel rotation [timestamp=1634813685984.9536 revolutions=60 speed=39km/h power=321W] [2021-10-21T10:54:46.180Z] wheel rotation [timestamp=1634813686178.4304 revolutions=61 speed=39km/h power=321W] [2021-10-21T10:54:46.239Z] received stats from bike [power=332W cadence=90rpm speed=38km/h] [2021-10-21T10:54:46.377Z] wheel rotation [timestamp=1634813686376.9988 revolutions=62 speed=38km/h power=332W] [2021-10-21T10:54:46.558Z] received stats from bike [power=332W cadence=90rpm speed=38km/h] [2021-10-21T10:54:46.576Z] wheel rotation [timestamp=1634813686575.5671 revolutions=63 speed=38km/h power=332W] [2021-10-21T10:54:46.631Z] pedal stroke [timestamp=1634813686631.1516 revolutions=44 cadence=90rpm power=332W] [2021-10-21T10:54:46.775Z] wheel rotation [timestamp=1634813686774.1355 revolutions=64 speed=38km/h power=332W] [2021-10-21T10:54:46.898Z] received stats from bike [power=345W cadence=93rpm speed=41km/h] [2021-10-21T10:54:46.959Z] wheel rotation [timestamp=1634813686958.1746 revolutions=65 speed=41km/h power=345W] [2021-10-21T10:54:47.143Z] wheel rotation [timestamp=1634813687142.2136 revolutions=66 speed=41km/h power=345W] [2021-10-21T10:54:47.202Z] received stats from bike [power=345W cadence=93rpm speed=41km/h] [2021-10-21T10:54:47.277Z] pedal stroke [timestamp=1634813687276.313 revolutions=45 cadence=93rpm power=345W] [2021-10-21T10:54:47.326Z] wheel rotation [timestamp=1634813687326.2527 revolutions=67 speed=41km/h power=345W] [2021-10-21T10:54:47.523Z] wheel rotation [timestamp=1634813687510.2917 revolutions=68 speed=41km/h power=345W] [2021-10-21T10:54:47.707Z] wheel rotation [timestamp=1634813687694.3308 revolutions=69 speed=41km/h power=345W] [2021-10-21T10:54:47.880Z] wheel rotation [timestamp=1634813687878.3699 revolutions=70 speed=41km/h power=345W] [2021-10-21T10:54:47.922Z] pedal stroke [timestamp=1634813687921.4744 revolutions=46 cadence=93rpm power=345W] [2021-10-21T10:54:48.062Z] wheel rotation [timestamp=1634813688062.409 revolutions=71 speed=41km/h power=345W] [2021-10-21T10:54:48.169Z] received stats from bike [power=335W cadence=91rpm speed=38km/h] [2021-10-21T10:54:48.261Z] wheel rotation [timestamp=1634813688260.9773 revolutions=72 speed=38km/h power=335W] [2021-10-21T10:54:48.460Z] wheel rotation [timestamp=1634813688459.5457 revolutions=73 speed=38km/h power=335W] [2021-10-21T10:54:48.492Z] received stats from bike [power=335W cadence=91rpm speed=38km/h] [2021-10-21T10:54:48.581Z] pedal stroke [timestamp=1634813688580.815 revolutions=47 cadence=91rpm power=335W] [2021-10-21T10:54:48.659Z] wheel rotation [timestamp=1634813688658.114 revolutions=74 speed=38km/h power=335W] [2021-10-21T10:54:48.811Z] received stats from bike [power=499W cadence=91rpm speed=49km/h] [2021-10-21T10:54:48.819Z] wheel rotation [timestamp=1634813688815 revolutions=75 speed=49km/h power=499W] [2021-10-21T10:54:48.968Z] wheel rotation [timestamp=1634813688968.992 revolutions=76 speed=49km/h power=499W] [2021-10-21T10:54:49.123Z] wheel rotation [timestamp=1634813689122.984 revolutions=77 speed=49km/h power=499W] [2021-10-21T10:54:49.138Z] received stats from bike [power=540W cadence=91rpm speed=51km/h] [2021-10-21T10:54:49.241Z] pedal stroke [timestamp=1634813689240.1555 revolutions=48 cadence=91rpm power=540W] [2021-10-21T10:54:49.271Z] wheel rotation [timestamp=1634813689270.9368 revolutions=78 speed=51km/h power=540W] [2021-10-21T10:54:49.419Z] wheel rotation [timestamp=1634813689418.8896 revolutions=79 speed=51km/h power=540W] [2021-10-21T10:54:49.567Z] wheel rotation [timestamp=1634813689566.8425 revolutions=80 speed=51km/h power=540W] [2021-10-21T10:54:49.715Z] wheel rotation [timestamp=1634813689714.7954 revolutions=81 speed=51km/h power=540W] [2021-10-21T10:54:49.783Z] received stats from bike [power=462W cadence=78rpm speed=47km/h] [2021-10-21T10:54:49.876Z] wheel rotation [timestamp=1634813689875.34 revolutions=82 speed=47km/h power=462W] [2021-10-21T10:54:50.010Z] pedal stroke [timestamp=1634813690009.3862 revolutions=49 cadence=78rpm power=462W] [2021-10-21T10:54:50.036Z] wheel rotation [timestamp=1634813690035.8848 revolutions=83 speed=47km/h power=462W] [2021-10-21T10:54:50.196Z] wheel rotation [timestamp=1634813690196.4294 revolutions=84 speed=47km/h power=462W] [2021-10-21T10:54:50.357Z] wheel rotation [timestamp=1634813690356.974 revolutions=85 speed=47km/h power=462W] [2021-10-21T10:54:50.430Z] received stats from bike [power=462W cadence=78rpm speed=47km/h] [2021-10-21T10:54:50.518Z] wheel rotation [timestamp=1634813690517.5188 revolutions=86 speed=47km/h power=462W] [2021-10-21T10:54:50.679Z] wheel rotation [timestamp=1634813690678.0635 revolutions=87 speed=47km/h power=462W] [2021-10-21T10:54:50.779Z] pedal stroke [timestamp=1634813690778.617 revolutions=50 cadence=78rpm power=462W] [2021-10-21T10:54:50.839Z] wheel rotation [timestamp=1634813690838.6082 revolutions=88 speed=47km/h power=462W] [2021-10-21T10:54:51.000Z] wheel rotation [timestamp=1634813690999.1528 revolutions=89 speed=47km/h power=462W] [2021-10-21T10:54:51.079Z] received stats from bike [power=462W cadence=80rpm speed=47km/h] [2021-10-21T10:54:51.160Z] wheel rotation [timestamp=1634813691159.6975 revolutions=90 speed=47km/h power=462W] [2021-10-21T10:54:51.321Z] wheel rotation [timestamp=1634813691320.2422 revolutions=91 speed=47km/h power=462W] [2021-10-21T10:54:51.400Z] received stats from bike [power=462W cadence=80rpm speed=47km/h] [2021-10-21T10:54:51.481Z] wheel rotation [timestamp=1634813691480.7869 revolutions=92 speed=47km/h power=462W] [2021-10-21T10:54:51.529Z] pedal stroke [timestamp=1634813691528.617 revolutions=51 cadence=80rpm power=462W] [2021-10-21T10:54:51.642Z] wheel rotation [timestamp=1634813691641.3315 revolutions=93 speed=47km/h power=462W] [2021-10-21T10:54:51.720Z] received stats from bike [power=476W cadence=80rpm speed=46km/h] [2021-10-21T10:54:51.807Z] wheel rotation [timestamp=1634813691805.3662 revolutions=94 speed=46km/h power=476W] [2021-10-21T10:54:51.971Z] wheel rotation [timestamp=1634813691969.401 revolutions=95 speed=46km/h power=476W] [2021-10-21T10:54:52.041Z] received stats from bike [power=482W cadence=80rpm speed=49km/h] [2021-10-21T10:54:52.124Z] wheel rotation [timestamp=1634813692123.3928 revolutions=96 speed=49km/h power=482W] [2021-10-21T10:54:52.278Z] wheel rotation [timestamp=1634813692277.3848 revolutions=97 speed=49km/h power=482W] [2021-10-21T10:54:52.284Z] pedal stroke [timestamp=1634813692278.617 revolutions=52 cadence=80rpm power=482W] [2021-10-21T10:54:52.364Z] received stats from bike [power=482W cadence=80rpm speed=49km/h] [2021-10-21T10:54:52.432Z] wheel rotation [timestamp=1634813692431.3767 revolutions=98 speed=49km/h power=482W] [2021-10-21T10:54:52.586Z] wheel rotation [timestamp=1634813692585.3687 revolutions=99 speed=49km/h power=482W] [2021-10-21T10:54:52.683Z] received stats from bike [power=472W cadence=79rpm speed=46km/h] [2021-10-21T10:54:52.750Z] wheel rotation [timestamp=1634813692749.4033 revolutions=100 speed=46km/h power=472W] [2021-10-21T10:54:52.914Z] wheel rotation [timestamp=1634813692913.438 revolutions=101 speed=46km/h power=472W] [2021-10-21T10:54:53.039Z] pedal stroke [timestamp=1634813693038.1106 revolutions=53 cadence=79rpm power=472W] [2021-10-21T10:54:53.078Z] wheel rotation [timestamp=1634813693077.4727 revolutions=102 speed=46km/h power=472W] [2021-10-21T10:54:53.243Z] wheel rotation [timestamp=1634813693241.5073 revolutions=103 speed=46km/h power=472W] [2021-10-21T10:54:53.406Z] wheel rotation [timestamp=1634813693405.542 revolutions=104 speed=46km/h power=472W] [2021-10-21T10:54:53.570Z] wheel rotation [timestamp=1634813693569.5767 revolutions=105 speed=46km/h power=472W] [2021-10-21T10:54:53.665Z] received stats from bike [power=437W cadence=74rpm speed=44km/h] [2021-10-21T10:54:53.742Z] wheel rotation [timestamp=1634813693741.0676 revolutions=106 speed=44km/h power=437W] [2021-10-21T10:54:53.850Z] pedal stroke [timestamp=1634813693848.9214 revolutions=54 cadence=74rpm power=437W] [2021-10-21T10:54:53.913Z] wheel rotation [timestamp=1634813693912.5586 revolutions=107 speed=44km/h power=437W] [2021-10-21T10:54:53.993Z] received stats from bike [power=437W cadence=74rpm speed=44km/h] [2021-10-21T10:54:54.085Z] wheel rotation [timestamp=1634813694084.0496 revolutions=108 speed=44km/h power=437W] [2021-10-21T10:54:54.256Z] wheel rotation [timestamp=1634813694255.5405 revolutions=109 speed=44km/h power=437W] [2021-10-21T10:54:54.429Z] wheel rotation [timestamp=1634813694427.0315 revolutions=110 speed=44km/h power=437W] [2021-10-21T10:54:54.599Z] wheel rotation [timestamp=1634813694598.5225 revolutions=111 speed=44km/h power=437W] [2021-10-21T10:54:54.635Z] received stats from bike [power=391W cadence=68rpm speed=42km/h] [2021-10-21T10:54:54.732Z] pedal stroke [timestamp=1634813694731.2744 revolutions=55 cadence=68rpm power=391W] [2021-10-21T10:54:54.779Z] wheel rotation [timestamp=1634813694778.1797 revolutions=112 speed=42km/h power=391W] [2021-10-21T10:54:54.962Z] wheel rotation [timestamp=1634813694957.837 revolutions=113 speed=42km/h power=391W] [2021-10-21T10:54:54.969Z] received stats from bike [power=391W cadence=68rpm speed=42km/h] [2021-10-21T10:54:55.138Z] wheel rotation [timestamp=1634813695137.4941 revolutions=114 speed=42km/h power=391W] [2021-10-21T10:54:55.291Z] received stats from bike [power=346W cadence=62rpm speed=41km/h] [2021-10-21T10:54:55.322Z] wheel rotation [timestamp=1634813695321.5332 revolutions=115 speed=41km/h power=346W] [2021-10-21T10:54:55.506Z] wheel rotation [timestamp=1634813695505.5723 revolutions=116 speed=41km/h power=346W] [2021-10-21T10:54:55.691Z] wheel rotation [timestamp=1634813695689.6113 revolutions=117 speed=41km/h power=346W] [2021-10-21T10:54:55.701Z] pedal stroke [timestamp=1634813695699.0164 revolutions=56 cadence=62rpm power=346W] [2021-10-21T10:54:55.874Z] wheel rotation [timestamp=1634813695873.6504 revolutions=118 speed=41km/h power=346W] [2021-10-21T10:54:56.058Z] wheel rotation [timestamp=1634813696057.6895 revolutions=119 speed=41km/h power=346W] [2021-10-21T10:54:56.243Z] wheel rotation [timestamp=1634813696241.7285 revolutions=120 speed=41km/h power=346W] [2021-10-21T10:54:56.262Z] received stats from bike [power=346W cadence=62rpm speed=41km/h] [2021-10-21T10:54:56.426Z] wheel rotation [timestamp=1634813696425.7676 revolutions=121 speed=41km/h power=346W] [2021-10-21T10:54:56.591Z] received stats from bike [power=31W cadence=62rpm speed=11km/h] [2021-10-21T10:54:56.668Z] pedal stroke [timestamp=1634813696666.7583 revolutions=57 cadence=62rpm power=31W] [2021-10-21T10:54:56.911Z] received stats from bike [power=13W cadence=62rpm speed=0km/h] [2021-10-21T10:54:57.232Z] received stats from bike [power=13W cadence=62rpm speed=0km/h] [2021-10-21T10:54:57.561Z] received stats from bike [power=13W cadence=62rpm speed=0km/h] [2021-10-21T10:54:57.636Z] pedal stroke [timestamp=1634813697634.5002 revolutions=58 cadence=62rpm power=13W] [2021-10-21T10:54:58.214Z] received stats from bike [power=13W cadence=62rpm speed=0km/h] [2021-10-21T10:54:58.536Z] received stats from bike [power=13W cadence=0rpm speed=0km/h] [2021-10-21T10:54:58.863Z] received stats from bike [power=13W cadence=0rpm speed=0km/h] [2021-10-21T10:54:59.191Z] received stats from bike [power=13W cadence=0rpm speed=0km/h] [2021-10-21T10:54:59.512Z] received stats from bike [power=0W cadence=0rpm speed=1km/h] [2021-10-21T10:55:00.162Z] received stats from bike [power=0W cadence=0rpm speed=1km/h] [2021-10-21T10:55:00.814Z] received stats from bike [power=0W cadence=0rpm speed=1km/h] ^C[2021-10-21T10:55:01.542Z] stopping ANT+ server

chriselsen commented 2 years ago

@nealjane I made a silly mistake implementing the Power -> Speed conversion based on the Peloton formula. That's fixed now. Can you try it again?

nealjane commented 2 years ago

So checking the speed on pi readout - it’s in km /h, so I’m having to convert them to miles per hour- figures look right when in km/h……eg power 99 - gives 16km/h - that sounds about right apart from it should be miles p h??

nealjane commented 2 years ago

@chriselsen graph attached from your update - see comment above (in pi debug speed is shown in Km/h - (converting to miles meant it was out, but assuming its not actually km/h but m/h then its bang on) 👏👏 keiser speed vs Gymnasticon v2.pdf .

chriselsen commented 2 years ago

@nealjane Well, if NASA looses a $125 million orbiter due to metric system screw ups, I guess it's OK to admit the same here. :-) Just noticed that the Power -> Speed article for Peloton was indeed for mph and not km/h.

Just pushed another fix that should now deliver correct results in km/h.

nealjane commented 2 years ago

At 100 watts (which should be ~16m/h) speed comes through at 10m/h on my Garmin watch (is it thinking it’s km/h and then converting to m/h perhaps?)

nealjane commented 2 years ago

Is there an easyer way to update? - I keep redoing it from the start with fresh sd as otherwise it won’t write over the existing ‘ant BLE-….’ When I try to pull the updated ant BLE-….

chriselsen commented 2 years ago

At 100 watts (which should be ~16m/h) speed comes through at 10m/h on my Garmin watch (is it thinking it’s km/h and then converting to m/h perhaps?)

Yes, the speed values that you were seeing were basically in mph, but displayed as km/h. Now with the fix internally the Power->Speed function will output the speed into km/h and create the ANT+ and BLE timestamps and rotation counts accordingly. Your watch should then show the results correctly in whether you use km/h or mph.

chriselsen commented 2 years ago

Is there an easyer way to update? - I keep redoing it from the start with fresh sd as otherwise it won’t write over the existing ‘ant BLE-….’ When I try to pull the updated ant BLE-….

You only need to repeat these steps while in the "gymnasticon" folder:

git pull origin pull/89/head:antble-speed
npm run build
gymnasticon
nealjane commented 2 years ago

‘Git pull’ didn’t work on its own…

6040AA4A-154A-4FDC-BB6C-AB956819A3AB

chriselsen commented 2 years ago

‘Git pull’ didn’t work on its own…

Updated the full remote and branch information for git pull in the answer just above. Try that one.

nealjane commented 2 years ago

Thanks - that worked.

just checked a couple of powers and yes - it’s showing correct speed on Garmin watch. Power 100=~16mph and another at Power 200 matched previous Keiser reading so all sorted! Anything else you need me to check? - happy to do so tomorrow.(especially as the updates will be quicker now)

chriselsen commented 2 years ago

Thanks - that worked.

Glad to hear!

Anything else you need me to check? - happy to do so tomorrow.(especially as the updates will be quicker now)

Mostly around whether you see any cut-outs or other issues with the ANT+ piece. E.g. missing transmits for either Speed or Speed&Cadence. The ANT+ piece has been the most finicky to implement. So the more testing we see, the better.

nealjane commented 2 years ago

@chriselsen not a single dropout over ant in my 30mins ride this am. All worked great.👌🏻

just tested a couple of apps on iPhone with Bluetooth after too- zwift - find power and cadence bl,(nothing shown under speed - but I note your comment to ptx2 at top of page - so maybe not implemented anyhow) Peloton - finds Gymnasticon bl cadence - but shows correct cadence and then 0 continuously. RGT - connects to Gymnasticon bl under power profile, power correct/stable, but cadence shows correct cadence and then 0 back and forth similar to the peloton issue.

chriselsen commented 2 years ago

Thanks for the feedback on the BLE part. I couldn't get Zwift to find any speed sensor either. But even before any of my changes, my BLE test software didn't show separate CPS and CSC sensors and values. Therefore I definitely need to investigate this much further. Does Peloton or RGT support speed via CSC sensors?

nealjane commented 2 years ago

Neither use speed.

Peloton only uses cadence - (BLE CSC cadence only)

rgt - doesn’t use speed at all, has either Power profile (which I’ve previously used ok, including cadence) or it can also use ftms supposedly as an alternative for auto gradient machines..

nealjane commented 2 years ago

Morning @chriselsen tried your most recent update - Tried a few more apps this am too -

IOS peloton - cadence issue (shows correct cadence and then 0 couple of times a second constantly) RGT - connects with power profile (cadence issue as above seen) Zwift - works with Power/cadence Rouvy - works (find Power profile, power and cadence works)

W10 Zwift - works (with power\cad) Sufferfest - works (finds Power, cadence and Speed)

No issues seen in DEBUG output - (not showing any 0 in cadence etc)

nealjane commented 2 years ago

Prior to yesterdays update, just a couple of things I noted (may be of help/maybe not!)-

peloton cadence bl connection- changed from 0 to correct cadence continuously - but once you get to ~60 cadence it remains fairly stable indicating correct cadence.

rgt- connected to power profile over bl- cadence flicks between 0 and correct cadence, but alters from one to other at same speed as you’re pedaling generally..

chriselsen commented 2 years ago

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. If that doesn't work, the only way to get speed reliably via BLE would be via FTMS.

What's also odd is that my Garmin watch recognizes the BLE CSC service, but then ends up only displaying cadence and no speed.

nealjane commented 2 years ago

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. Speed (and cad and power) all still showing on my fenix 6. Sufferfest on w10 still finds power cadence and speed over Bluetooth. 👍🏻

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)

53A0C275-4F7E-41E8-A31B-3C1399EC46EE

A6D4A316-1758-4217-937C-9735E6BE1534

djfjeff commented 2 years ago

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!

chriselsen commented 2 years ago

Just to let you know everything seems to works perfect with my IC4 bike and Fenix 6 over ANT (so, power, speed and cadence).

Excellent news! I also did a few hundred km with an IC4 bike and ANT+ to a Garmin watch. Works great. The total distance shown on the IC4 display diverges by 2-3 % from what Garmin records. But that's to be expected.

gurase commented 2 years ago

What's also odd is that my Garmin watch recognizes the BLE CSC service, but then ends up only displaying cadence and no speed.

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.

screetch82 commented 2 years ago

Works perfectly fine with Garmin. I can now see the IC4/IC7 bike speed, power, cadence and record it to Garmin without needed additional sensors.

Thanks so much.

image

crissag commented 2 years ago

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?

nealjane commented 2 years ago

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.) . Performance wise I’ve had no issues with those vs Garmin one. Ant+ is low power so ideally you need it with line of sight and within a couple of metres of bike or more importantly your watch.

the new M connect computer drops in power signal over ant+ is a different matter - so just don’t upgrade if you need ant+!

crissag commented 2 years ago

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!

crissag commented 2 years ago

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.

nealjane commented 2 years ago

Stop Gymnasticon first -

sudo service gymnasticon stop

then restart with following (not log file- but closest thing to it) -

NODE_DEBUG=gymnasticon:bike* gymnasticon --bike keiser

nealjane commented 2 years ago

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.

@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

crissag commented 2 years ago

@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.

toma commented 2 years ago

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:

image image

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:

image