Giter VIP home page Giter VIP logo

ki2's Introduction

Ki2

Ki2 is an app/addon/plugin for Hammerhead Karoo 2 devices. It is a companion app for electronic shifting groupsets produced by a Japanese company.

Buy me a coffee Validate workflow Latest Release

Screenshots

Ki2 main application Ki2 settings Connection to device Gears information Edit Karoo profile with Ki2 items Ride profile with Ki2 data elements Ride profile with Ki2 data elements Overlay in Ride

These screenshots have been slightly edited.

Features

  • Pair and connect to electronic shifting groupsets
  • Configure actions for Hood buttons
  • Change shifting mode
  • Setup Karoo ride profiles with data elements such as:
    • Gears in text format
    • Gear size (teeth count) in text format
    • Gear ratio in text format
    • Battery % in text format
    • Shifting mode in text format
    • Ride shift count in text format
    • Gears in graphical format
    • Gear size (teeth count) in graphical format
    • Drivetrain view in graphical format
    • Drivetrain size (teeth count) in graphical format
    • Change shift mode graphical control
  • While in a ride, control Karoo from the Hood buttons:
    • Navigate page left/right
    • Pause/Resume ride
    • Mark lap
    • Zoom map
    • Switch to map page
  • Overlay with shifting information while in Ride
  • Receive notifications when shifting battery is low
  • Audio alerts before upcoming synchro shift or when reaching shifting limits
  • Self update

How can I try this app?

  1. Download Ki2 APK file from the latest release page (or here for Karoo 1)
  2. Sideload Ki2 into Karoo (Video)
  3. Connect to shifting devices from Ki2 (Video) and use Ki2 data elements in Karoo profiles (Video)
Full Instructions
  1. Check and download the APK file on the latest release found on the release page
    • Karoo 1 users: The latest release is supported by Karoo 2, for Karoo 1 use this release
  2. Install/Update the APK file on your Karoo:
    1. Activate Karoo developer options:
      • Open Settings > About
      • Tap the Build Number several times until a message appears saying that "You are now a Developer!"
    2. Go to Settings > Developer Options
      • Make sure Developer Options is ON
      • Enable USB Debugging
    3. Download Android Developer Tools, extract to a directory after download
    4. Open a Terminal or Command Prompt in the directory of the Android tools
    5. Execute adb.exe devices (.\adb.exe devices)
    6. If a prompt appears on the Karoo to authorize the request, select Always allow from this computer and press accept
    7. The output from the adb command should show your Karoo device
    8. Install the APK with the following command: adb.exe install "APK-FILE-PATH" (.\adb.exe install "APK-FILE-PATH")
      • Make sure to replace the APK-FILE-PATH with the disk location of the APK file that was downloaded
      • For updates: If you are updating the Ki2 app, you should use the following command variation: adb.exe install -r "APK-FILE-PATH" (with the -r argument) to avoid having to uninstall Ki2 before installing the app update.
  3. The Ki2 app should appear in the app list below Sensors, Settings, etc
  4. Open the Ki2 app to pair and configure a wireless shifting connection (Video)
    • Make sure you don't have the shifting system paired with Karoo (if you are on an old Karoo software version that still supports it)
    • Make sure you have less than 14 ANT devices added/paired in Karoo
    • Open Ki2 and press the + button, searching for shifting devices will start
    • On your shifting system, you need to enable connection/pairing mode. This is usually done by holding the function button for a second or so. (The green and red lights in will flash in alternating order - if your version has those.)
    • The shifting device should appear in Ki2 search results list.
  5. Add Ki2 data elements to Karoo profiles from the Karoo profile editor, choose the Ki2 elements when modifying a profile (Video)

Supported Karoo software versions

Karoo software may change with new updates, for best experience please use the latest Karoo software update with the latest Ki2 version. Please report any issues if you experience problems after updating your Karoo.

Known issues

Ki2 data elements don't show up in the ride profile (when Karoo boots)

Unfortunately this is a problem with the Karoo software itself. I've tried different ways to solve this issue but nothing works so far.

Workaround: Open the ride app with a profile with any Ki2 data elements, before starting the ride, back out from the ride app and return to the dashboard via the back button. The next time the ride app is opened from the dashboard or from a route, all Ki2 data elements should appear. This workaround is applied automatically if the "Pre load ride application" setting is enabled.

Hood buttons don't work in the control center or outside the ride app

