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 

  • Thanks. My varia use to start op in “S” off, mode and only flashes when Car is detected. That is missing in above code. I would also prefer that the front light start up in off mode when connected. Is that possible ? 

  • Here is the updated configuration that has the vehicle detection for Varia and I also added a filter to turn both lights after sunset:

    #4587520,196641::1#2,2!NIGHT:1:2:0:0Es0,r0!:1:0:0:0D=1#0,73535488::1#3,3!CAR:1:7:0:0I]-1]0!NIGHT:1:4:0:0Es0,r0!:1:0:0:0D=1#7,6:Ion 200 RT:0:16777215!2,:-1,Off:0!1,High:1!1,Medium:2!1,Low:5!1,Day Flash:63!1,Night Flash:62#6,5:Varia 515:0:16777215!2,:-1,Off:0!1,Solid:4!1,Peloton:5!1,Day Flash:7!1,Night Flash:6#0::#0:0#123!:123!#0#0#B3843#2#3#0#0

    During the day, both lights will be off, except for Varia which will flash when a vehicle is detected. Feel free to modify the configuration in the Lights Configurator.

  • Hi

    Absolutely great work. Probably the most useful data field in the whole Garmin Connect Store. i have many questions. let's start with the easiest one. Grinning

    What do two red bars and one red bar in the battery icon mean?
    I am interested in the approximate percentage of the charge level.
    In my specific case, it's about the Varia RTL 516.
    Can you say more precisely here or at least narrow down the values somewhat?

    Many thanks in advance.

  • Hi,

    I am interested in the approximate percentage of the charge level.

    Unfortunately, nowhere in the Varia manual is it mentioned the percentages for each battery level, so we can only guess. Based on my experience with Varia 515, I would say the following:

    5 bars -> 80% - 100%
    4 bars -> 60% - 80%
    3 bars -> 40% - 60%
    2 bars -> 20% - 40%
    1 bars -> 0% - 20%

  • Thx  
    Is it possible to switch off the radar function and only use the rear light?
    As an emergency power-saving solution when the battery is about to run out.

  • To the best of my knowledge, you can't turn off just the radar function while keeping the light on.

  • Hi all,

    One question - I have been successfully using SML datafield for years. My setup so far was bontrager ION PRo and Garmin Varia.

    recently I upgraded my setup and bought ION 200 headlight, of course I reconfigured datafield and everything works but datafield switches on my both headlights because they have the same light options.

    I would like to be able to control just one, configured in configurator.

    how can I do that?

  • Hi,

    If you want to control ION 200 separately from Ion Pro then you will have to install "Smart Bike Lights #2" and create two configuration. One configuration for Ion Pro + Varia and the other one for ION 200. For both configuration you will need to set the serial number in the configurator otherwise Smart Bike Light will control both lights at the same time. For more info you can check the documentation: https://github.com/maca88/SmartBikeLights?tab=readme-ov-file#control-multiple-lights-of-the-same-type 

  • Hi. Thanks for this. I’ve installed both applications (smart bike lights and bike controller) on my Edge 530 and connected with my flare RT and ION 200 RT. Done the configuration to set lights on day mode between sunrise/set and also brake make it go on solid for 2 seconds. 

    I just want this smart function to work when I set time and for the lights to switch off after finished timer. 

    I seem to be stuck on manual mode and off and can’t keep smart mode on. As I don’t have a touch screen it’s a pain to keep going back to settings and scroll through activity data screens. 

    any tips on what I’m doing wrong to keep in smart mode without having to select something each ride?

    thanks

  • I seem to be stuck on manual mode and off and can’t keep smart mode on

    That is odd. The data field will by default switch from smart to manual mode only when an external change happens (e.g. pressing the light physical button). How long does it stays in smart mode before switching to manual mode? Is this something that you can reproduce or it is random?

    For a quick fix, you can enable "Force Smart mode" in the configurator, which will prevent switching to manual mode even if an external change happens.