Giter Club home page Giter Club logo

glucosetray's Introduction

GlucoseTray

Tray Icon for displaying current BG information in taskbar.

Featured at: https://www.deebee.it/?p=18480&lang=en

Update the config file with your Dexcom credentials and run the application. Ensure you go into your taskbar icon settings and ensure it's set to always display the GlucoseTray app.

Always verify the time of the last reading by hovering over the tray icon or clicking it. Should it crash, the icon may stay in the taskbar but stop updating.

Always check with your DexCom reader before making any treatment decisions.

Step-by-step Instructions:
Download and run the GlucoseTray.exe On first run, you will be prompted to define your settings which will include telling the program where to load your data from (Dexcom and Nightscout currently supported).

High Glucose displays red.
High Warning Glucose displays yellow.
Warning Low Glucose displays yellow.
Low Glucose displays red.
Critically Low Glucose displays as "DAN" for DANGER and is red.
Normal blood glucose displays as white.
Out-of-date readings are shown with a strikethrough effect.

Features:
-Color coded glucose numbers set to your ranges.
-See latest glucose reading in taskbar. Also get time of reading and trend on hover or double-click.
-Context Menu option to open up your Nightscout url in browser.
-Option to start application on system startup.

alt text

https://github.com/Delubear/GlucoseTray/wiki/Setup-Guide

glucosetray's People

Contributors

delubear avatar rwkarg avatar sgmoore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glucosetray's Issues

Font selection

Would it be please possible to introduce an option for font selection (maybe even with some spacing around and color-coding based on value/alert)? On HiDPI monitors the current font is rather choppy and does not show clearly the reading. Thanks!

image

New Feature - Multi-Language Support

I have noticed the project mentioned from all over the world. Adding multi-language support would be beneficial.

Initial thoughts:
Step 1: Create multi-language support and framework.
Step 2: Implement English as the first and the default.
Step 3: Allow PRs to expand supported languages in a consistent way.

App not getting any data

The last few versions seem to be broken for me. Can't remember which version specifically broke it but have been upgrading each time a new version is released and it hasn't been working for a few releases now. When I start the app I get the following in the windows application logs:

Category: Microsoft.EntityFrameworkCore.Database.Command
EventId: 20102

Failed executing DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE "GlucoseResults" (
    "Id" INTEGER NOT NULL CONSTRAINT "PK_GlucoseResults" PRIMARY KEY AUTOINCREMENT,
    "MgValue" INTEGER NOT NULL,
    "MmolValue" decimal(3,2) NOT NULL,
    "DateTimeUTC" TEXT NOT NULL,
    "Trend" TEXT NOT NULL,
    "WasError" INTEGER NOT NULL,
    "Source" TEXT NOT NULL,
    "IsCriticalLow" INTEGER NOT NULL
);

The app does start and the tray icon is there, but it is red and crossed out and is the last value it has from when the app was still working with a previous version as far as I can tell.

Let me know if you need any further logs or testing - thanks!

Context Menu Actions not firing until opening the context menu again.

Unable to find solution for this.

Steps to reproduce:

Run program.
Right-Click on icon and click Open Nightscout
Nothing will happen.
Right-click the icon again and now it will launch the browser and go to your nightscout url.
After this, the context menu will not open anymore.

Mark readings that are out-of-date

It would be nice if it was possible to mark values that are older than x minutes. It could be a strikethrough, or a solid background color, or maybe a red bar above and below the text. If the readings are stale you might run into trouble if you don't check another source.

It should be configurable after how many minutes a value is marked out-of-date

not receiving CGM data (Dexcom EU)

Edit: This might just be Issue 62 (which is closed), however I'm receiving the same behavior with the latest version

first of all, a big thanks to all the contributors. This is a very useful tool and all your efforts are much appreciated!

However, unfortunately it doesn't work for me as I am not receiving any glucose readings. What I'm getting is this screen which keeps displaying the same values (something weird is going on with the time):

issue