This is a limitation of the Karoo SDK and a restriction of Android. Unfortunately the Karoo SDK does not provide any way to send commands, so the implementation has to perform restricted Android operations that are not allowed when Ki2 app is on the background.

Workaround: There is no known workaround, hood buttons only work in the ride app.

How does it work?

This app utilizes the Android environment along with the ANT service and the Karoo SDK. It contains 3 main components:

  • Device management + settings activity
  • Background service that integrates with ANT and communicates with the shifting device wirelessly
  • Integration with Karoo via Karoo SDK

Battery usage

While the implementation is fairly tidy and optimized, this app will be yet another process running on the Karoo. This means that there is some battery impact. I did some non-scientific testing.

Setup
Karoo 2 (Early 2021) Software Version: 1.297.1231
Garmin HR
Varia Radar + Light
Built-in GPS
Audio alerts on (navigation + radar)
Setup Distance Ride Duration Recorded Ascent Avg Speed Avg Temperature Total Shifts Battery Usage
Karoo 2 52.6km 2:06:03 592m 25.1km/h 25C 410 18%
8.5% / hour
(Start: 98% - End: 80%)
Karoo 2 + Ki2 52.6km 1:58:21 585m 26.7km/h 21C 368 15%
7.5% / hour
(Start: 97% - End: 82%)

Tested in the same route in different days. Similar profile in Karoo with the original shifting data elements and then the equivalent ones from Ki2.

Battery gain/loss is marginal and negligible for this particular test given the differences in temperature, ride duration, radar alerts and the number of shifts. It is encouraging that the battery consumption did not noticeably increase.

How can I help?

Is this useful for you? Buy me a coffee.

Do you have experience with Android development? Review the code, point out any problems and feel free to open issues or submit PRs with improvements. Submissions that are outside the scope of the project may be rejected.

Do you work for Hammerhead? Love my Karoo 2, thanks for making it awesome! Don't get involved with this project directly, however please support and improve the Karoo SDK. If you want feedback/ideas feel free to reach out.

Do you do UI/art? Feel free to create/suggest a new icon for the app.

Leave comments and suggestions.

Support + Future development

This project is actively maintained but without any guarantees. It might stop working or lose functionality in newer Karoo software versions.

Features might be added but there is no development plan.

FAQ

This does not do __!?

While I tried to replicate the original Karoo feature set, there are several limitations in the Karoo SDK and the way Android development works. Not every feature could be faithfully replicated.

Can you add feature __?

Maybe, it might or might not be possible. As previously stated there are plenty of restrictions with Karoo SDK. Open an issue and I might consider but without any promises.

I tried cloning the repo but the build fails on my machine

Yes, this is by design. There is a particular file missing from this repo and unfortunately I cannot add it here.

The UI looks similar to other Karoo applications, do you work for Hammerhead or have access to their code?

No! I don't work for hammerhead and I don't have access to their code. I'm just a programmer with a dusty experience in Android development and an eye for UI. I tried to replicate the Karoo interface (look and feel, colors, etc.) to make the app fit in. You can find the Karoo SDK with design guidelines here.

How to configure hood buttons/switches?

Typically Channel 1 is used for the left hood button and Channel 2 for the right hood button. Set the channels via the manufacturer official shifting app available on smartphones. You can use the device details in Ki2, by pressing on a device name, to verify the channel actions.

The app disconnects from the shifting unit while riding

Make sure you are using the latest Ki2 version. It could be a signal issue, verify the signal between the wireless unit and Karoo. To do that, tap on the shifting device on the list of devices in Ki2. The signal value is displayed on the top when the shifting unit is connected. Signal values between -30 to -60dBm offer best and stable connectivity while a signal in range of -75 to -90dBm is degraded and can cause connectivity issues. There is nothing that can be done in the app/software to improve the signal. Recommendation is to move or rotate the shifting wireless unit, perhaps moving it a small amount could be enough or in some cases it may require relocating the wireless unit to another location in the bicycle closer to Karoo.

Gear size (teeth count) or gear ratio unknown or not correct

The gear size (teeth count) is automatically obtained from the shifting unit, when supported. If the shifting unit is misconfigured then the wrong information will be displayed in Ki2. Please use the official mobile application from the shifting unit manufacturer to configure the correct chainring information. This might not be supported in all bicycles or shifting systems. It is also possible to use custom gearing information, open the device details in Ki2 to edit custom gearing.

