Smart Bike Lights (Data Field) / Bike Lights Control (Widget)

I've made two open source CIQ applications to control ANT+ lights:

- Smart Bike Lights (data field): https://apps.garmin.com/en-US/apps/0d9fd828-c932-4470-9c37-fd2828881888 

      Configurator: https://maca88.github.io/SmartBikeLights/ 

- Bike Lights Control (widget): https://apps.garmin.com/en-US/apps/fa3c2332-76e3-4ba1-8528-32a0fd617ab1 

     Configurator: https://maca88.github.io/BikeLightsControl/ 

Smart Bike Lights features:
- Automatic light control (Smart mode) based on the configured filters (sunset, sunlight, speed, ...)
- Manual light control (only for Edge devices with a touch screen or devices with CIQ 3.2 and more than 32KB memory)
- Records lights modes that are displayed in Garmin Connect

Bike Lights Control features:
- Manual light control (available to all devices)

Both applications can be installed on the same device, which can be useful for low end devices (e.g. Edge 520) where "Bike Lights Control" can be used to change light modes manually and "Smart Bike Lights" for automatic light control.

Currently registered ANT+ lights:
- Bontrager Ion Pro RT
- Bontrager Ion 200 RT
- Bontrager Flare RT
- Garmin Varia RTL500
- Garmin Varia RTL510
- Garmin Varia RTL515
- Garmin Varia HL500
- Garmin Varia UT800

in case your ANT+ light is not on the list you can help by doing the following:

1. Install Bike Lights Control
2. Pair your bike light with your Garmin device
3. Open the widget:
- Edge with a touch screen: post which numbers are displayed on the buttons and what mode each button represents when pressed
- Other devices: Select the "Light modes" menu and post which numbers are displayed in the menu and what mode each menu item represents when selected

Example for Bontrager Ion Pro RT:


1 -> High steady beam
2 -> Medium steady beam
5 -> Low steady beam
63 -> Day flash
62 -> Night flash

There are some features that could be possible to add in the future, but would require Garmin to add them to the CIQ api. In case you are interested in any of the below features, consider upvoting their feature request thread:

