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 Maca,

    here are the light modes for Cycliq:

    1 ... steady, high intensity

    2 ... steady, medium intensity

    3 ... steady, low intensity

    6 ... pattern (like morse code) ..-..-..-, high intensity

    7 ... regular blink, high intensity

    63 .. light does not change pattern if this mode is selected

    62 ... regular blink, low intensity

    61 ... regular blink, medium intensity

    60 ... random fast flash, variable period and intensity (difficult to describe, rather lower intensity in average)

    59 ... same as 60

    58 .. light does not change pattern if this mode is selected

    I think custom modes are influenced by Cycliq settings you can do via their mobile app. However, I am not able to connect now and check, it is difficult to connect to the device :-(

    If I manage to connect I will try enabling all modes and 58,59,63 again.

    J.

  • Update:

    after resetting everything (grrrrr..) I managed to connect Cycliq again via BT to mobile app. I adjusted following light modes in the app:

    constant high ON
    constant medium ON
    constant low ON
    flash low ON
    pulse low ON
    light off ON

    all other light modes are OFF

    The resulting behavior regarding custom ANT+ light modes is following:

    1 ... steady, high intensity
    2 ... steady, medium intensity
    3 ... steady, low intensity
    6 ... pattern (like morse code) ..-..-..-, high intensity
    7 ... regular blink, high intensity
    63 .. light does not change pattern if this mode is selected
    62 ... regular blink, low intensity
    61 ... regular blink, medium intensity
    60 ... pattern (like morse code) ..-..-..-, low intensity
    59 ... pattern (like morse code) ..-..-..-, medium intensity
    58 .. light does not change pattern if this mode is selected

    However, it seems me the Cycliq device does not behave in a fully deterministic way. Sometimes it happened that after selecting e.g. mode 7 it reacted with different light mode than described above.

    It look like the clever people at Cycliq implemented a kind of "fuzzy logic", which is too complex to understand for regular people :-(((. Maybe there is some dependency on previous states, but I did not manage to find out any way how to reproduce the behavior.

    Jan

  • Jan thanks for the light modes information! Based on your information and a video on youtube it makes some sense. The video shows that the light have 3 pulse modes, 3 flash modes and 3 constant modes, which is also what you described. I added the mappings for the light with the same light mode names that are in the Cycliq application. Also based on the information from alexeinz I assumed that Fly6 CE have the same modes and added also the mapping for it.

     if you are still interested, I published a new version (0.12.0) of Smart Bike Lights that should work with your lights. In the Lights Configuration you need to select "Use Individual Light Network", select Cycliq Fly12 and Fly6 CE lights and fill the "Device number" input for both lights. You can click on the question mark icon for instruction on how to obtain the number. Here you can find how to manually change light modes.

    EDIT: Also you need to disable or remove the paired lights in the Garmin Sensors menu in order "Individual Light Network" to work.

  • yes i have been following the thread and will run it on mine later today! thank you both!

  • Hi,

    here's the result for a Garmin Varia RTL511:

    RTL511

    4: Steady beam

    N: when pressed steady beam and button is "M" afterwards.

    As there's no flash or different luminance option due to legal restrictions in Germany it's very simple ;-)

    Best,

    Oliver

  • Thanks Oliver! The light was added on the list for the data field configurator.

    N: when pressed steady beam and button is "M" afterwards.

    The button with "N", "M" and "S" shows which control mode is currently active (check here for more info). In case you will want that the light is controlled based on the filters from the configurator, then the light needs to be in Smart ("S") control mode.

  • This light is kind of the polar opposite to what I want in a bike and check some reviews at dirtbikeadvisor, but I like this type of items and their market - like the electric aid motorcycles I feel in that manner.

    What I want is a very high maximum adjustable output, strong pattern control, high efficiency, replaceable cells and small physical size. And no smarts: I've concentrated on my own movement when I'm in traffic, on the automobiles and motorcycles around me, not my mindset of how my electronics and mechanics behave.

  • Could you please help further with a problem?


    My original message:

    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.

    Your reply:

    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.


    The problem I have is that when using the Garmin 830 and the Varia RTL515, the 830's firmware is so poorly written (I've been waiting 9 months and counting for an update), the light modes keep altering on their own.

    So when I use your app as configured in your reply i.e. S mode and Off, along with Timer Start etc. The light sometimes has a mind of it's own, and can switch back to M or N mode, with a solid light pattern.

    I keep having to check the app every few minutes to make sure the light is still in S mode. When I find it's not, I reactivate it yet again.

    So gets annoying and dangerous when cycling.

    Is there a way of forcing the 830/Varia to maintain S mode or maybe delete the solid light pattern, so it can't be activated.

    Thanks for any help. (Garmin CS are useless).

  • Hi oo0M0oo,

    that is very strange, I never experienced such issues with my Varia RTL515 and Edge 1000. When having these issues, is the Varia also connected to your phone?

    Try to do the following:
    1. Open Garmin menu and go to "Sensors -> Lights -> Network Options -> Light Mode" and select "Individual"
    2. In the "Network Options" menu set the "Light Beam Activated" to "Timer Start"
    3. Go to the data screen where you have "Smart Bike Lights" data field and set the light to "S" (Smart mode)

    Above are the settings that I am currently using.

    In case you still having issues try the following configuration:

    1,1|:1H]0###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#0::#B3122##3#0#0

    It has an additional global filter and will turn on the light only when recording an activity and a vehicle is approaching you. 

    Please let me know if any of the the above resolves the issue. 

  • Thank you for the help. The 830 is a bag of s***e don't ever buy one.

    I tried the new code and settings. It did work better than on my recent rides.

    But it did switch modes once (to M and Solid) and on one occasion when it traffic, I noticed the light was off.

    Below is a screen grab showing when the light had switched modes and with no traffic behind me.