It does not work or I have a problem

Please open an issue in this github repository. Explain the problem in detail and explain what you are trying to achieve. Keep in mind that there is no official support for this project.

License and notices

Please review the LICENSE.txt and NOTICES.txt files.

ki2's People

Contributors

valterc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ki2's Issues

Better visibility of "synchro" and "limit" in overlay

The "synchro" and "limit" displays in the overlay could stand out more. Perhaps use a bold yellow font in dark mode and a bold red font in light mode?
And maybe move the text more to the lower right corner, so that it is stands out even more?

Feature request: beep when switching to highest or lowest gear

One of my favorite things about the Garmin computers' support of di2 is that they beep (pretty loudly) when you shift to either the highest or lowest gear. This is really useful to hear in cases where you're on a screen not showing the gears, or you can't safely look at the screen (for example, while going fast down a curvy road). It's a great way to know that you "have no more gears"

Not sure it's possible given the API you have to work with, but it would be awesome if ki2 could do this.

Thanks for considering.

Shifting data not showing for systems with no chainring support

I updated karoo2 with latest software version 1.352.1409.12, and can't see any information on profile view. App is loaded and connects to di2 without ussues, but when riding or entering profile, the fields only display N/A or "..." (three dots), no information is visible from ki2 in ride.
I think hammerhead broke something, intentionally?

I have latest version of ki2 1.0. I already try to uninstall and install again, but same issue.

Numeric view goes to "N/A" on longer rides

  1. Ride was 3+ hours
  2. Two additional Ant devices connected > Stages Power Meter And Heart Rate Monitor
  3. Shifting display worked great until @ 2:45
  4. At that point, gear numbers went to N/A
  5. Device was still connected -- could still use the Di2 Hood buttons to switch screens

Left and right switched?

Just a very minor issue, I noticed that when I select "Navigate left" for a hood button the Karoo acts as if I had pressed the right side button and vice versa.

Same for the "zoom in" and "zoom out" functions. If I set the left button long press to "zoom out" and "zoom in" to the right button long press (as it was on the original Karoo implementation) it would actually zoom in on left and zoom out on right 😆

These issues were quickly fixed during my first ride, just opened the ki2 app and changed the button actions on the fly 😉

Want to buy a coffee

I really appreciate the work and timeyou put in to this app and would like to buy you a coffee. However, I can't find the link. Can you post it here?

Use hood-button double-click to zoom map

Zooming in and out of the map with long-holding the hood-buttons is very imprecise. There is a very noticeable lag between the button press and the reaction of the map. That's obviously not a ki2 problem, this was also a present in the original Karoo support.

I think mapping the double-click left and right to zoom-in and zoom-out would work much better.
Could you add this options to the double-click actions?

Auto update

Currently new releases of Ki2 are posted in Github and must be manually downloaded and sideloaded into Karoo. This is a process that requires users to be notified of new updates via a Github account and manually update the app.

Add a feature to automatically check for updates within the app itself and if possible automatically download and prompt to install updates directly in Karoo.

Bug: ki2 gear widget on 1 of 2 data pages within profile doesn't update

I created some new data pages within my bike profile recently, and 2 of the pages have the "Gears" ki2 widget.

Today, on a ride (first time using this profile), the ki2 "gears" widget on only one of the data pages updated as I shifted gears, the other one did not and was stuck on 1/2 (front) and 6/11 (rear) the entire ride. Note that the graphic elements were showing, but they simply didn't update. Shifting while on the page did not cause the widget to update. The other data page with the same ki2 widget updates fine, whether or not you're on that page when shifting.

Strangely, while on the non-working data page, the audible alerts at shift limits still worked fine.

Two Simultaneously Connected Di2 Causes Looping between devices

Opening a Di2 when two devices are connected Simultaneously causes the

  • battery
  • signal strength
  • serial number
  • model number
  • gears
  • etc

And other related data to flicker rapidly between the two active connections.

Clicking on the device appears to open all active connections not be filtered by decice ID / serial number of the one clicked upon.

See video attached

VID-20221226-WA0005.mp4

ki2 crashing with Specialized Turbo Creo di2

Hello

