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 

  • > Are there any graphical elements that could possibly be covering the character?

    No, this is the only element drawn at this point. By analyzing the picture it really looks like that the "k" character is somehow covered as the text should be centered but in your picture it is not, there is more space on the right that the left side of the text. The difference is more or less equal to a space of one character. In the simulator and also on my Edge the text is correctly centered so maybe it has something to do with the radar icon as I don't have it.
    What happens when you set the data field to a smaller field, for example 1/10th of the screen like the screenshot that I posted above, is the text even visible? Is there a difference when the data field is set on the left or right side of the screen?

  • I've just tried it on a 10 datafield screen layout in the Upper Left, Upper Right, Lower Left & Lower Right positions & it display's No networ on all positions. Quite a peculiar conundrum

  • Thanks for taking your time trying this out, I am really speechless, there must be some kind of bug either with how the code is compiled for your device (CIQ compiles the code for each device separately) or as you mentioned some kind of CIQ font issue. Currently you are the only one that reported this issue, so I am not sure whether the issue applies to all Edge 1030 or not. Unfortunately, for now I don't know to fix the issue, in case I will find a way to fix it, I will inform you.

  • Hello again and thanks for all help!

    Sometimes I get the feeling that I spend more time dealing with Garmin related issues than actually using the darn things...

    Ok, here we are; Garmin Express on my computer was able to save your settings and transfer them to my Fenix 6X Pro. The new problems is that I can’t chose smart-mode within your application.... When installing the data field on my device I get the question to change settings yes/no. When I hit the “yes” button nothing happens. When I hit the “no” button the data field loads on my device and shows both my lights. Unfortunately they are in network mode, so your settings isn’t applied. 

    I have tried several times deleting and reinstalling but somehow I can’t hit “yes”. Any ideas how to solve this new problem..?

    Thanks!

  • That's no problem. I'm happy to help in any way I can.

    It's no doubt bugging (no pun intended) you as it would me if something so simple isn't working as it was coded. Especially when it works just fine on other devices. Maybe a question on the CIQ Dev discussion thread might highlight something that's been overlooked

    In the grand scheme of things this is a minor one & the important functional parts of the datafield work great Thumbsup so don't divert your precious time from more important things to look into this

  • > When I hit the “yes” button nothing happens

    Unfortunately I don't have a Garmin watch so I am not familiar with this "change settings" question on the device upon installing a data field. If you were able to change the settings via Garmin Express then just hit "no", so that the lights are displayed and follow the steps described below to change the mode.

    > The new problems is that I can’t chose smart-mode within your application

    Sorry for wasting your time on this, it is my fault as I didn't documented it. As your device has CIQ 3.2 and more than 32KB ram available for data fields, you can change the mode using the new data field settings menu introduced in CIQ 3.2 by doing the following:
    1. Make sure that the lights are connected with the device
    2. On the data screen where you have the data field hold the Menu button until a menu shows up (you need to have a firmware version 11.10 or higher)
    3. In the menu you have to select "Smart Bike Lights" and a new menu should be opened
    4. Select the "Control mode" and set it to "Smart"

    at least this is how I read it should work. Please let me know whether the procedure is correct so that I can write an accurate guide for it.

  • Is it possible to add front light varia ut800?
    code is
    2 -> High steady beam
    3 -> Medium steady beam
    4 -> Low steady beam
    6 -> Night flash
    7 -> Day flash

    Thank you

  • Sure, now it's added. Thanks for the mapping!

  • Hello again!

    Many thanks for all help! I have spent som more time trying to solve this and now it’s seems to be up and running!

    The solution was to unpair both lights, delete the data field and start from scratch again. Now it seems to be working just fine on my Fenix 6X. Thanks again!

  • I managed to do a couple of long rides with the new configuration & it worked wonderfully. From a full charge the RTL510 battery showed 5 bars for 2 hours largely on quiet roads only dropping to 3 bars after 6 hours with a 50/50 mix of quiet/busy roads. This is a massive improvement on the previous battery life with my haphazard manual approach & it never seemed to miss a beat switching from off > day flash on a vehicle detection. I'm a happy bunnyRabbit