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 

  • If you didn't changed the configuration, then you need to start an activity in order the lights to be turned on. In case you want the lights to be working regardless the activity status, use the following configuration which doesn't contain the global filter:

    #0,73413136#4,4!TUNEL:1:3:0:0G[4!DAY:1:7:0:0Er0,s0!NIGHT:1:3:0:0Es0,r0!:1:0:0:0D=1#6291461,1409482753#5,5!BRAKE:1:1:0:0A[-10!TUNEL:1:5:0:0G[4!DAY:1:7:0:0Er0,s0!NIGHT:1:63:0:0Es0,r0!:1:0:0:0D=1#6:Varia 800!Off:0!High:2!Medium:3!Low:4!Night Flash:6!Day Flash:7#6:Flare RT!Off:0!Day Steady:1!Night Steady:5!Day Flash:7!All-Day Flash:8!Night Flash:63#0::#0:0#B3121#4#1#0#0

  • Thanks again for your patience, that is what I have done, I have started an activity manually and they do not turn on, I have not been able to get S mode to work with my garmin, I am thinking of buying the 1030 plus which seems to work better

  • That is strange... make sure that you pasted the configuration to "Lights Configuration" app setting and "Current Configuration" app setting is set to "Primary".
    In order to test whether the configuration is set, try to switch light modes by using the physical button on the lights. If you see "?" near the light icon (https://github.com/maca88/SmartBikeLights#icons), then the configuration was not set correctly.

  • I finally got it!! solution, I deleted the app and reinstalled it and it works perfectly. I am very happy and wanted to thank you for your help. How could I add to the configuration that when the computer is paused the lights turn off and on resume they turn on again?

  • You can do this with a global filter by adding "Timer State > Recording Paused", here is the configuration:

    1,1!:1H]2#0,73413136#4,4!TUNEL:1:3:0:0G[4!DAY:1:7:0:0Er0,s0!NIGHT:1:3:0:0Es0,r0!:1:0:0:0D=1#6291461,1409482753#5,5!BRAKE:1:1:0:0A[-10!TUNEL:1:5:0:0G[4!DAY:1:7:0:0Er0,s0!NIGHT:1:63:0:0Es0,r0!:1:0:0:0D=1#6:Varia 800!Off:0!High:2!Medium:3!Low:4!Night Flash:6!Day Flash:7#6:Flare RT!Off:0!Day Steady:1!Night Steady:5!Day Flash:7!All-Day Flash:8!Night Flash:63#0::#0:0#B3121#4#1#0#0

  • thank you very much friend, the last help, can you repeat the same filter? For example, 1 hour before sunrise and 1 hour after sunset in the UT800 lighthouse, put a less powerful fixed light and at night high fixed light. example: from 7 a.m. to 7 p.m. day from 7:00 p.m. to 7:00 a.m. let's say it's the hours of dawn and dusk during the day day blink during the night fixed high light From 7:00 p.m. to 8:00 p.m. lower fixed light From 6 a.m. to 7 a.m. lower fixed light I don't know if I explained myself well, thanks in advance and I won't bother you anymore. a greeting

  • Yes you can do this by adding and additional filter groups for dusk and dawn with sunset/sunrise offsets, here is the configuration:

    1,1!:1H]2#0,73413136#6,6!TUNEL:1:3:0:0G[4!DAWN:1:3:0:0Er-3600,r0!DAY:1:7:0:0Er0,s0!DUSK:1:4:0:0Es0,s3600!NIGHT:1:2:0:0Es3600,r-3600!:1:0:0:0D=1#6291461,1409482753#7,7!BRAKE:1:1:0:0A[-10!TUNEL:1:5:0:0G[4!DAWN:1:5:0:0Er-3600,r0!DAY:1:7:0:0Er0,s0!DUSK:1:63:0:0Es0,s3600!NIGHT:1:63:0:0Es3600,r-3600!:1:0:0:0D=1#6:Varia 800!Off:0!High:2!Medium:3!Low:4!Night Flash:6!Day Flash:7#6:Flare RT!Off:0!Day Steady:1!Night Steady:5!Day Flash:7!All-Day Flash:8!Night Flash:63#0::#0:0#B3121#4#1#0#0

    Also the filter groups before DUSK had to be modified so that the time between filter groups (DAY, DAWN) do not overlap.

  • Enormous!! thank you very much for everything.

  • Hi maca88,

    The Smart Bike Lights is great! But I need help how to create configuration with filters.

    I have 2 pairs of Edge-Varia: RTL510 is paired with E830 and RTL515 is paired with E1030 Plus.

    My default light is OFF. I would like the Varia to flash on approaching traffic and turn off when clear. 

    I have configured the paired Lights with Lights configurator and using filter as following:

    • Group name: CAR

    Light Mode: Day Flash

    Activation delay in seconds: 2

    Dectivation delay in seconds: 20

    • Type: Bike Radar

    Bike radar Range = 200 meters AND Threat > None

    Please can you check if the following configurations are correct, if not, can you send me the correct configurations?

    Pair1 configuration: Varia RTL510 Edge830:

    ###0,73404416#2,2!CAR:1:7:20:1I=200]0!:1:0:0:0D=1##5,4:Varia 510!2,:-1,Off:0!1,Solid:4!1,Day Flash:7!1,Night Flash:6#0::#0:0#B3122##2#0#0

    Pair2 configuration: RTL515 & Edge1030 Plus:

    ###0,73535488#2,2!CAR:1:7:20:1I=200]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#B3570##3#0#0

    I am not sure if I should use the activation and deactivation delay.

    Any help would be appreciated.

  • Hi,

    the filter Range == 200 meters will not work for two reasons:

    1. Varia radar can detect vehicles up to 140 meters according to their specification

    2. The range from the Varia is reported as a floating number (94.45 meters) which means that having a filter with an exact value will never be triggered in practice

    Setting the Activation delay doesn't make sense in your case. In case you want to turn off the light only when the cars are closer to you, just set the Range filter (e.g. Range < 100 meters)

    With deactivation delay set to 20 seconds, it will leave the light on for 20 seconds after the car passed you. If this is what you want, then just leave it to 20.

    Here is the corrected configuration (activation delay set to zero and removed range filter) for Varia RTL510 & Edge 830:

    ###0,73404416#2,2!CAR:1:7:20:0I]-1]0!:1:0:0:0D=1##5,4:Varia 510!2,:-1,Off:0!1,Solid:4!1,Day Flash:7!1,Night Flash:6#0::#0:0#B3122##2#0#0

    and here for RTL515 & Edge 1030 Plus

    ###0,73535488#2,2!CAR:1:7:20: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#B3570##3#0#0