kashamalasha / nightscout-widget-electron

An Electron widget application to show on a desktop blood glucose value is getting from Nightscout API
https://github.com/kashamalasha/nightscout-widget-electron
GNU General Public License v3.0
31 stars 7 forks source link
blood-glucose-monitoring diabetes nightscout nightscout-cgm

Owlet

The cross-platform application, that uses the Nightscout API. The aim is to provide a lightweight interface for your T1D measurement visualization (blood sugar levels).

The app's name is "Owlet", which means baby owl and is chosen because of the Nightscout project logo.

Donate me on Boosty Donate me on PayPal

README Translation

IT PL RU

Project Description

The widget will stay on top of your screen, so you don't need to keep your Nightscout site in the browser opened to see your/your relative's or kid's measurements in real-time anymore.

I was inspired by the mlukasek/M5_NightscoutMon solution, built on M5 Stack's hardware platform.

Screenshot-widget

Installation packages

Download for Windows

Download for macOS(Apple Silicon)

Download for macOS(Intel)

Download for Linux

Download Souces

Download Souces

LINUX user, expand it and read..
The widget is packed in an [AppImage](https://appimage.org/) package due to the following reasons: - It runs on all common Linux distributions - It supports an auto-update feature (but doesn't support notification about it) - AppImage usage simplifies the development process and testing on many different Linux distributions I recommend using [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) to properly integrate the AppImage into the OS and create all the necessary `.desktop` files to launch it as an installed application. However, this decision is entirely up to you. You can launch the application immediately after downloading from the folder you choose to download and create the `.desktop` file manually. Please install the listed dependencies using the OS package manager: - wmctrl - xdg-utils Without these listed dependencies, the widget will still work, but it might be difficult to manage the window states properly (`wmctrl` is used to hide the app from the application panel and tray) and to open other applications (`xdg-open` is used to open the browser for redirecting to the Nightscout site and open the file manager to navigate to the logs folder). Without these packages, the widget will alert you about the missing dependencies once a day on every launch. Auto-update may cause freezing. The application starts checking for updates right after the launch, but only once a day. If it finds a new version in the latest releases, it will begin downloading and replacing the AppImage on your drive, which usually takes about 1-2 minutes. If the application freezes, you need to wait until it awakens, or alternatively, you can kill the process using the `ps` command and restart it. The issue is related to the lack of usability of the `notification-daemon`. Sometimes, the D-Bus service doesn't configure properly, and as a result, the `notify-send` command cannot be executed. If the `notify-send` command works fine on your distribution, then it is not your issue, and everything should function properly. Please note that the AppImage doesn't have yet a built-in mechanism to notify about the updates. If you are knowledgeable about how to implement this feature, you are welcome to contribute by submitting a pull request; I would sincerely appreciate it.

⚠️ Before start

‼️ THIS IS VERY IMPORTANT: You have to be sure that all steps are done before you make the first launch!

  1. Log in to the admin panel of your Nightscout site (e.g. https://some-cgm.site.com/admin/)
  2. Create a new role with permission to read data using the pattern *:*:read
  3. Create a new subject for the application with the role created in step 2, or use an existing role with the pattern to read data *:*:read
  4. Copy the access token for this subject to your clipboard or save it

First start

On the first launch, the app will prompt you to fill in the following settings

Screenshot-widget

1. Nightscout API Settings

2. Widget preferences

Screenshot-widget

The app uses the following Abbot™ FreeStyle Libre™ sensors algorithm to recognize the trend pattern.

Screenshot-widget

You can find more information on the approach to using trend arrows to adjust insulin doses in the article of the Journal of the Endocrine Society: Approach to Using Trend Arrows in the FreeStyle Libre Flash Glucose Monitoring Systems in Adults.

PDF version available for downloading.

3. Blood sugar levels preferences

Set the blood sugar tracking parameters using the following guides:

Screenshot-widget Screenshot-widget Screenshot-widget

4. Settings language and localization

Screenshot-widget

Using the widget

Auto updates

Work In Progress

If you feel desire to improve it or help. You can suggest any ideas or detected bugs to the project board.

To build it from source code

To clone and run this repository, you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line do:

# Clone this repository
git clone https://github.com/kashamalasha/nightscout-widget-electron
# Go into the repository
cd nightscout-widget-electron
# Install dependencies
npm install
# Run the app
npm start
# Or run in developer mode for deeper logging and debugging
npm run dev

Operating systems compatibility

Compatible with:

Additional Resources

License

GNU GPL v3

Contacts

Feel free to contact me any of these ways:

🙏 I'll appreciate any feedback!