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 

  • No, it’s not related to your data field. The lights starts even if I delete your data field. The setting I use right now is “individual-off” on both lights. My idea was to use your data field on the bike activity so the lights would only start when I need them, but since I can’t make the settings stick since the webpage says it’s not available I’m back to using the lights in the old fashioned way by using the buttons on the lights themselves...

  • The settings I want:

    Front:

    • Daytime: light in steady small mode
    • Nighttime: light in steady medium mode

    Back: 

    • Daytime: all day flash
    • Nighttime: steady night
    • Brake light: all day flash to night flash and steady night to night flash
  • > The lights starts even if I delete your data field

    By setting "Light Beat Activated" option to "Timer Start" you could prevent the lights to be turned on when selecting the activity, but they will be still turned on when starting an activity. I think the only option that you have is to disable the lights before selecting a non biking activity and enable them only for biking activity.

    > the webpage says it’s not available

    Which website is not available? Does this happen when trying to open the data field settings in Garmin Connect?

    Configuration for your settings:

    1,1|:1H>0#4587520,196641#3,3|DAY:1:5:1Er0,s0|NIGHT:1:2:1Es0,r0|:1:0:1D=1#6291461,1409482753#4,4|BRAKE:1:63:1A<-10|DAY:1:8:1Er0,s0|NIGHT:1:5:1Es0,r0|:1:0:1D=1#6:Ion Pro RT|Off:0|High:1|Medium:2|Low:5|Day Flash:63|Night Flash:62#6:Flare RT|Off:0|Day Steady:1|Night Steady:5|Day Flash:7|All-Day Flash:8|Night Flash:63#B3291#1#1#0#0

    for braking you can set the sensibility by modifying the acceleration value.

  • I released a new version 0.9.0 that has the "timer" which can be found in the filter group, called "Minimum active time in seconds". By default the minimum active time is one seconds, I modified the above configuration to two seconds:

    ###0,73535488#5,4|BRAKE:2:7:2A<-3C>2.22222|GPS:1:6:1G<4|NIGHT:1:6:5Es1800,r-1800|:1:0:1D=1##6,5:Varia 515|2,:-1,Off:0|1,Solid:4|1,Peloton:5|1,Day Flash:7|1,Night Flash:6#B3570##3#0#1

    in case you want it for more that two seconds, just adjust the "Minimum active time in seconds" value.

  • I released a new version 0.9.0 that has the bike radar filter. The detected vehicles can be filtered by their range or/and threat, in case both filters are set the filter group will be active only when both conditions are met. From the api documentation the threat "Medium" should be for average vehicles, "High" for fast approaching vehicles and for "None" there is no information. Please let me know whether the filter works so that I can remove the "experimental" note.

  • On my Fenix 6X the only settings I can choose between is “auto” or “individual “. When in individual I can choose  the settings I want the lights to start on, in auto-mode the lights sets the brightness by themselves. There’s no “start on timer” setting, unfortunately... That’s why it would be so neat if I get your data field up and running! Thanks for the settings, by the way!

    Yes, Sir! Every time I try to update the settings on the data field I get the same response: webpage not available... I have tried reinstalling the data field, rebooting both my watch and my phone. I have gotten the same response now at least 20 times over the last week. 

  • I have done some more testing now and it’s only when I paste the actual settings that the error regarding the webpage shows. If I choose to only change the colour that setting is applied but if I paste the text-settings I get the “this webpage is not responding “. 

    Strange...

  • > There’s no “start on timer” setting

    That is unfortunate, seems like that fenix devices have less options to set for the lights.

    I tried to apply the above configuration via Garmin Connect on my Edge 1000 and it worked without any errors. I must say that coping the configuration from a mobile device is very tedious when using the "pre" tag, try to copy this configuration:

    1,1|:1H>0#4587520,196641#3,3|DAY:1:5:1Er0,s0|NIGHT:1:2:1Es0,r0|:1:0:1D=1#6291461,1409482753#4,4|BRAKE:1:63:1A<-10|DAY:1:8:1Er0,s0|NIGHT:1:5:1Es0,r0|:1:0:1D=1#6:Ion Pro RT|Off:0|High:1|Medium:2|Low:5|Day Flash:63|Night Flash:62#6:Flare RT|Off:0|Day Steady:1|Night Steady:5|Day Flash:7|All-Day Flash:8|Night Flash:63#B3291#1#1#0#0

    it is the same as above but I pasted it as free text, it may be uglier but at least it is easier to copy from a mobile device. In case it still doesn't work, try using Garmin Express for changing the configuration and let me know if it works from there.

  • Hi. I noticed you added the filter for vehicle detection in the latest version. Thank You.

    I tried the following configuration however the datafield is crashing with an IQ error when navigate to the datascreen

    ###0,73404416#5,3|ON:2:7:1H>1I>-1>0|OFF:2:0:1H<2I>-1=0|:1:7:1D=1##5,5:Varia 510|1,:-1|1,OFF:0|1,DAY FLASH:7|1,NIGHT FLASH:6|1,SOLID:4#B2713##2#0#0

    I'm trying to configure the light so that if there is no threat then the light is OFF & if there is any sort of threat the Light is DAY FLASH. Am I misunderstanding the settings I need to configure?

  • I released 0.9.1 that should fix the error.

    The configuration that you provided won't work as you described because OFF filter group expects a vehicle that has threat = 0, which means that it will be turned off only when detecting a vehicle with threat = 0. I modified the configuration by setting the default mode to Off and removing the OFF filter group:

    ###0,73404416#3,2|ON:2:7:1H>1I>-1>0|:1:0:1D=1##5,5:Varia 510|1,:-1|1,OFF:0|1,DAY FLASH:7|1,NIGHT FLASH:6|1,SOLID:4#B2713##2#0#0

    With this configuration the light will be turned off only when detecting a vehicle that has a threat greater than None and the timer is either paused or running.
    Please let me know whether the error is fixed.