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 

  • Hi, pls do you plan to add support for non garmin radars, such as IGPSPORT SR30? 

  • Hi,

    If you own an IGPSPORT SR30 light, please provide the light modes so that I can add it to the Lights Configurator. Check the first post of this thread (just scroll to the top of this page) for details on obtaining the light mode numbers.

  • Hello Maca88

    Can you please add to this code:

    1,1!:1H]0#0,73413136#3,3!NIGHT:1:3:0:0Es-600,r0!DAY:1:7:0:0Er0,s-600!:1:0:0:0D=1#0,73404416#4,3!BRAKE:2:4:0:0C]1.94444A[-10!RADAR:1:7:0:0I]-1]0!:1:0:0:0D=1#7,6:Ion 800 RT!2,:-1,Off:0!1,High:2!1,Medium:2!1,Low:4!1,Day Flash:7!1,Night Flash:6#5,4:Varia RTL 510!2,:-1,OFF:0!1,DAY FLASH:7!1,NIGHT FLASH:6!1,SOLID:4#0::#0:0#123!:123!#B2713#4#2#0#0

    - for daytime only;

    - when speed is zero=0 for more then 2 minutes (I stopped for a break along the road or in some plasa), turn OFF=Pause both font and rear lights, until next time in motion or I start riding again;

    but

    - when any new car triggering the radar - approaching (from rear) turn ON both the rear radar and front light alerting that driver until that car completely passed by me;

    - for night time just stays as is, both lights keeps blinking;

    Also a Question: what is a minimum speed that the Edge 1030 still detecting as a continuous motion? 1-2-3-5 Km/h ?

  • Hi,

    Unfortunately, what you want to achieve is not entirely possible with the current filters. In order to achieve the desired behavior it would require to extend the "Activation delay" option, so that the activation delay will be skipped if a certain filter group is active.
    With the current filters it would work like this:

    1. After 2 minutes with speed = 0, both lights will be turned off (all good)
    2. When a car is approaching, both lights will be turned on (all good)
    3. After the car has passed, it will take another 2 minutes to turn both lights off (not good)

    For now, you can choose between the following alternatives:

    1. Turning off both lights without the radar triggering
    2. Turning off both lights with radar triggering, but with zero delay. The lights would be turned off immediately when stopped (speed = 0)
    3. Turning off both lights with radar triggering, but with a smaller delay. It would work as described above but with a smaller delay to turn off/on the lights

    what is a minimum speed that the Edge 1030 still detecting as a continuous motion? 1-2-3-5 Km/h ?

    I don't have a concrete answer for this (never tested). This depends on what do you use for the speed detection. If you are using a speed sensor, then the minimum speed number should be lower than when using GPS for speed detection. To find out the number, you can try to walk the bike and check what is the lowest speed that is displayed on Edge.

  • What can be a delay length? 30 second, 60 second?

    I think this option would be a best "3. Turning off both lights with radar triggering, but with a smaller delay. It would work as described above but with a smaller delay to turn off/on the lights"

    This above for daytime.

    For night time all keep blinking.

    Can you help me please generating that code?

    Thanks

  • What can be a delay length? 30 second, 60 second?

    The activation delay is defined in seconds, starting with 1. So yes, it can be 1, 3, 10, 30, 60... seconds

    Can you help me please generating that code?

    Thanks

    Sure, here is the configuration for the third option with a 30 seconds delay:

    1,1!:1H]0#0,73413136::1#8,5!ALERT:3:7:0:0C=0Er0,s-600I]-1]0!PAUSE:2:0:0:30C=0Er0,s-600!NIGHT:1:3:0:0Es-600,r0!DAY:1:7:0:0Er0,s-600!:1:0:0:0D=1#0,73404416::1#9,5!ALERT:3:7:0:0C=0Er0,s-600I]-1]0!PAUSE:2:0:0:30C=0Er0,s-600!BRAKE:2:4:0:0C]1.94444A[-10!RADAR:1:7:0:0I]-1]0!:1:0:0:0D=1#7,6:Ion 800 RT:0:16777215!2,:-1,Off:0!1,High:2!1,Medium:2!1,Low:4!1,Day Flash:7!1,Night Flash:6#5,4:Varia RTL 510:0:16777215!2,:-1,OFF:0!1,DAY FLASH:7!1,NIGHT FLASH:6!1,SOLID:4#0::#0:0#123!:123!#0#0#B2713#4#2#0#0

    In order to change the delay you need to change the "Activation delay in seconds" for the "PAUSE" filter group on both lights.

  • Thank you very much, I got now my study...

    Can the "Activation delay in seconds" be different for front or rear?

    Or the delay be a separate for turning OFF and turning back ON?

  • Can the "Activation delay in seconds" be different for front or rear?

    Yes, they can be different.

    Or the delay be a separate for turning OFF and turning back ON?

    You can add a delay for turning them back ON when a vehicle is approaching and speed = 0 by setting the activation delay for the "ALERT" filter group. But that wouldn't make much sense as the vehicle would already pass over and the light would not turn on if the delay would be 10 or more seconds. 

  • Thanks.

    Where I am biking the roads outside city limits and between cities usually have a dedicated bike space (just a white line painted on side of asphalt) or rural gravel roads, but some are unmarked.

    It is not uncommon that I have more then 400 vehicles in a average trip...

    I must let the the drivers know that I am there and visible, but also to preserve the batteries for a least 4-5 hours trips.

  • Maca88

    I'm super confused 

    I have a Garmin edge 1040 and I would like to run x1 Bontrager flare RT and a x1 varia radar at the same

    I would like them both to work at the same press of an option e.g solid or flashing 

    I tried it with a bontrager iron 200 RT front light and the flare RT but when i switch on the varia radar it gives me a error 3

    How can I get this to work

    Thanks