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 sounds cool. I'm just playing with configuration, but it seems to be am issue with webconf. I parsed my last functional configuration, but I cannot see the rules to control lights. Here is my conf: 

    #4587520,196641#14,8|Tunnel:1:62:1G[2|Night1:3:1:1B[3C]9.72222Es2700,r-2700|Night2:3:2:1B[4C]5.55556Es900,r-900|Night3:2:5:1C]1.38889Es0,r0|Night4:1:62:1Es0,r0|Day1:2:63:1Er0,s0H]2|Day2:1:0:1Er0,s0|:1:0:1D=1#0,73404416#7,5|Tunnel:1:6:1G[2|Night:1:6:1Es-900,r0|Day1:3:7:1Er0,s0H]1I]-1]0|Day2:1:0:1Er0,s0|:1:0:1D=1#7,6:Ion Pro 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#0::#0:0#B3122#1#2#0#0

    I just want to add configuration to the 2nd widget to control my another headlight ION200RT. What is wrong?

    Do I understand correctly, that 2nd widget has possibility for up to 3 configuration strings, which could be switched from the widget configuration? 

    Thanks,

    Milos

  • The mentioned webconf is for the widget and not for the data field, for the data field you need to use this one: https://maca88.github.io/SmartBikeLights/

    For controlling also your ION200RT you need to install Smart Bike Lights #2 data field and configure it by specifying the serial number. Also you need to modify the provided configuration by adding the serial number for ION Pro RT light.

    Both data fields have the possibility to set up to 3 configurations, which could be switched by using either Garmin Express or Garmin Connect Mobile.

  • Thanks for the clarification and instructions - I always use wrong configuration site, it was not first time...  :-)

    I have configured 2 data fields, ION Pro TR + Varia 510  and ION 200 RT + Varia 510 (the same radar as used in first data field). I'm not sure if usage of the same radar could do same issues, but I have tested it in one ride and all seems to be OK so far. I don't use both headlights together but separately.

    Thanks!

    Milos

  • I'm not sure if usage of the same radar could do same issues, but I have tested it in one ride and all seems to be OK so far

    It can cause some issues (e.g. switching from Smart to Manual mode (S -> M)) in case you would use different configurations for your Varia. I suppose that you are using the same configuration for both data fields, but still it may cause that on one data field the Varia would switch from Smart to Manual mode. Ideally each light should be used by only one data field, but if it works for you then I guess is fine.

    I don't use both headlights together but separately.

    If you don't use both headlights together, then maybe it would be better to have only one data field with two configurations and switch between them by using Garmin Connect Mobile before the ride.

  • With the latest Smart Bike Lights release (version 0.15.0), it is now possible to control more than one headlight or taillight at once, but only for devices with more than 32KB memory.
    How it works:
    In case there is more than one taillight or headlight paired, the data field will group all headlights or taillights into one virtual light that forwards commands (e.g. light mode changes) to all grouped lights. For the battery level, it will display the lowest battery level of the grouped lights. When pairing different headlights or taillights (e.g. Varia 515 and Flare RT), the virtual light will display only the modes that both lights supports, based on the light mode number. For example when grouping Varia 515 and Flare RT, the following modes will be available:
    0 - Off
    5 - Peloton for Varia 515 and Night Steady for Flare RT
    7 - Day Flash

    even if they both supports "Night Flash" mode, it will not be displayed, because Flare RT uses 63 and Varia 6 for the light mode number.

    How to use this feature:
    1. Pair all lights by using the Garmin Sensors menu
    2a. In case all headlights or taillights are the same, configure them as you would configure one light
    2b. In case pairing different lights, you need to select "Unknown" light in the Lights Configurator and add the light modes that the lights have in common

    NOTE: This feature does not work when "Use Individual Light Network" is selected

  • The following config for Edge 1000 & Varia RTL 510 was properly working before recent upgrades (0.14 and 0.15):

    1,1|OFF:1H]0###0,73404416#11,8|LOWBAT:1:0:1B]4|BRAKE3:2:4:2A[-3C]9.72222|BRAKE2:2:4:2A[-5C]5.55556|BRAKE:2:4:2A[-10C]1.38889|TUNNEL:1:6:1G[4|DAY:1:7:1Er0,s0|NIGHT:1:6:1Es0,r0|:1:0:1D=1##5,4:Varia RTL 510|2,:-1,OFF:0|1,DAY FLASH:7|1,NIGHT FLASH:6|1,SOLID:4#0::#0:1#B1836##2#0#0

    Now I'm experimenting a couple of issues:
    1) no more filter is selected
    2) in Network/Manual mode, light modes other than Off (i.e. Daily Flash, Night Flash, Solid) result as "unknown" (? symbol near the light picture).

    Please note that:
    a) the light network is properly configured
    b) Bike Lights Control widget is properly working (switching among various modes)
    c) a very similar configuration is properly working with my Edge 1030 & RTL 510.

    It seems a bug occurring only with Edge 1000...

  • Strange.. I tried your configuration with Edge 1000 and Varia RTL515 (I don't have 510) and it works fine, in manual and network mode the light symbols are correctly displayed (no question marks). I am not sure what did you mean by "no more filter is selected", did you mean the text above the light icon (e.g. TUNNEL)?

    It seems a bug occurring only with Edge 1000...

    The data field code is the same for Edge 1000 and Edge 1030, so I am not sure what is happening to your Edge 1000. Maybe try to reinstall the Smart Bike Lights data field to see if this would solve the issue.

  • I tried to remove and re-install the Data Field (using Garmin Express for Windows) more than once, but nothing has changed.
    At the end I realized that, according Garmin Express for Windows, the Data Field is removed...but according Garmin Connect Mobile this is still installed AND cannot be removed (in fact it is still present in Edge 1000).
    So, I assume there was some mess while upgrading...
    How can I identify (by Data Field size ?) the old Data Field so to try to remove it manually ?

    Please let me know.

    When I state "no more filter is selected", I mean that no text is displayed above the light icon, while Global filter and one of the RTL 510 filters should be always matched.
    Could it be that the old (un-removed) Data Field is used ... and this is running without any configuration ?

  • At the end I succeded in identifying and deleting the .prg file, so following re-installation made the Data Field properly working again.
    I cannot explain myself what was going wrong with the upgrade by Garmin Express Windows, and reason why a duplicated Data Field was installed, rather than replacing the old one.

    I briefly tested primary vs secondary configuration with Varia RTL 510 and 500, and it seems working well.
    It would be useful if the same primary/secondary configuration option would be available for widget too (I use both the Data Field and the widget).