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 

  • Also, codes for the Bontrager ION 800 RT:

    1 - Solid (full brightness)

    2 - Solid (mid-brightness)

    5 - Solid (low brightness)

    63 - Day flash

    62 - Night flash

  • Thanks for the light codes. Can you please confirm that 4 is really the low/peloton mode and 5 is the brighter solid mode? I am asking this because RTL515 has 4 for "Solid" and 5 for "Peloton/low" light mode. It seems strange to me that they switched the two numbers for RCT715, especially because in the ANT+ specification it states that number 4 should represent a brighter beam that number 5.

    I've been using SBL for a while and find that the mode always starts as manual, is there any way to get it to default to smart on startup?

    The control mode (M/S/N) should be preserved when restarting your Garmin device, so it should always start from the last control mode. If I understood you correctly, the light starts always in "M" control mode, even if it was "S" the last time you used it? If that is the case, can you please share what Garmin device do you use and the lights configuration that you have for SBL?

  • Sorry, I did indeed mix up 4 and 5, 4 is the brighter one.

    For the control modes, yes, it keeps resetting to "M". Normally I turn on, start the timer (lights set to turn on with timer in Garmin settings), then I have to switch to "S" and I press nothing more for the whole ride, stop the activity and turn off. Next time I turn on it is back to "M".

    I just got a new rear light so haven't fully tested with that yet, but before I had the Bontrager ION 800RT and Garmin Varia RTL510, in use with the Garmin Edge 1030 Plus, with the following config:

    ##2,2!Night:1:62:0:0Es-1800,r1800!:1:63:0:0D=1#0,73404416#2,2!Night:1:6:0:0Es-1800,r1800!:1:7:0:0D=1#7,6:ION 800RT!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#0::#0:0#B3570#99#2#0#1

  • Thanks again for lights codes, both Ion 800 RT and RCT715 were added to the configurator.

    I see what is the problem... because you don't have a global filter that would turn off the lights after finishing an activity, the lights are turned off by Edge when shutting down, which SBL detects it as an external change and sets the control mode to M right before Edge is turned off. Unfortunately, there is no way to detect that the lights were turned off because Edge is shutting down, so it behaves exactly the same as it would when manually switch the light mode by pressing the physical button on the light. My advice would be to add a global filter that will turn off the lights after an activity, which will prevent switching from S to M. In case you don't want such filter, then you can try enabling "Force Smart mode" for both lights. Force Smart mode will prevent the Smart mode to be deactivated by an external change, but it could also prevent the lights to be turned off when shutting down Edge. In case you are fine with the mentioned global filter you can use this configuration (updated to RCT715 and Ion 800 RT):

    1,1!:1H]0#4587520,196641#2,2!Night:1:2:0:0Es-1800,r1800!:1:5:0:0D=1#0,73535488#2,2!Night:1:6:0:0Es-1800,r1800!:1:7:0:0D=1#7,6:Ion 800 RT!2,:-1,Off:0!1,High:1!1,Medium:2!1,Low:5!1,Day Flash:63!1,Night Flash:62#6,5:Varia 715!2,:-1,Off:0!1,Solid:4!1,Peloton:5!1,Day Flash:7!1,Night Flash:6#0::#0:0#B3570#9#11#0#0

  • Sounds perfect, will give that a go, thanks!

  • With the newly released version 0.19.0, the following requested features were added:
    - Gradient filter (only for high memory devices with barometer)
    - Larger light and battery icons when only one light is paired (only for high memory devices)

                

  • Thank you for the bigger icon. Great.

  • Hello, thank you for this very useful Data Field !

    I have a Edge 830 that is paired with a Varia UT 800 in front and a Varia RTL 515 as taillight.

    I made several attempts to configure the Smart Bike Lights but I get errors...

    Could you help me configure it properly to do the following :

    RTL 515 :
    Default light is OFF.
    Radar - activate Day Flash - when Speed > 8km and a car is approaching
    Brake - activate Solid - when speed > 8km and I use the brakes

    UT800 :
    Default light is OFF.
    Frontlight : activate Day Flash when Speed > 8km
    This would be a great beginning :)
    Thank you
    François
  • Hi, here is the configuration:

    1,1!:1H]0#0,73413136#2,2!:1:7:0:0C]2.22222!:1:0:0:0D=1#0,73535488#5,3!BRAKE:2:4:0:0A[-10C]2.22222!RADAR:2:7:0:0C]2.22222I]-1]0!:1:0:0:0D=1#7,6:Varia 800!2,:-1,Off:0!1,High:2!1,Medium:3!1,Low:4!1,Night Flash:6!1,Day Flash:7#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#B3122#4#3#0#0

    it also contains a global filter that will turn on the lights only when an activity is running in order to avoid switching from Smart to Manual control mode when restarting Edge. Regarding braking, you can fine tune the sensibility by modifying the "Acceleration" filter.

  • Wow, thank you for your lightning fast help ! I will test it as soon as possible Slight smile