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

  • Im trying to get the Ravemen FR300 ANT running. This light is really unreliable in its connectivity. The first batch always killed the light network and upset the Varia so much it needed to be deleted from the 1040 and readded.

    For now, I can see the 2, 4, 6, 7 and 63 on the widget, but the light has 6 modes:
    High solid, medium solid, low solid, warning flashing, rapid flashing, slow flashing.

    The widget always marks the 2. when I try to select another button, this gets gray, nothings on the light happens and it jumps back to 2.

  • For now, I can see the 2, 4, 6, 7 and 63 on the widget, but the light has 6 modes:

    In order to find out the missing mode you will need to sideload the Light Tester app (https://github.com/maca88/SmartBikeLights/tree/master/Source/LightTester) on your Edge. If you are willing to do so, please follow the steps described on GitHub:
    https://github.com/maca88/SmartBikeLights/tree/master/Source/LightTester#how-to-use

    After step 10, provide the content from the LightTester.TXT file

    Here you can download the LightTester.prg for Edge 1040:
    https://github.com/maca88/SmartBikeLights/blob/master/Source/LightTester/build/edge1040/LightTester.prg

    Before testing LightTester, please unpair/disable Varia, so that Ravemen FR300 ANT is the only light paired.



     

  • As soon as I find time I will do this.

  • Hi, 

    This is the mode I see for the Giant Recon plus hl1400

    2 - High

    3 - medium

    4 - low

    6 day flash

    The recon plus 1400 have a full on mode, but could not set /see it.

    also, could I connect varia 515 and recon + on a edge 820. I could not see both in the screen. Had to install smartlight #2 and have the recon+ in individual mode and varia 515 in the light network on smartlight #2 for it to work.

  • What was changed, apologies I don't understand?

    I already gave you all these values for Garmin (AT1600). Magene have available via Ant+ standard modes (which can be different what you have on the Magene app), and only 2 modes which can be customized via app and used in Ant+ - nothing changed here. So I'm not following what was changed ;)

  • The values that you provided were for the Garmin standard modes, which are different from those that can be selected by pressing on the physical button:

    Old mappings:
    1 -> Very High
    2 -> High
    3 -> Medium
    4 -> Medium-Low
    5 -> Low
    6 -> Slow Flash
    7 -> Strobe
    61 -> Fast Strobe
    59 -> Preset 9
    60 -> Preset 10

    New mappings:
    60 -> Custom 4
    59 -> Custom 3
    58 -> Custom 2
    57 -> Custom 1
    56 -> Breathing
    55 -> Nighttime Flash
    54 -> Daytime Flash
    53 -> High
    52 -> Medium
    51 -> Low

    The new mappings are the ones that can be selected from the mobile app or by using the physical button.
    You will need to re-created the configuration because the light modes do not match anymore. Importing the old configuration will fail. If you do not remember how the configuration was setup, paste the old configuration and I can convert it to the new one.

  • I’m struggling with the global filter. The lights just come on when they connect with the Garmin. What setting of timer state to have them only on when recording. Ie not started or paused? 

    edge 530, ion rt and 200. Thanks 

    1,1!On:1H]0#4587520,196641::1:#2,2!Day:1:63:0:0Er1800,s-1800!:1:63:0:0D=1#6291461,1409482753:1,1722032770:1:#3,3!Night:1:63:0:0Es-1800,r1800!Day:1:7:0:0Er1800,s-1800!:1:5:0:0D=1#6:Ion 200 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#0::#1:1#0#0#B3121#2#1#0#0

  • With the provided configuration the lights should turn on only when the activity is started (including paused or stopped). If you want to turn on the lights only when the activity is recording (excluding paused/stopped) then you need to modify the filter to:


    here is the updated configuration:

    1,1!On:1H]2#4587520,196641::1:#2,2!Day:1:63:0:0Er1800,s-1800!:1:63:0:0D=1#6291461,1409482753:1,1722032770:1:#3,3!Night:1:63:0:0Es-1800,r1800!Day:1:7:0:0Er1800,s-1800!:1:5:0:0D=1#6:Ion 200 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#0::#1:1#0#0#B3121#2#1#0#0

  • Awesome that you found how to match Magene ALL Custom Preset Modes!

    I was found only Custom on 59 & 60, and it forced me to create all other dump modes on app, so I was able to use last two modes 59 & 60. Seems all others was out of Garmin standard, right.
    Now I can delete not used modes and use only what I need - and it will complete match with Magene App & Physical button, awesome job!

    Now Ant+ Modes match with Mode List on the Magene app - All 10 Modes:
    51 -> Preset Mode 1
    52 -> Preset Mode 2
    53 -> Preset Mode 3
    54 -> Preset Mode 4
    55 -> Preset Mode 5
    56 -> Preset Mode 6
    57 -> Preset Mode 7
    58 -> Preset Mode 8
    59 -> Preset Mode 9
    60 -> Preset Mode 10

    BUT, you can have different list, so naming any of these are not correct, or can be confusing.

    In my case, I have totally different list - because I changed order of modes and created custom modes, so they do not match at all…

    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).

    So, names do not match, maybe we should keep generic (Custom N, or Preset N)
    In Magene App you can add mode (Standard Presets or your Custom created), change order of modes, or remove / delete mode, also you can create your own. For Example I can add my custom Preset to 51, and make 53 Breathing.

    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.

    Hardcoded naming (modes) still exist, but they are on these ID: 1-7, 61.
    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)

    P.S> Also, this change broke my current configs :(. Now configurator fails….
    What and where should I replace, to fix? (I have about 6 configurations, for two lights, so I don’t want to rebuild all of them from scratch, I spend to much time on this :) )

  • Also I have issues with stability, not sure if that you can help to solve or this is on Garmin.

    1. Time to time I found in Garmin Sensors - it add lights from other bike (I have same models for all bikes), so your app try to control both of them (if we ride together - me and my wife) - for example Garmin S/N numbers for both Magene AT1600 lights are the same :(. So, I need time to time remove incorrect Light from sensors from my bike or from wife bike - that it was added again to Light sensors. I’m not sure who add them, I hope it’s not connected to SBL sensors on the list.

    2. Connection loosing - sometimes it works great for weeks, but one day it just do not connect to one of the Lights - and I can’t do anything, restart Garmin do not help, reset Light do not help - it just don’t want to connect anymore. 
    Then I need to remove from sensors this Light, reset Light, and try to add sensor again. Then it start working again (and then random will loose connection after some time…)

    3. Your application SmartBikeLights - sometimes do not respond, when I press mode, it will change button colour, but nothing happens on the light. I need to swipe to other screen and swipe it back - and it show previous mode. (btw, I have two SmartBikeLights pages, not sure if it can impact each other, but they control different lights: 1-At1600&FlareRT 2-Varia515)

    4. Sometimes when Garmin boot - it will turn random one or all of the lights (Headlight, Taillight, Radar). I need to swipe to your data page - then it will turn off lights. This drained my Light batteries once, when I didn’t noticed it turn on lights on bike (which was in garage), and was left all night.

    5. Sometimes, I need to swipe back & forth , so it will change mode after I press mode on the screen