I followed the Setup Guide, and I'm trying to get the data from the Dexcom servers (I live in the EU and can therefore only login to clarity.dexcom.eu; not clarity.dexcom.com). So I selected the International server.
My settings (I also get the "Settings saved" window without errors after confirming):

issue0

What I tried:

  • Allowing the application through Windows firewall
  • trying every other server option
  • triple checking Dexcom username and password (they are valid)
  • deleting the glucose_tray_settings.json und trying again

But unfortunately the result was unchanged.

Maybe this could be an issue with the Dexcom EU/International Server?
Or could this be caused by my Dexcom username being an e-mail address (containing multiple '.' [period] and '@')?

Im running the latest version of Glucose Tray 13.1.1 on Windows 10 and .NET Version 4.8.4048.0

Maybe someone can help me getting those CGM readings to my desktop at a glance.
Thank you!

Font is odd

The font on my laptop is pretty bad. Any way to sharpen that up, like the clock text or the other text items in my screenshot? Those other numbers are from "core temp" app.
Annotation 2019-08-30 190324

Make Debug Mode more meaningful

Currently, the check is only used in one location and for certain types of failures.

Would be nice to expand this to a larger purpose.

Maybe MessageBox.Show() for each error thrown when it happens along with the exception and inner exception messages?

Nightscout Readings wrong when using MMOL/L

I don't think the 5b6a2be commit Now query nightscout to see what type of value it is sending us is correct.

