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 

Known issues:

1. Unable to use Tempe Visualizer or TyreWiz Data Field alongside Smart Bike Lights:
https://forums.garmin.com/developer/connect-iq/i/bug-reports/lightnetworklistener-onbikelightupdate-not-called-when-certain-data-fields-are-installed

  • I wanted to check simple config with At1600 & FlareRT (just plain config):

    #1074,358879792::1:133693440,0##6291461,1409482753::1:##12,11:AT 1600:0:16777215:-1!2,:-1,Off:0!1,Preset 1:51!1,Preset 2:52!1,Preset 3:53!1,Preset 4:54!1,Preset 5:55!1,Preset 6:56!1,Preset 7:57!1,Preset 8:58!1,Preset 9:59!1,Preset 10:60#7,6:Flare RT:0:16777215:-1!2,:-1,Off:0!1,Day Steady:1!1,Night Steady:5!1,Day Flash:7!1,All-Day Flash:8!1,Night Flash:63#0::#0:0#123!:123!#0#0#B3843#14#1#0#0

    And it fails: Error 3
    When I add FlarerRT to AT1600 - it fails

  • Thanks so much. 

    qq with the timespan offset if I wanted lights to go on 30 mins before sunset is that -30 or 30 in the field?

    also with a varia and a trek rt flare connected via smart lights #2 with serial numbers can I have the flare change behaviour with the threat level of the varia? Thanks again

  • Hi maca88

    I using edge 850 & flare RT.

    I want  simple Brake settng.

    1,1!Start:1H]0###6291461,1409482753::1:#2,2!BRAKE:1:1:3:0A[-10!:1:63:0:0D=1##7,6:Flare RT:0:16777215:-1!2,:-1,Off:0!1,Day Steady:1!1,Night Steady:5!1,Day Flash:7!1,All-Day Flash:8!1,Night Flash:63#1::#0:0#123!:123!#0#0#B4634##1#0#0

    My setting this one but don't working.

    What I do?

  • Great thanks. I’m also struggling with the time span offset. If I wanted lights to go on 30 mins before sunset. Will that be -30?

    l also have a varia (using smart lights #2). Can I use threat on this to control the flare rear light too? 

  • That is strange, I tested with the simulator by using the lights modes that should be emitted by the light and I works for me. Can you clear the configuration and tell me if you see the same numbers for both lights. If not, please let me know which are different:

  • Btw, these hardcoded modes will be used if you press remote button (e.g. Di2 button) change Light Mode (Garmin default modes - Steady or Flash)

    Hmm, you are right on this one. I re-added the Garmin modes to the list, so the old configurations should still work.

    Magene application - all light modes are Custom. You can add whatever you want light modes, or change the order (which are first, which are second and etc).

    I did not know that you can customize also the non-custom modes.

    For new users it can be confusing - because 51-56 is not hardcoded modes, it just default presets when you buy new light. When user download Magen app - he can sort, change, delete, create new mode(s). And then all these naming do not match anymore.

    My assumption is that most users will not modify much the factory settings, so having the configuration to be setup for factory settings make sense to me. For those that will play with the light settings, they will also have to play with the Lights Configurator to align the modes.

  • 1. The S/N (serial number) should be unique per light, so it is quite odd that Magene decided to use the same S/N for multiple lights. Unfortunately, there’s not much I can do to resolve this, as the S/N is the only exposed parameter that should uniquely differentiate between multiple lights when using the Garmin light network
    The only workaround would be to use the “Individual Light Network” feature, where the device ID is used to differentiate between lights. The device ID is defined by the ANT protocol and should be unique for every light, as otherwise, communication would not work properly. But then, you would not be able to control the lights with the Di2 buttons

    2. This issue also happens to me from time to time and is usually fixed by restarting the Edge. I’ve noticed that putting Edge to sleep instead of turning it off increases the chances of this occurring. Unfortunately, there isn’t much I can do about it, as the light network is handled by the firmware.

    3. I also have two SmartBikeLights pages and that issue never happens to me. If you are using TyreWiz or Tempe Visualizer data fields, that’s likely the cause of the problem. Unfortunately, Garmin has not yet provided a fix for the reported bug

    4. It shouldn’t be necessary to swipe to the data page where Smart Bike Lights is located, but I believe this is related to the previous point.
    Regarding the light turning on when the Edge boots, try setting “Light Beam Activated” to “Timer Start” in the Sensors → Lights → Network Options menu. If that doesn’t work, there’s not much Smart Bike Lights can do, as this happens before the data field is initialized.

    5. Most likely related to 3. point

  • qq with the timespan offset if I wanted lights to go on 30 mins before sunset is that -30 or 30 in the field?

    Yes, that is correct.

    also with a varia and a trek rt flare connected via smart lights #2 with serial numbers can I have the flare change behaviour with the threat level of the varia? Thanks again

    Yes, you can use the "Radar" filter also for Smart Bike Lights, where you have only Bontrager lights setup. It should work.

  • Hi,
    the configuration is fine, Flare RT should go to "Day Steady" when braking. My assumption is that the light is not in Smart mode. You need to make sure that you see "S" inside the top left button (if full screen) or inside the light icon. If you see "M" or "N", tap on the button/light icon until you see "S". You also need to start the activity for it to work, since you’ve defined a global filter that prevents the light from turning on when no activity is running.

  • If you are using TyreWiz or Tempe Visualizer data fields, that’s likely the cause of the problem.

    I removed TyreWiz - it was a lot worse. Now it's better, but still some times hangs - and button press do not do anything to the light. Then swiping pages sometimes helps, or after sometime it start working again