Widget: Battery Gauge

Former Member
Former Member
Battery Gauge

Battery Gauge Widget v2.1




Widget showing battery history for a selected period. Currently it is a bit limited, since it isn't possible to have a process running in the background storing the battery state continuosly. The way the widget currently works is that every time the widget is started, the battery charge value is read and saved. The value is compared to the previous one, and the graph is updated. Each bar in the graph represents an hour (in week view), so if the widget for instance is started at 12 o'clock and later at 4 o'clock, the values at 12 and 4 are real values. The values at 1, 2 and 3 o'clock are calculated based on the difference between 12 and 4. If one starts the widget at regular intervals, the graph should give a quite good representation of the battery state.

Widget menu (press Start/Enter button)
  • Statistics screen, showing battery drain the last hour, the last day, since a user defined time and since last log reset.
  • Switch the graph scale between 1 month, 2 weeks, 1 week, 4 days and 1 day (Log data is no longer deleted when changing scale).
  • Switch between no graph markers, high/low markers or markers for each step on the x-axis.
  • Switch between black or white background.
  • Reset the log.

Please note:
  • Since each bar represents one hour, there will be no data visible for the first hour after the widget is run the first time. If after several hours no graph is visible, try clearing the log from the widget menu.
  • It is recommended to clear the log after installing a new version.
  • If after clearing the log problems still persist, it may be necessary to manually delete the log file. Instructions in this post: Deleting log file manually


Updates:

Version 2.1 - September 18, 2016
  • Support for Vivoactive HR
  • Fixed layout issues on new Forerunner and Fenix series watches
  • Improved the ability to scroll past the widget in the widget list


Version 1.9b - November 23, 2015
  • Added experimental support for FR230, FR235 and FR630. Please regard this as beta software for the time being.

Version 1.8 - June 24, 2015
  • Updated to Connect IQ v1.1.2.
  • Added support for D2 Bravo.

Version 1.7 - May 27, 2015
  • Improved precision on statistics calculations.
  • Added version number to statistics screen.

Version 1.6.5 - May 17, 2015
  • Fixed a bug regarding 'last hour' and 'last day' statistics.

Version 1.6.2 - May 10, 2015
  • Increased size of graph marker font.

Version 1.6 - May 9, 2015
  • Thanks to Gigios (Vivoactive) andMourk.D (Fenix 3) for beta testing!
  • Added 'Statistics' screen, showing battery drain over various periods.
  • Added experimental Vivoactive support. Please regard this as beta software for the time being.
  • Added ForeAthlete 920XTJ support.
  • Renamed 'Clear Log' to 'Reset Log'
  • Bug fixes.

Version 1.2 - April 28, 2015
  • Added option to select between graph markers.
  • Added 1 month scale option.

Version 1.1 - April 17, 2015
  • Data is no longer cleared when changing scale.
  • When selecting a new scale in the menu, view is immediately returned to graph.
  • Added 2 week scale option.

Version 1.0 - April 13, 2015
  • Added possibility to change graph scale.
  • Added possibility to change background color.
  • Added marker showing highest value of graph.
  • Bug fixes.

Version 0.8 beta - April 08, 2015
  • Forerunner 920XT support - NOTE: Only tested in simulator.
  • Added possibility to delete log file via widget menu.
  • Small tweaks to graph.

Version 0.7 beta - April 07, 2015
  • Bug fixes.
  • Added version number to screen.

