lemeryfertitta / Climbdex

Search engine for training board climbs
https://climbdex.com
MIT License
42 stars 10 forks source link

Directly Control Aurora LEDs via Web-Bluetooth API #32

Closed gardaholm closed 6 months ago

gardaholm commented 6 months ago

stumbled upon https://kilterboard.app/ and this posts from @Georift https://tim.wants.coffee/posts/kilterboard-app/

So somebody already figured out how to control the aurora controler via WebBluetooth API. A combination of climbdex + WebBluetooth would be nice.

@lemeryfertitta: feel free to remove this issue if this is out of your scope :) I also have some features in mind which would make group-sessions a lot more fun, which is a pain right now if you have 5 people using 5 different smartphones … but this is probably a future-future add-on

lemeryfertitta commented 6 months ago

Thanks for creating the issue, I think it would be great if Climbdex supported this and I have considered it a bit already. I think the "dream" of Climbdex would be a FOSS web app for all of the boards that could fully replace the existing apps. Bluetooth support is certainly an early requirement for that dream.

There is also https://www.bazun.me/blog/kiterboard/#reversing-bluetooth which has really detailed instructions on the bluetooth API.

gardaholm commented 6 months ago

ah nice, very valuable link, haven't found this one yet. fully agree, being independent form the current app experience would be a nice goal. good first step in this direction.

gardaholm commented 6 months ago

@lemeryfertitta just had a look at your bluetooth-branch, nice work! let me know if you need any help testing it on a tensionboard, if you don't have access to one. happy if I can help …

lemeryfertitta commented 6 months ago

@gardaholm thanks! It's close to working now. I'm able to light up any sequence of four holds or less on any of the boards (tested on Kilter, Tension, and even Touchstone), but there is some bug when five or more holds are present (which is most climbs). Unfortunately, it is a little hard to debug because there is just an opaque error response from the bluetooth service.

Going to try to figure it out while I'm at the gym tomorrow!

lemeryfertitta commented 6 months ago

@gardaholm bluetooth deployed! Finally figured out the bug, the bluetooth controller only wants messages of 20 bytes, hence the failing after five holds 😄.

I tested it out on a couple boards today and it seemed like everything was working, but I only had 15 minutes or so to test so didn't try anything crazy. I've deployed the change, give it a spin and let me know how it works for you!

Lots of things to be done to improve it, just wanted to push out an initial version so we could play around with it and get ideas.

gardaholm commented 6 months ago

we have a session today, will let my friends try it to see how it works across devices. but the first try this morning went smooth. awesome work, i thought this will take longer :) love it!