I successfully paired ki2 to my Turbo Creo's di2, but when I start the ride the ki2 app immediately crashes, 100% repro. I'm thinking perhaps this is because the bike has no front derailleur? (it's a gravel bike)

Everything works fine with my Specialized Aethos di2 setup (it does have a front derailleur)

Anyway, it would be great if the issue could be fixed.

Please let me know if I can help debug the issue.

Thanks
-Rob Boyer

Question for development

Hello Valterc! Sorry for ask you another question. You know I'm trying to develope some kind of remote support. I'm very grateful for your code and for your last answer (about switch mapping, etc).

I've been able to integrate ant remote (with a ant plus profile because a controller is a little diferent that a sensor or shift) and the app can change screens (inside course obviously) but I've a problem.

The problem is ... when I'm testing the app all works fine, but when I start a ride ( and connect my mobile and other ant devices) the response, sometimes, has a big delay (sometime 3s but sometimes 60 secons.. and it's like the actions are delaced , for example in a queue, and when the app has acces ... all actions are executed.. for exemple, if i push three times righ button, the app change three times the screen but with a delay of 60-90 seconds, for the first action)

I run one threat (for the ant listener in de kiservice) and I suppose there are other process that they have more priority than the app.. but this not happen with your app and hood buttons.

Could you help me ? I know your code (I've studied because I'm not an android developer . I've expertise wiht python, C++ , etc.. )
and if you can guide howto solve this in your code.

Thanks for your help

Question about hood

Hello valter, your app is so great I’ve bought you a coffee ;) and thanks for your support in last two questions ;)

I’m trying to provide edge remote support (I know isn’t in your roadmap); I think I can achieve with your work in ji2, but if you guide me how can map de buttons/hood with the buttons in Karoo this wil be very helpful

I know the Karoo SDK is very limited and it’s not possible to send key commands and this will be possible in ride app, but if you can provide me where is done or some kind of guide howto do in ride app, it’ll be enough and very useful for me.

I give you my email ([email protected]) if you want to write there and no dirt these comments. ;) thanks a lot

No audio alerts for synchro shifting

I dont have the audio alert on the synchro shifting, only on the max and lower gear.
I´m using the 1.0 version and the latest firmware from Hammerhead: Build Version 1.352.1409

Reddit traction

Not an issue, but wanted to let you know that I think you may have gotten some new traction today from a reddit thread. Thanks for making and sharing this project!

reddit.com/r/Karoo/comments/zadz78/ki2_app_for_karoo_to_restore_di2_functionality/

Number of Syncro Attention Beeps

The default number of beeps seems to be 3. could this be reduced? I appreciate having an audio reminder of the upcoming shift etc. but the default number is tooo many! I also use the varia radar and the combo is overwhelming. I'd like just one beep for the di2 integration.

thnx, Doug

Garmin remote like Titan Lab Kommander...

I have seen that in ki2 v2.0 the option to use a remote control to pass screens has been added. This titan lab model is out of stock and I have a Garmin remote control. Is it not possible to add it as a sensor? It would be amazing!!!

Installing V0.7

Hi there, just tried installing the latest version, however getting the following error message. Does V0.6 have to be uninstalled first?

Thanks

image

Pause / Lap on long press

Is it possible to add the ability to map a long press on the hood buttons to one of the bottom buttons on the K2 so it can be used for pausing and / or lapping.

This way it would be possible to swap from the original behavior of the buttons.

Add support to remote

Hello! You’ve added support to di2 remotes like titan kommander (problem kommander is out of stock and it’s difficult to buy if you are in Spain etc).

You’re app it’s very interesting for gear but also for remote for Karoo (map etc).

Could you add support to garmin remote (not for di2 gears), but only for change screens etc. function that you have developed ;)

Regard
PS:I don’t know another remote (titan or garmin remote only)

thanks

Add compact overlay theme

Small request: the overlay takes a lot of room from the map. It's it possible to allow used to choose which info to show? for example, just the gear image and then remove everything below that?

Unable to add my Di2 system.

Firstly thanks for all your hard work. I've got a Giant ebike equipped with Di2 shifters. Single chainring, 11 cogs on the back. The right hand side shifters take care of the rear gear change whilst the left hand side shifters look after the power assist levels. The buttons on top of the hoods do nothing, but I'd love for them to control screens on the Hammerhead2.

Details.
Giant Revolt E+
Sensor-RideControl GO, frame integrated, Support up/down from STI levers
Shifters-Shimano GRX Di2 ST-RX815-R/L 1x11speed

