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 

  • This warning was added because Varia radar for some reason detects targets with threat operator "None", which don't represent a real vehicle and are ignored by Garmin devices. By not setting the threat operator to ignore "None" targets, the light will be turned at random times as "None" targets are most likely random objects (e.g. trees, road signs...) that the radar also detects.

  • yes, I understand now. Thank you.

  • maybe idea, is it possible to add operator "equal or greater than"? and use it with medium threat level?

  • Currently you can achieve "Equal or greater than" by using "Greater than" with a smaller value. For the threat level, using "Greater than None" is equivalent to "Equal or greater than Medium". I will check what would it mean in terms of memory consumption to add "Equal or greater than" and "Equal or lower than" support and I may add it in the next release. 

  • Thanks. I am sure you will figure what or how, for people who would need reading glasses managing the screen (Edge 1030 in my case), but otherwise no bueno for bike riding Slight smile

  • In the newly released Smart Bike Lights version 0.24.0 the following features were added:
    - Added options to configure active light mode button, light icon and separator line colors
    - Added Greater/Lower Than or Equal operators

    The separator color can be selected in the Lights Configurator right after the device is selected:

    select "No separator" in case you don't want the separator to be displayed.


    The icon color can be selected in the light configuration section:

    The active light mode button can be selected in the light panel section (only for Edge touchscreen devices):

    by default it will use the color from the "Activity color" app setting.

  • Is it possible to control light modes in bontrager ionpro 1300 with garmin edge 530 with the screen on data field? Cant crack this

  • Hi maca88,

    thank you for the new Release with various colours.I have tried it, it's great. btw, it seems the colour Yellow is not working correctly. For my Taillight RTL515, I have tried the colour orange in my configuration, then changed to yellow, as you see in the image below, the Light Panel colour remained orange. Here below is my configuration:

    1,1!NOLIT:1H]1#0,73413136::16711680#3,3!UTDAY:1:7:0:0Er0,s0!UTNIGH:1:6:0:0Es0,r0!:1:0:0:0D=1#0,73535488::16755200#6,4!CARDAY:2:7:0:0I]-1]0Er0,s0!CARNIG:2:6:0:0I]-1]0Es0,r0!BRAKE:1:4:0:0A[-10!:1:0:0:0D=1#7,6:Varia 800:16711680!2,:-1,Off:0!1,High:2!1,Medium:3!1,Low:4!1,Day Flash:7!1,Night Flash:6#6,5:Varia 515:16755200!2,:-1,Off:0!1,Solid:4!1,Peloton:5!1,Day Flash:7!1,Night Flash:6#0::#0:0#3!0:3!6#-1#B3570#4#3#0#0

  • The only way for manually changing the light mode on Edge 530 is to use the on-device settings:
    1. On the data screen where you have the data field press the Menu button to open the menu
    2. Navigate to Data Fields -> Connect IQ data fields -> Smart Bike Lights -> Light modes and change to the desired mode

  • Hi,

    it seems the colour Yellow is not working correctly

    The color values were taken from the Garmin API documentation (https://developer.garmin.com/connect-iq/api-docs/Toybox/Graphics.html):

    Garmin uses hex value FFAA00 for yellow which I agree with you, it is more orange that it is yellow (https://colorpicker.me/#ffaa00).
    If you want a true yellow you could modify your configuration by changing the value "16755200" to "16776960":

    1,1!NOLIT:1H]1#0,73413136::16711680#3,3!UTDAY:1:7:0:0Er0,s0!UTNIGH:1:6:0:0Es0,r0!:1:0:0:0D=1#0,73535488::16776960#6,4!CARDAY:2:7:0:0I]-1]0Er0,s0!CARNIG:2:6:0:0I]-1]0Es0,r0!BRAKE:1:4:0:0A[-10!:1:0:0:0D=1#7,6:Varia 800:16711680!2,:-1,Off:0!1,High:2!1,Medium:3!1,Low:4!1,Day Flash:7!1,Night Flash:6#6,5:Varia 515:16776960!2,:-1,Off:0!1,Solid:4!1,Peloton:5!1,Day Flash:7!1,Night Flash:6#0::#0:0#3!0:3!6#-1#B3570#4#3#0#0

    Based on that, I will most likely update the current color selection to be able to choose from colors that Garmin provided in the visual design documentation:

    https://developer.garmin.com/connect-iq/user-experience-guidelines/incorporating-the-visual-design-and-product-personalities/