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 

  • Hello 

    The VARIA UT800 has automatic speed-dependent light control. The faster you cycle, the brighter the lamp lights up in automatic mode.

    However, I would like to use my own values, which works so far but the automatic control continues to run in parallel even though I am in smart mode. I would like LOW up to 24km/h, MEDIUM up to 34km/h and HIGH from 35km/h.
    Where is the error?

    #0,73413136::1#4,4!Start:1:0:0:0H=0!25kmh:1:3:0:0C}6.94444!35kmh:1:2:0:0C}9.72222!:1:4:0:0D=1###7,6:Varia 800:0:16777215!2,:-1,Off:0!1,High:2!1,Medium:3!1,Low:4!1,Night Flash:6!1,Day Flash:7##0::#1:0#123!2,4:123!#0#0#B4169#4##0#0

  • #0,73413136::1#3,3!25kmh:1:3:0:0C}6.94444!35kmh:1:2:0:0C}9.72222!:1:4:0:0D=1###7,6:Varia 800:0:16777215!2,:-1,Off:0!1,High:2!1,Medium:3!1,Low:4!1,Night Flash:6!1,Day Flash:7##0::#1:0#123!:123!#0#0#B4169#4##0#0

  • thx 
    I have not yet been able to test whether it works, but what was the error?
    As far as I can see, you have only removed the Start group. This is only active when the device is not recording.
    I would like to understand it.

  • Hi,

    your configuration is fine and it should do what you described. In order to disabled UT800 speed dependent light mode you need to go to Garmin Sensors menu and change the "Light Mode" option to "Individual" for UT800 light. That should solve the issue.

  • thx 
    I then have the permanent display INDV as the heading in the Light icon.
    No more group names are displayed.
    For example, the ones I created: START, PAUSE, BRAKE, CAR, Tunnel, 25kmH, 35kmh and others (I also have the VARIA Radar). I find this kind of additional information quite useful.

    Is INDV equivalent with the "Smart" control mode and can I simply switch off or hide the "Network" control mode to hide the INDV display?

  • I then have the permanent display INDV as the heading in the Light icon

    After switching the "Light Mode" to "Individual" you need to enable again the "Smart" mode in Smart Bike Lights, so you need to see the "S" character inside the light icon and not "N". The main goal to switch from (Auto/Trail/High Visibility) to "Individual" light mode is to disable the Garmin built-in behavior to automatically controlling the light and only use the "Smart" mode from "Smart Bike Lights" to control the light.

    Is INDV equivalent with the "Smart" control mode and can I simply switch off or hide the "Network" control mode to hide the INDV display?

    No, it is not. When you see the "N" character inside the light icon, Smart Bike Lights will leave the light to be controlled by the Garmin built-in Light Modes (Auto/Trail/High Visibility). The filters that you defined in the configurator will only work when the character inside the light icon is "S" (Smart). 

  • thx
    Do I understand this correctly?:
    If I prefer to use my set smart mode and sometimes manual and in the sensor menu i set to "Individual", I can hide "INDV" in the light icon settings like here:

    #0,73413136::1#4,4!Start:1:0:0:0H=0!25kmh:1:3:0:0C}6.94444!35kmh:1:2:0:0C}9.72222!:1:4:0:0D=1###7,6:Varia 800:0:16777215!2,:-1,Off:0!1,High:2!1,Medium:3!1,Low:4!1,Night Flash:6!1,Day Flash:7##0::#1:0#13!2,0:123!#0#0#B4169#4##0#0

  • If by hide you mean that it is not possible to select the Network mode (INDV) by tapping on the light icon then yes, you understood it right. In your case it makes perfect sense to remove the "Network" control mode from the list, so the updated configuration is good.

  • thx  
    That sounds great. Grinning

    I have one small suggestion for improvement.
    When restarting, the Edge starts in the same cortrol mode as it was switched off.
    That is logical and good so far.
    However, I almost only use Smart- and rarely switch to Manual control mode.
    I would like to have a setting option that specifies the mode in which the device always starts.
    Like: /last set/Smart/Manual/INDV

    Another question: Is a deactivation delay of 0.5 seconds possible?

  • I would like to have a setting option that specifies the mode in which the device always starts.

    Thanks for the suggestion, I will add to my todo list.

    Is a deactivation delay of 0.5 seconds possible?

    No, it is not possible. The filters & delays are evaluated once per second by using the CIQ compute method, which cannot be configured to be triggered with a different interval.