So I've somehow managed to bumble my way through side loading the app onto the Hammerhead2 unit. I thought that would be that hardest part done. I can open the app. Searching for the device brings up Sensor 64475, but there's no "ADD" button off to the right to push.

Hammerhead2

It seems to me (a technical dummy) that the Di2 sensor can be seen, but I'm not able to connect to it.
The Karoo is only new, it's still in the 45 day satisfaction period, so if I can't get this sorted I can send it back and grab a Garmin/Wahoo. I'd much rather keep it though.
Any help would be great. Cheers.

Option to preload based on profile?

If I understand the preload option correctly this is what allows Ki2 to be launched so the data fields load in the ride app. Not all of my bikes have Di2 so it would be awesome to be able to control which profiles preload Ki2 so that it's not running when I'm not riding a bike that has Di2.

Add support to control lights witch switches

Within the control options. Navigate left / rigth, go to the map screen, etc... It would be interesting to be able to turn lights on/off, as is allowed in Garmin. Is it possible?

Feature request: e-bike support

In 2018, when I have Wahoo Bolt bike computer (and it does not support Japanese e-bikes officially), it was possible to pair e-bike with bike computer as Di2 sensor to view e-bike battery %. May be it is possible to add this functionality (with small amount of time investment) into ki2?

For now, Karoo 2 and Ki2 doesn't see e-bikes at all.

Feature Request: Delay for shift warning audio

It would be nice if there would be a delay of 15 seconds or so for audio/beep warnings of trying to shift past highest/lowest gear. That way if you hit the shifter really quick a few times it doesn't cause the beeper to go off multiple times.

Feature request: Synchro Shift notification

Garmin's implementation of Di2 support shows an on screen notification and beeps when upon the next shift Synchro Shift will shift the front derailleur either up or down. It would be amazing if Ki2 could do the same.

This is a similar feature to #70 but is only relevant when in Synchro Shift Mode 2.

Additionally, this feature requires being able to obtain the front derailleur shift points from the Di2 system. Since this can, in theory, be changed on the fly using the iOS/Android App this probably needs to be regularly updated or requested when it is required depending on latency.

Feature Request: Ability to rename Di2 sensors

If you ride more than one Di2-equipped bike and switch the Karoo between them, it can be difficult to tell which Di2 sensor corresponds to which bike, because the devices appear in the ki2 list as "Di2 someRandomNumber". It would be awesome if you could rename the devices into something more user-friendly, for example:

"Aethos Di2"
"Creo Di2"

etc. I believe the wahoo and/or Garmin computers let you do this, as well as the Karoo itself. A logical place to add a "Rename" button would be on the screen that comes up when you touch a sensor in the list (e.g. where the "Remove" button is")

No data displayed for gear count, Gears, shift battery,

Version 2.0, I do have drivetrain and it works well and really like that display. Hood buttons are working well and I checked that buttons only was not selected.
Side note, are you in Ukraine? I spent quite a bit of time there about 10 years ago, various cities. Loved it.

Gear ratio

I don't know how are this would be but I would throw it out there.

Is it possible to add and show the gear ratio instead of numbers? for me, numbers are nothing, gear ratio is huge.

I donated for your coffee. I hope it's not Starbucks xD

I will keep donating to maintain and improve it. Thank you!!!!

Functionality dies if there is a device data field without a device

  • Inserted a graphical heart rate data field
  • Inserted a numeric gear field on the same page
  • Did not have a heart rate monitored paired to device
  • After @ 15 mins of riding, the shift indicator started to become unresponsive
  • After @ 5 additional minutes, shifter data field displayed N/A and become non functional

Di2 Connection lost during rides but doesn't come back

I'm relatively new to this and started with the 3.7 version a few weeks ago (just got the Karoo v2) - updated to 4.0 on 4/10.

The Di2 info is available during the first part of the ride but then disappears (shows N/A on the data and graphical drivetrain fields). I believe this also happened on 3.7.

I switch screens in the same profile (don't switch profiles during a ride) so I'm not sure if that triggers something not working.

Sensors sometimes go in/out of connected status like the Garmin Varia but generally come back. I wasn't sure if this was reported so thought I would check. Thanks.

Teeth programming

how can I program the number of teeth on the cassette and the front sprockets?

Conecting to Device

Sideloaded onto the Karoo 2 no problem, however I am having problems connecting to the DI2. The app starts the search but cant seem to find the DI2 on the bike? Any suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.