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 

  • Unfortunately the new setting that I was talking about didn't work as I would expect. The issue with the setting was that it turned on the lights when putting the device to sleep, which I couldn't fix as there is no way to detect a device sleep. Due to this issue I did not add the setting as it made the issue in my opinion worse. After some testing I discovered that it is partially possible to detect when the device wakes up from sleeping, which I used in the final solution released in the new version (0.10.2). There are two conditions for the final solution in order it to work:
    - Sleep need to be initialized on the screen where the data field is located
    - The device has to sleep for at least three seconds before waking it up

    The solution works on my Edge 1000 and I hope that it will also work for your Edge, so try to update to version 0.10.2 and let me know whether it works also for you.

    The new release includes also a fix for configuring the lights with Garmin Connect Mobile iOS. This was fixed by adding support of having "[" character instead of "<" and "]" instead of ">". For Garmin Express Mac I've added a bolded note in Lights Configuration when the configuration value is greater that 256, to prevent users from using it.

    I was not able to repeat the N issue again.

    The control mode will switch to N only when switching the Garmin Light Mode, for example from Auto to Individual.

    Should it be before or after acceletration filter?

    The order inside a filter group is not important, it will work if you put it before or after. The important thing is that you need to have both filters inside the same filter group.

  • Hi Maca88,

    First of all, thank you for the app.

    I've had a quick play with the app and light config site, but I'm finding difficult to get the results I need.

    Can you please help?

    Edge 830, Varia RTL515, imperial measurement, 24hr.

    I'm trying to get the light to only shine in Daylight flash when a vehicle is detected (standard detection distance), then switch off until another detection.

    Also do I need to set the light network for Timer Start or can I use Device Startup as well?

    Thank you.

  • Hi oo0M0oo,

    This is the configuration for the desired behavior:

    ###0,73535488#2,2|RADAR:1:7:1I]-1]0|:1:0:1D=1##5,4:Varia 510|2,:-1,Off:0|1,Solid:4|1,Day Flash:7|1,Night Flash:6#B3122##3#0#0

    but make sure that the "S" character is displayed on the light icon in order it to work.

    Also do I need to set the light network for Timer Start or can I use Device Startup as well?

    You can also use "Device Startup", but as soon as "Smart Bike Lights" data field will be initialized, it will set the appropriate light mode, which in your case will turn off the light (assuming that no car is behind you).

    In order to simplify the configuration process I will probably make a wizard ui, which could be used for common cases.

  • Thank you very much Grinning

    I will test it out on my next ride.

  • Hi

    Edge 1030 version 11:10 / RTL510 version 3.7 / Smart Bike Light as data field version  0.10.2

    I'd really like this function, but if I paste the following configuration into the lights configuration in settings I always get "directed" to the connect IQ store with a message saying "Sorry, this page is currently unavailable."

    Am i doing something wrong - the data field seems to be working fine otherwise on the edge - hope you can help

    ###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

  • Hi

    use this configuration:
    ###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

    it is the same configuration, but it also works on Garmin Connect Mobile iOS. For some reason Garmin Connect Mobile iOS does not accept "<" and ">" characters so the new configuration avoids that by using "[" and "]" characters instead.

  • v
    Thank you very much - it worked :-)

    Can I buy you a beer or how can I show you my appreciation?

  • There is no need to buy me a beer, you already shown your appreciation by saying "Thank you", that is enough for me :)

  • Thank you for sharing this very useful app!!

    I have Edge 1030 plus with Varia 515 and made some  testing the bellow configurations :

    Configuration #1
    Radar - Day Flash - when speed > 8km and car approaching lower < 100m and threat greater than None

    ###0,73535488#3,2|Radar:2:7:1C]2.22222I[100]0|: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#0

    which works as expected

    Then tried to combine the above with brake function but I think there is an overlapping (?) or I did something wrong since the light turn on in solid randomly - could not understand why


    Configuration #2
    Brake - Solid - when speed > 8km and acceleration is negative greater > 20% (-20)
    Radar - Day Flash - when Speed > 8km and car approaching lower < 100m and threat greater than None

    ###0,73535488#5,3|Brake:2:4:1C]2.22222A]-20|Radar:2:7:1C]2.22222I[100]0|: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#0

    Can you plz assist?

  • acceleration is negative greater > 20% (-20)

    This is the issue, you need to use "Lower than" operator instead of "Greater than". By fixing this, the configuration should work as expected.