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 

  • Hi maca88,

    thank you very much for your help and explanation.

    I will save the new and correct configurations to my Garmin edges(830 and 1030).

  • Hi thread. I'm intrested what is optimal config for taillight for brakes!

  • Hi,

    I don't think there is an optimal configuration for the taillight brakes as is a matter of personal preference. I suggest that you try different configurations and see for yourself which one suits you most, if any.
    The main problem with taillight brakes, is that there will always be a delay of one to two seconds as the acceleration calculation is done once per second and there is also a delay when sending the message to the light via ANT+.
    Here are some examples for Edge 1030 and Flare RT:

    Acceleration < -10% seconds:
    ###6291461,1409482753#2,2!:1:7:0:0A[-10!:1:0:0:0D=1##7,6:Flare RT!2,:-1,Off:0!1,Day Steady:1!1,Night Steady:5!1,Day Flash:7!1,All-Day Flash:8!1,Night Flash:63#0::#0:0#B2713##1#0#0

    Acceleration < -20% seconds:
    ###6291461,1409482753#2,2!:1:7:0:0A[-20!:1:0:0:0D=1##7,6:Flare RT!2,:-1,Off:0!1,Day Steady:1!1,Night Steady:5!1,Day Flash:7!1,All-Day Flash:8!1,Night Flash:63#0::#0:0#B2713##1#0#0

    Acceleration < -20% seconds with one second for deactivation delay:
    ###6291461,1409482753#2,2!:1:7:1:0A[-20!:1:0:0:0D=1##7,6:Flare RT!2,:-1,Off:0!1,Day Steady:1!1,Night Steady:5!1,Day Flash:7!1,All-Day Flash:8!1,Night Flash:63#0::#0:0#B2713##1#0#0

  • Thanks for information. Same delay for GPS speed and sensor speed? Maybe is better to use iternal accelerometer of edge devices instead speed sensors to determine brake?

  • Same delay for GPS speed and sensor speed?

    Yes, the acceleration is calculated every seconds by comparing the current speed with the stored speed from the previous second. The current speed is retrieved from the speed sensor when available, otherwise from the GPS. In a data field you can do computation logic only once per second, this limitation was probably done to save battery life.

    Maybe is better to use iternal accelerometer of edge devices instead speed sensors to determine brake?

    In a data field we cannot access the accelerometer data the same way we can do with current speed. The accelerometer data can be accessed only in a background service for a short period of time (max 4 seconds) and then we need to wait for 5 minutes to access it again, which is practically useless.

  • hello,

          I bought the varia rtl515/Ut800 lights and installed your app. It works just fine with the edge 530 but it is posibble to exchange somehow the light icons (the icons which show the D and the battery level beneath the icon) so the headlight small icon is on the right side and the taillight on the left side? It is little bit annoying to have them on the wrong side. Or at least is there any way to add name to them? for example front - rear.

           Please can you look into my setup to check if the filters and their order is ok? My goal is to have Tunnel filter for both lights, break for rear light, Dusk filter for the front light and after dusk 3 different levels depending on speed. I want the daylight off if battery is OK or below for both lights (to save battery for night), but when a car approaches when on DAY mode even when the battery of the taillight is OK or below i need the tailight to flash (CAR filter). Also when the battery of the frontlight is below OK i want the high level to become medium level (MEDLOW filter).

    1,1!Start:1H]0#0,73413136#12,8!TUNNEL:1:3:2:0G[4!DAY:2:7:2:0Er1800,s-1800B[3!DUSK:1:6:2:0Es-1800,s1800!LOW:2:4:2:0Es1800,r1800C[4.16667!MEDIUM:2:3:2:0Es1800,r1800C[9.44444!HIGH:2:2:2:0Es1800,r1800B[4!MEDLOW:1:3:2:0Es1800,r1800!:1:0:0:0D=1#0,73535488#7,6!TUNNEL:1:7:2:0G[4!BREAK:1:4:1:0A[-10!DAY:2:7:1:0Er1800,s-1800B[3!NIGHT:1:6:1:0Es-1800,r1800!CAR:1:7:1:0I]-1]0!:1:0:0:0D=1#6:Varia 800!Off:0!High:2!Medium:3!Low:4!Night Flash:6!Day Flash:7#5:Varia 515!Off:0!Solid:4!Peloton:5!Day Flash:7!Night Flash:6#0::#0:0#B3121#4#3#0#0

    Thank you very much, it seems that someone who can set-up your app can run the lights longer than the Garmin app. Slight smile

  • Hi,

    it is posibble to exchange somehow the light icons (the icons which show the D and the battery level beneath the icon) so the headlight small icon is on the right side and the taillight on the left side?

    It was not possible to exchange the light icons until now. With the latest version 0.18.0 a new setting "Invert lights" was added, which will invert light icons and their positions (left/right).

    Please can you look into my setup to check if the filters and their order is ok?

    Your filters are fine, the only issue that I found is the order of the "CAR" filter group. "CAR" filter group needs to be above "DAY" group, otherwise it won't be used when the battery level will be above "OK". But as both "DAY" and "CAR" groups are using the same light mode ("Day Flash"), it won't affect how the light behave. The only difference is that the "CAR" text won't be displayed above the light icon when a car will approach you. You can fix that by moving the "CAR" group above "DAY" group and adding an additional filter to it, so that it will work only in daytime. Here is the configuration with the modified "CAR" group and a typo fix (BREAK -> BRAKE):

    1,1!Start:1H]0#0,73413136#12,8!TUNNEL:1:3:2:0G[4!DAY:2:7:2:0Er1800,s-1800B[3!DUSK:1:6:2:0Es-1800,s1800!LOW:2:4:2:0Es1800,r1800C[4.16667!MEDIUM:2:3:2:0Es1800,r1800C[9.44444!HIGH:2:2:2:0Es1800,r1800B[4!MEDLOW:1:3:2:0Es1800,r1800!:1:0:0:0D=1#0,73535488#8,6!TUNNEL:1:7:2:0G[4!BRAKE:1:4:1:0A[-10!CAR:2:7:1:0I]-1]0Er1800,s-1800!DAY:2:7:1:0Er1800,s-1800B[3!NIGHT:1:6:1:0Es-1800,r1800!:1:0:0:0D=1#6:Varia 800!Off:0!High:2!Medium:3!Low:4!Night Flash:6!Day Flash:7#5:Varia 515!Off:0!Solid:4!Peloton:5!Day Flash:7!Night Flash:6#0::#0:0#B3121#4#3#0#0

    In case you want that the "CAR" filter has a higher priority than braking, then just move it above "BRAKE" group.

  • thank you very much for helping me. i have already tried and it works, the light icons are on the <correct> side now. Thank you 

  • Hi maca88,

    What does really mean the Threat Operator in the "Bike Radar" filter?
    I have created a Filter Group named CAR, and filter "Bike Radar" as following:
    Threat Operator Greater than NONE.
    If change this to:
    Threat Operator Greater than MEDIUM

    Will this change the behaviour of the Taillight(RTL515) when a car approaches?

  • Hello. Thanks again for absolutely perfect app. I have been using this for close to half a year with no problems.

    To my question.

    Is it possible to use multiple device IDs with config using Use Individual Light Network?

    I sometimes connect to my personat radar TL515 and sometimes conect to my fathers radar TL515 when we are going on ride together.

    Now i have set up two configurations with specific device numbers, that works well but it is kind of pain to always put phone out and change config in IQ app before ride.