1. Control lights based on the ambient light sensor available on some devices:
https://forums.garmin.com/developer/connect-iq/i/bug-reports/ambient-light-sensor-api-access 

  • Unfortunately, I don’t see any errors in Garmin’s error reporting tool. To better understand what’s going wrong, I’ll need you to provide the crash logs found on your device in the following file: GARMIN/APPS/LOGS/CIQ_LOG.YML.

    Out of curiosity, why are you using Bike Lights Control widget instead of Smart Bike Lights data field on Edge 840?
    On new Edges (840, 1040, ...), the widget behaves like an CIQ application, which means that when you close it, the light modes will be reset. 

  • Hi @maca88 I’ve just got a varia 515 (with my ION 200 RT). I would like both light on night flashing 30mins before sunset and 30mins after sunrise and in the day front day flashing and rear off unless car detected then day flash and back to off when no car detected: these are the configuration but I still get day flash in day all the time on both. Not sure what Range operator is , threat is greater than none and can’t see any posts above with best settings.

    Any suggestions:

    #4587520,196641::1:#2,2!:1:62:0:0Es1800,r-1800!:1:63:0:0D=1#0,73535488::1:#3,3!Night:1:6:0:0Es-1800,r1800!Car:1:7:5:0I]-1]-1!:1:0:0:0D=1#6:Ion 200 RT!Off:0!High:1!Medium:2!Low:5!Day Flash:63!Night Flash:62#5:Varia 515!Off:0!Solid:4!Peloton:5!Day Flash:7!Night Flash:6#0::#0:0#0#0#B3121#2#3#1#0

  • Hi,

    there are two issues with the configurations:

    1. The Night Flash group for the headlight has the offsets inverted

    2. The Bike radar filter is missing the threat operator Greater than None

    Here is the corrected version:

    #4587520,196641::1:#2,2!:1:62:0:0Es-1800,r1800!:1:63:0:0D=1#0,73535488::1:#3,3!Night:1:6:0:0Es-1800,r1800!Car:1:7:5:0I]-1]0!:1:0:0:0D=1#6:Ion 200 RT!Off:0!High:1!Medium:2!Low:5!Day Flash:63!Night Flash:62#5:Varia 515!Off:0!Solid:4!Peloton:5!Day Flash:7!Night Flash:6#0::#0:0#0#0#B3121#2#3#1#0

  • Legend. Thanks so much. Will test it out tomorrow. 

  • Hi 

    I recently bought Magene AT1600, seems quite interesting Light. I can create my own custom modes, and remove default ones which I don't like.
    But when I connect to Smart Bike Lights - it show me only all default modes. Interesting that I deleted most of the default modes, but your app somehow still able to trun these modes on :). 

    My question: how can I use my own modes? (I can setup custom brightness)

    Second question: I have also Trek Commuter Pro RT, and Garmin UT800 - one of these I plan to use on my helmet in trails. Because it's on helmet, it's hard to turn on/off or even change modes. So I would like to use it with your app to control. 

    But I do not see how to add second headlight? 

    And last thing, is it possible would be add Di2 shifter buttons - to control my helmet light? Click + hold = On / Off, Click = change mode, Double Click = switch flash mode (this is very good to use instead of bicycle bell in night - people take attention, btw. I was able to configure this with default light network in Garmin with Garmin UT800, but when it was only single light, at that time I didn't know your app and didn't had Bontrager Flare RT, Trek Commuter Pro RT or Magene AT1600 - I don't want to change modes for all lights, just for helmet :))

    Basically I would like to have such config: Magene AT1600 as Headlight, Bontrager Flare RT as Taillight - Smart mode for these (with automations / control via app), AND Trek Commuter Pro RT - as Helmet light - manual control (click Di2 button), when I need on trail sections turn On / Off, and when needed to alert people or drivers - Strobe flashing light (double click on Di2 button on / off flashing)

  • Hi,

    But when I connect to Smart Bike Lights - it show me only all default modes.

    Smart Bike Lights can pick up modes that are emitted by the light via the ANT+ protocol. Based on the description, it seems that only the default modes can be activated via ANT+.
    What does happen when you select a custom mode, which button is highlighted on the Smart Bike light panel? I am assume none, is that correct?

    But I do not see how to add second headlight? 

    You need to install also "Smart Bike Lights #2" data field as each "Smart Bike Lights" data field can support only one headlight.
    When you have both "Smart Bike Lights" data fields installed, then you can configure Trek Commuter Pro RT on "Smart Bike Lights" and UT800 on "Smart Bike Lights #2" data field.

    nd last thing, is it possible would be add Di2 shifter buttons - to control my helmet light?

    Smart Bike lights does not support Di2 shifter. Di2 shifter is using a private ANT+ network and without having the private network key, it is not possible to connect to it. Even if someone leaked the private key, you would need to choose to either use Di2 shifter buttons only with Smart Bike Lights or with the native Garmin application, as only one application can connect to the shifter (either native application or a custom CIQ application).

    Trek Commuter Pro RT - as Helmet light - manual control (click Di2 button), when I need on trail sections turn On / Off, and when needed to alert people or drivers - Strobe flashing light (double click on Di2 button on / off flashing)

    are you able to achieve this behavior if you pair only Trek Commuter Pro RT with Garmin? If yes, then you can pair the other two lights by using the "Individual Lights Network" feature, so that the Di2 button will not affect them

  • Di2 is not directly connected to Lights, it is connected to Garmin - and Garmin configure what to do when you press Di2 button. In my case I set that I manage Lights: single press, double press, etc (left Shifter soft button). So, it manage Garmin Light Network (as I understand).
    So, maybe your app can expose trigger, which I can select on Di2 button? (for now I see only default list)

    Regarding Magene AT1600 custom Light modes - these default numbers (modes), are fixed for specific light model? or I can list somehow all available? (when I create custom mode, is it going to create new number?)

  • Here is my configuration: Garmin 1040
    https://www8.garmin.com/manuals/webhelp/GUID-0083D0A0-EA6E-41F0-8207-3F1498875E61/EN-US/GUID-D55C4084-492C-4403-91C1-2EB6BE0F78F6.html

    Garmin->Sensors->Shimano Di2->Di2 Button Setup->Di2 D-Fy Channel->Left Road Shifter
    - Single Press = Lights Change Mode
    - Press and Hold = Lights On/Off
    - Double Press = Lights On/Off

    Note: Di2 buttons for light actions have only two options: "Lights Change Mode" or "Lights On/Off"

    Garmin Light Network:
    - Light Mode = Individual
    And there is only 3 Modes when connected both lights Magene AT1600 & Bontrager Flare RT
    - Solid
    - Flash
    - Off

    When I Press Di2 Button:
    Single Press = Magene AT1600 (switch to Low or Strobe) & Bontrager Flare RT (Night Steady or Day Flash) switch to Solid or Flash (skip OFF)
    - Double Press = Magene AT1600 & Bontrager Flare RT switch OFF or ON

    Note: Even lights are OFF - if I Single press Di2 button - both lights start Flash (I guess because it is first Mode in Light Network)

    - If I want to turn ON light = I just Singe press Di2 button (first Flash mode, second time Solid for both lights) or I can Double press Di2 button. If I want to change
    - if I want to turn FLASH mode - warn people or drivers that I'm passing them, and want attention = I just press Single Di2 button - it will select Flash mode (even lights are OFF at that moment, if they are ON and Solid mode - it will change to Flash) for both lights.
    - If I want to Turn OFF lights = I just double press Di2 button.

    What I note: it seems there is a conflict with your app, when I select Smart mode, because Di2 buttons sends Light Network signals - it will work, but it will switch back to Smart mode after a few seconds.

    Desired configuration:

    1. Maybe your app can expose and add to the list in Di2 Button actions on Garmin. Then I would like to have actions:
    - Press and Hold = Lights On/Off (switch to Manual OFF, or switch back to Smart)
    - Single Press = Change Headlight Modes & Taillight Modes (Select which modes to rotate, create pairs)
    - Double Press = Headlight Modes & Taillight -  switch to Flash (switch to Manual Strobe, or switch back to Smart)

    2. If we stuck with Garmin action list for Di2 buttons. Can your app capture when Di2 button press and send to Light Network command:
    - "Lights Change Mode" -  Change Headlight Modes & Taillight Modes (select which modes to rotate, create pairs)
    - "Lights On/Off" - Lights On/Off (switch to Manual OFF, or switch back to Smart)



  • Update: if I use Di2 buttons - they change mode, and it will stay in selected mode until I switch my Garmin datascreen where is your app - then your app will switch back to Smart. This is correct, right?