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 

  • No network means that your lights are not paired with your Garmin device. I don't have Cycliq lights so I don't know how well they support ANT+, try this link to pair the lights: https://cycliq.com/support/ce601/how-to-guides/ce-to-antconnection-guide-for-fly6-ce/ 

  • Hi,, I have verified that I am paired ( removed both and repaired for any case) 

    My garmin device is fenix 6spro , i can chose a mode from there and it works.

    I wanted to pull the numbers to use with data field , but the widget either says no network, or error 1 or IQ with exclamation mark.

  • That is really strange. Can you please try to pair only one light at a time to see whether the widget works with one light paired. So for every light try to do the following:
    1. Remove all paired lights
    2. Pair only one light
    3. Check whether the widget still shows "No network"

  • yes, tried again removing both and re-adding only one... the widget sometimes does detect one light ( paired one ) but opening it get again iq logo with exclamation mark and no menu. , the lights are available and light mode changeable in the garmin menu ... which is a nightmare to get into on fenix.... , tbh i was hoping to pull numbers to use with the automatic data screen ... I can tell you what garmin light modes say... but there are no numbers... 

  • Thanks for trying it out. Unfortunately the reported crash from your fenix 6S Pro does not tell exactly where the problem is, so in order to find the root of the issue, I will create a test widget that will print the light information in a log file. From these information I will be able to see what are the differences between Cycliq and Garmin/Bontrager lights and hopefully find a solution to fix the issue. I will let you know when the test widget will be ready and I will provide the instruction how to use it in case you will be willing to test it out.

    I can tell you what garmin light modes say... but there are no numbers... 

    Yes, you can still tell me what light modes you see in the Garmin menu. This will help me out when I will get the required information from the test widget.

  • I've made the test widget, so in case you are willing to try it out, follow the following instruction: https://github.com/maca88/SmartBikeLights/tree/tester/Source/LightTester 
    For fenix 6SPro the `LightTester.prg` can be downloaded here: https://github.com/maca88/SmartBikeLights/blob/tester/Source/LightTester/build/fenix6SPro/LightTester.prg 
    On step 10 the content inside `LightTester.TXT` should be copied here.

    This is how LightTester.TXT content looks like for my Bontrager ION Pro RT:

    Net ST=2 MD=0 T=50693
    T_L: 1
    L0: TY=0 ID=1 LM=0 CM=[0, 1, 2, 5, 63, 62] BS=3
    UPD: TY=0 ID=1 LM=62 BS=3 T=55494
    UPD: TY=0 ID=1 LM=63 BS=3 T=57494
    UPD: TY=0 ID=1 LM=1 BS=3 T=59494
    UPD: TY=0 ID=1 LM=2 BS=3 T=61494
    UPD: TY=0 ID=1 LM=5 BS=3 T=63494
    UPD: TY=0 ID=1 LM=62 BS=3 T=66494
    UPD: TY=0 ID=1 LM=63 BS=3 T=68494
    UPD: TY=0 ID=1 LM=0 BS=3 T=71494
  • Thank you so much , I will test it in the evening today when I am at home. And report back.

  • This setup does not work (error4) :( I need the Bontrager ION200RT to turn on automatically in "Day Flash" mode after enabling recording in Garmin Edge 830 and the Garmin Varia RTL510 only flashed when the vehicle is approaching. I cannot set it :(

  • This setup does not work (error4)

    If you are referring to the configuration in this post, then that is because it was for Varia 515.

    This configuration should work:
    1,1|:1H]0#4587520,196641#1,1|:1:63:1D=1#0,73404416#2,2|CAR:1:7:1I]-1]0|:1:0:1D=1#7,6:Ion 200 RT|2,:-1,Off:0|1,High:1|1,Medium:2|1,Low:5|1,Day Flash:63|1,Night Flash:62#5,4:Varia 510|2,:-1,Off:0|1,Solid:4|1,Day Flash:7|1,Night Flash:6#B3122#2#2#0#0

    it will turn the ION 200 RT to Day Flash went recording and the Varia light will be turned on to mode "Day Flash" only when a vehicle is approaching and the timer is recording. But don't forget to set the control mode to smart mode "S" for both lights.

  • FLY6 CE and Fly12 CE .. settings seem same for both, the only peculiar thing, is once started they only momentarily report to widget and after that it goes network not found , they are still controllable thru the garmin menu , but it seems garmin is re-establishing ant+ connection every time.

     below is the whole file on few connex reattempts.

    Net ST=2 MD=0 T=154681889
    T_L: 1
    L0: TY=2 ID=1 LM=0 CM=[0, 1, 2, 3, 6, 7, 63, 62, 61, 60, 59, null] BS=3
    Net ST=2 MD=0 T=154702427

    T_L: 1
    L0: TY=0 ID=1 LM=0 CM=[0, 1, 2, 3, 6, 7, 63, 62, 61, 60, 59, null] BS=4
    Net ST=2 MD=0 T=155176821

    available settings are:

    constant high, medium, low

    flash high, medium ,low

    pulse high, medium, low

    off

    full log 

    Net ST=2 MD=0 T=154681889
    T_L: 1
    L0: TY=2 ID=1 LM=0 CM=[0, 1, 2, 3, 6, 7, 63, 62, 61, 60, 59, null] BS=3
    Net ST=2 MD=0 T=154702427
    T_L: 1
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    Net ST=2 MD=0 T=154837043
    T_L: 2
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    L1: TY=7 ID=2 LM=0 CM=null BS=null
    Net ST=2 MD=0 T=154850183
    T_L: 2
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    L1: TY=7 ID=2 LM=0 CM=null BS=null
    Net ST=2 MD=0 T=154860999
    T_L: 2
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    L1: TY=7 ID=2 LM=0 CM=null BS=null
    Net ST=2 MD=0 T=154867358
    T_L: 2
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    L1: TY=7 ID=2 LM=0 CM=null BS=null
    Net ST=2 MD=0 T=154983791
    T_L: 1
    L0: TY=2 ID=1 LM=0 CM=[0, 1, 2, 3, 6, 7, 63, 62, 61, 60, 59, null] BS=5
    Net ST=2 MD=0 T=154989706
    T_L: 1
    L0: TY=2 ID=1 LM=0 CM=[0, 1, 2, 3, 6, 7, 63, 62, 61, 60, 59, null] BS=5
    Net ST=2 MD=0 T=154992765
    T_L: 1
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    Net ST=2 MD=0 T=154995793
    T_L: 1
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    Net ST=2 MD=0 T=154998979
    T_L: 1
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    Net ST=2 MD=0 T=155009808
    T_L: 1
    L0: TY=7 ID=1 LM=0 CM=null BS=null
    Net ST=0 MD=null T=155069305
    Net ST=0 MD=null T=155084148
    Net ST=0 MD=null T=155089715
    Net ST=2 MD=0 T=155113353
    T_L: 1
    L0: TY=0 ID=1 LM=0 CM=[0, 1, 2, 3, 6, 7, 63, 62, 61, 60, 59, null] BS=4
    Net ST=2 MD=0 T=155176821
    T_L: 1
    L0: TY=7 ID=1 LM=0 CM=null BS=null