Certainly does not work for me and reports my blood sugar to be 18 times higher than they really are. (I've reverted to a previous build, which works fine).

My nightscout is setup using MMOL/L but the api figures are always returned in mg/dl. (Can't find any official confirmation / documentation on this, but another user has confirmed it is the same for him).

Related to this, regarding your comment

// 25 MMOL is > 540 MG, most readers wont go below 40 or above 400.
// Catch any full value MMOL readings that may be perfect integers that are delivered without a '.', i.e., 7.0 coming in as just 7
// TODO: Need to investigate if the (value <= 30) check is needed. Any Nightscout-MMOL users able to verify? See above line for reasoning.
   if (value.ToString().Contains(".") || value <= 30) 

Only speaking from my own case, but that block of code has never been executed. Firstly, as stated, my figures are returned in mg/dl and so have never contained any decimal points. Secondly I have never got any results of 30 or below. My readings are sourced from a FreeStyle libre and looking at the figures when I have had a bad low, I would be fairly sure that this never returns figures below 2.1 mmol/l or 38 mg/dl. I have had a manual finger prick reading of 1.9 mmol/l or 34 mg/dl but that isn't recorded in Nightscout (and is still is above the 30 theshold)

However issue #50 would make me wary of assuming that this is the case for everyone, as that bug was from one of my prs, but the strange thing is, that url works for me! (The fixed url also works). The data is returned in slightly different format (json rather than what looks like plain text), but it is still returned, so I'm not sure why it doesn't work for others.

TODO: Remove exe.config and replace with Json

Remove the app.config and replace with a json file we read and can recreate at runtime if it doesn't exist.

This will entail displaying a message noting as such and then close the program to allow the json to be filled out.

Startup validation of field values and displaying messages showing any errors.

Edit readme instructions once in place.

To-Do: Fix config file usage / implementation

This is critical to get done next because when we publish as a single standalone .net core exe, the config file gets embedded into the temp directory, so we manually find and read our current .dll.config.

Due to current limitations with the ConfigurationManager, we can only successfully read .exe.config files, and not our .dll.config that gets created during publishing.

Few solutions:

  1. Setup a post build process that generates the .exe.config file that we need and would use with releases.
  2. Move to Json format and stop using the Configuration Manager
  3. Add a way configure our app settings from a popup window opened by the app itself and store them in the app data folder on the machine or elsewhere.

#3 preferred, though it may also require implementing a Json config file as well that we read and write to from the program itself.

.Net 5.0 Single File Publish no longer a single file

When publishing after the .net 5.0 conversion, single file deployments now produce, and require, a handful of .dll's. Would be great to figure out the fix, or if a Microsoft issue, fix once they resolve it.

Enhancement: Customizable Dark/Light Mode Text Colors

When setting the different thresholds for normal/low/high/etc, give a color picker to choose any color. Make this a separate value for light/dark modes.

Requires:
Updating Config with a string value for each color option for both light and dark mode that will contain the HEX color with default.
Update Settings view with new color pickers, bindings for new settings values, and adding default values (currently found in the IconService).
Update IconService to pull from the options/settings file for these values instead of the current hard coding.

PollingThreshold is zero

Using 8.3.0

Just got a warning that my free Papertrail service has reached its log data transfer limit of 10 MB for today and it appears that PollingThreshold is not being read from the appsettings.json which means GlucoseTray is hitting NightScout several times a second.

Have not had much chance to debug, but I suspect it might need to be declared public rather than private.

mmol/L display mode cuts off decimal number

Describe the bug
When the current value has 2 digits as well as a decimal point e.g. 11.4, the decimal number is cut off

To Reproduce
Steps to reproduce the behavior:

  1. Raise your blood glucose level to above 10 mmol/L (don't actually if you can avoid it ๐Ÿ˜„)
  2. Set GlucoseUnit appsettings.json to "1" (mmol/L)
  3. See that the decimal number is cut off

Expected behavior
The full number should be displayed

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Build 18363

TO-DO: Seperate fetch logic from icon logic.

Create a project that contains all the fetch information. This can then be moved into a nuget package that others can use to fetch their results from either Dexcom or Nightscout.

Graph in PopUp Balloon

When double-clicking the icon to show the Balloon, have it display a graph below the current content with the past few hours similar to DexCom apps.

Is this possible?

Might have to look at rendering a borderless/frameless Windows Form / WPF dialog that replaces the balloon. This would give more flexibility over whats shown but may not look as standard or as stock as the current Windows implementation of ShowBalloonTip.

Settings UI Cleanup

Could use some enhancements to our WPF UI for the settings page.

i.e.,:

  • Ideally, we'd have some sort of color coded indication on the glucose thresholds to indicate what color they will display as. i.e., high/low are red, warning high/warning low are yellow, critically low is red.

Overall styling/theme.

Criticle low glucose warning every ~minute without numbers

For a couple of weeks now I have noticed this bug. There are no new nubers in the Taskbar, only "NUL". Then a warning pops up, containig the text "Critical Low Glucose Alert". No matter what my real Dexcom nubers say. Sometimes it happens a few times in a row, every ~minute, sometimes it just works as intended.

Restarting the .exe only works for a few minutes.

Im on Windows 11 and my Dexcom G7 mg/dl Data is from non US Servers.

grafik

Not working if herokuapp requires api secret

Good evening. It's a great application, thank you so much for sharing. My problem is I have "AUTH_DEFAULT_ROLES denied" in heroku.com settings so the application doesn't work. I've tried creating a Subject with access token without luck (in herokuapp.com Admin Tools).
Thank you so much for your help
Regards

See if we can bypass Herokuapp/Nightscout and go directly to DexCom

See if we can bypass having to setup an HerokuApp site with the Nightscout software installed. If we can find and use the same webservice calls that Nightscout makes, we would only need some of the DexCom account info to pull most recent (real-time) reading.

Cannot use the DexCom developer Api as it is delayed by 3 hours.

TODO: Do something with database data.

Now that we're logging to a Sqlite database, it opens up the opportunity to do something with that data. Whether it is being able to show your daily average, estimated A1C similar to how Dexcom does it, or any other number of possibilities.

Alternatively, we keep the application simple and as-is, and just let users do with the data as they please.

Ideal scenario would be being able to show a graph/chart of glucose readings for the past X hours that would appear in the Windows Notification menu when you double-click the icon.

Its not working

After the config screen he just dont shows up on task bar.

He ask for download data from nightscout but nothing happens.

GlucoseTray v. 14.0.2 app crash

Describe the bug
Unable to change settings, because of app crash.

To Reproduce
Steps to reproduce the behavior:

  1. Run the app.
  2. Right click on glucosetray app in tray icon and select "change settings"

Expected behavior
Window with settings does not open.

Desktop (please complete the following information):

  • OS: Windows 11 Pro 64bit

GlucoseTray version 13.4.0 is OK, only 14.0.2 has this issue.

TODO: Optional desktop alert when glucose crosses a threshold.

Add config setting DesktopAlertThreshold
Value of 0 means disabled, otherwise it takes a glucose number (same format/conversion logic as the existing glucose numbers that support MG/MMoL)
When glucose goes from below this number to >= to this number, show desktop alert with message.

No data / Dexcom EU / Germany

I try to use GlucoseTray with Dexcom, but i get only 0 Data.
2022-06-24_19h46_47

I try US Share 1 and US Share 2 also International. Is the European or German dexcom Clarity not compatible?

JSON Serializer crash when getting unexpected data from DexcomShare

Needs investigation, seems to happen randomly and rarely for chunks of time. Could be Dexcom's API going down? Need to most likely log more data. Issue resolves itself after a few minutes usually.

<EventData> <Data>Category: GlucoseTrayCore.Services.IGlucoseFetchService EventId: 0 Dexcom fetching failed or received incorrect format. System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0. at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[TValue](Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, Type returnType, JsonSerializerOptions options) at GlucoseTrayCore.Services.GlucoseFetchService.GetFetchResultFromDexcom(GlucoseResult fetchResult)
`

App not working for me

I initially thought it was a newer version that I updated to but now I can't get any version working at all. I'm not getting any error messages, I've cleared the temp directory but not sure where to look for logs. Basically nothing happens when the app opens. Windows 10 with all the latest updates.

Any suggestions?

Thanks

Invalid Nightscout url - Error : Unauthorized

Describe the bug
First run of the app, using Nightscout as the Datasource. Using a generated access token with admin rights.

"Settings are not valid. Please fix before continuing.
Invalid Nightscout url - Error : Unauthorized"

To Reproduce
Steps to reproduce the behavior:

  1. Go to GlucoseTrayCore.exe and enter in the URL and Token for Nightscout.
  2. Click on Save
  3. Error dialog appears with the error in the title.

Expected behavior
The token should be accepted and 'authorization' allowed.

Desktop (please complete the following information):

  • OS: Windows 10 Pro for Workstations 21H1
  • GlucoseTray: Latest release (11.1.3)

Additional context
I'm not sure what I might be doing wrong. I am fully selfhosting Nightscout and not using Heroku or anything outside of my own local network server.

Display in mmol

Would be great if it was possible to display glucose values in mmol.

Tests?

Look into creating a test project and associated tests for logic that could be used.

TODO: Add option to context menu to set program to run at start/logon

Add an option to the right-click context menu to set the program to run on user logon.

This should be a checkbox item that can be selected or deselected to enable or disable the feature.

Program should run at user log on if the option is checked/enabled. Most likely be creating/deleting a task in the windows task scheduler.

ToDo: Allow users to manage settings without appsettings.json

Create a window that shows on the first application launch to ask the user and have them fill out the settings that are now in the appsettings.json file.

Allow an option in the right click context menu to allow editing of these settings as well.

Ideally this would remove the appsettings.json file being needed to deploy separately and managed by users.

How would we store the users settings? Most likely apps local data folder or whatever the windows default for that is.

Stretch goal: allow option to sync settings or at least have an import/export option to a file.

Additional stretch goals:. Additional customization, such as colors used for different glucose levels, customizable tiers of glucose colors and alerts, etc.

Consider Microsoft.Extensions.Logging usage

Is your feature request related to a problem? Please describe.
Current ILog is custom and doesn't have already built implementations.

Describe the solution you'd like
Use Microsoft.Extensions.Logging as a logging interface.
Packages and services would depend on injected ILogger<T> only.
Bootstrapping would configure an existing logging implementation like Serilog that has already built sinks for many log destinations:
https://github.com/serilog/serilog/wiki/Provided-Sinks

Describe alternatives you've considered

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.