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 

  • In order to having your Varia turning on only when a car is detected, you need add a "Bike radar" filter to your configuration. Here is a simple configuration for it:

    ###0,73535488#2,2!CAR:1:7:0:0I]-1]0!:1:0:0:0D=1##6,5:Varia 515!2,:-1,Off:0!1,Solid:4!1,Peloton:5!1,Day Flash:7!1,Night Flash:6#0::#0:0#B2713##3#0#0

    you can edit the above configuration by going to https://maca88.github.io/SmartBikeLights/, paste the configuration into "Existing configuration" input and click on "Parse" button. Make sure that you set the light to Smart mode, "S" character should be visible inside the light icon.

  • Thank you. After clicking “Parse” Button do I then copy /overwrite the new configuration in the buttom of the page into smart Bike light lights configuration in Garmin Connect as I did with the standard configuration 

  • Yes, you can also just copy the configuration that I provided into Garmin Connect in case you won't modify it.

  • So now i get an error 4

    Is there a video how to ? 

  • Are you using "Smart Bike Lights" data field or "Bike Lights Control" widget? The configuration that I provided is for the "Smart Bike Lights" data field and not for the widget. The widget does not have the Smart mode and therefore the provided configuration on the widget will get you "Error 4".

  • I works now. “S” mode in upper left corner and then in “Off” mode.
    and I can also shift to other modes.  
    thank you for your great support

  • Do you have time to explain the difference between a data field and a widget? A simpleton such as myself can install anything off of connect IQ. I am always flubbergasted trying to find the file path to the app I just downloaded. 

  • Oh, that explains it :-)

    Thank you 

  • Here are the general differences between a data field and a widget:
    1. A data field can only be accessed by going to an activity (e.g. Bike), where a widget can be directly accessed by using the menu. For example, in Edge 1000 you can access widgets by swiping down and then swiping left (e.g. https://www.youtube.com/watch?v=_12KGr46kiE), where on a watch you can access them by using the "Up" button
    2. The widget is always displayed in full screen, where a data field can also be displayed on a smaller portion of the screen
    3. The lifecycle is different between the two. A data field is active only when inside an activity, where a widget is active only when accessed and can be terminated after closing it (depends on the device)
    4. A widget can have its own menu regardless the version of CIQ, where a data field supports a custom menu only on devices that have CIQ 3.2 or newer

    and here are the specific differences between "Smart Bike Lights" data field and "Bike Lights Control" widget:
    1. Only "Smart Bike Lights" data field has a "Smart" mode for automatic lights control
    2. Only "Smart Bike Lights" can record lights modes during an activity, which can be seen in Garmin Connect
    3. Both support manual light control by using a menu, but on "Smart Bike Lights" data field it is supported only for devices with CIQ 3.2 or newer, where on the widget it is supported for all devices

  • Thanks very much. Your tutorial helps a lot.