Version 0.6 beta - April 07, 2015
  • Initial version.
  • Former Member
    Former Member over 9 years ago
    Hi,

    Thanks for your feedback, dhiltonp!
    On my Fenix 3 I can cycle through the widget without any freezing, but your suggestion makes a lot of sense, so I'll see if I can implement it in my next update.
    If you would like to beta test, please send me a PM with your email :)

    -Torstein
  • Former Member
    Former Member over 9 years ago
    If I missed this in an earlier post I apologize. Anyway, I did a full charge of my FR235 2 days ago and reset the marker. The widget is telling me I'm at 68% battery. When I go into statistics, it says 1.9% last hour, 68% last day???(should be around 15%), and 29% since marker. I use the 1 day graph and it says 68% on top, but the graph shows the battery going from 68% to 2% for the day. The battery gauge on the standard watch face also shows what would be 68%. I've never had a problem with this widget in the month plus I've been using it and I've done no updates or added anything from Connect IQ since I've charged my watch. Any ideas on what's going on, or how to fix it?
  • Former Member
    Former Member over 9 years ago
    Hi,

    That sounds strange... I us ethe widget myself every day, and haven't seen that behaviour before.
    How often do you use the widget? The widget is only able to gather data when running (ConnectIQ limitation), so if the widget isn't opened in a couple of days, it may show some strange data...

    Do you mind resetting the graph ('Reset Log') in the menu and see if the problem reappears?

    -Torstein
  • Former Member
    Former Member over 9 years ago
    Hi,

    That sounds strange... I us ethe widget myself every day, and haven't seen that behaviour before.
    How often do you use the widget? The widget is only able to gather data when running (ConnectIQ limitation), so if the widget isn't opened in a couple of days, it may show some strange data...

    Do you mind resetting the graph ('Reset Log') in the menu and see if the problem reappears?

    -Torstein


    I too use the widget daily. I actually reset the log shortly after my initial post. It's been 48 hrs now and all is good. I guess it was just one of those fluke things. Thanks and great job on the widget.
  • Former Member
    Former Member over 9 years ago
    I too use the widget daily. I actually reset the log shortly after my initial post. It's been 48 hrs now and all is good. I guess it was just one of those fluke things. Thanks and great job on the widget.


    I spoke too soon. It's back this morning. I'm trying to load a couple of snapshots, but they keep failing to load. Anyway, my FR235 is at 67%. The 1 day graph shows 67% on top, but the scale goes from 67% down to 0%. Statistics has 2.7% last hour, 67% last day and 33% for last marker and log reset. I just uninstalled, then reinstalled the widget. I hope this works. I really enjoy the widget, but it doesn't seem to be working correctly anymore.

    Update: Went into Garmin Connect and removed the widget. Charged the battery to full. Reinstalled widget. 1 day graph shows 98% with the scale going straight to 0%. Statistics shows 98% last day, but I still have the timestamps for the last marker and log reset prior to removing the widget. The widget obviously was never removed. Did I do something incorrectly?
  • Former Member
    Former Member over 9 years ago
    Hi,

    I haven't seen anything like what you experience on my own watch, so it is difficult to say what's wrong. I'm guessing a corrupt data file in some way. If you are familiar with the file structure of the APP folders, could you try to physically delete the widget and the data file?

    What you need to delete is:
    GARMIN/APPS/nnnnnnnn.PRG
    GARMIN/APPS/DATA/nnnnnnnn.STR
    GARMIN/APPS/SET/nnnnnnnn.SET

    nnnnnnnn is a unique number assigned when you install the widget. If you have no other widgets installed, the Battery Gauge Widget should be the only one. If you have several other widgets, you have to determine which number is the Battery Gauge. The easiest way is probably to reset the data file from the widget, and then connect the watch to a computer and look at the timestamp of the files in the DATA folder. The most recent file is most likely the Battery Gauge data file.

    After everything is deleted, reinstall the widget.
  • Former Member
    Former Member over 9 years ago
    Hi,

    I haven't seen anything like what you experience on my own watch, so it is difficult to say what's wrong. I'm guessing a corrupt data file in some way. If you are familiar with the file structure of the APP folders, could you try to physically delete the widget and the data file?

    What you need to delete is:
    GARMIN/APPS/nnnnnnnn.PRG
    GARMIN/APPS/DATA/nnnnnnnn.STR
    GARMIN/APPS/SET/nnnnnnnn.SET

    nnnnnnnn is a unique number assigned when you install the widget. If you have no other widgets installed, the Battery Gauge Widget should be the only one. If you have several other widgets, you have to determine which number is the Battery Gauge. The easiest way is probably to reset the data file from the widget, and then connect the watch to a computer and look at the timestamp of the files in the DATA folder. The most recent file is most likely the Battery Gauge data file.

    After everything is deleted, reinstall the widget.


    The developer was a great help. Should anyone have this happen to them, the solution above works.
  • I've seen watch faces display the battery percentage. Can a watch face periodically update your widgets log file so there's a more complete battery record?
  • Former Member
    Former Member over 9 years ago
    Unfortunately no. Apps cannot access each others' files. It would be a good solution though, and I have thought about it.

    I have even asked the Connect IQ Team if this is something that could be added to a future version of Connect IQ, but I doubt it is going to happen. No criticism intended, I understand their reasons for not allowing this.
  • Former Member
    Former Member over 9 years ago
    Strange issue

    Hi,

    I don't know why, but i have a strange issue.

    Sometimes (some charge cicles) the battery graph line is growing (opossite sense) and statistics are positives.

    I attach an image.