Skip to content

robertcheek/nightscout-clock

 
 

Repository files navigation

Nightscout Clock

Nihtscout clock logo

Current version: 0.13

Nightscout Clock (or NSClock) is an open-source product aimed to help caregivers of people with type 1 diabetes have more piece of mind by being able to better glance at their loved onve blood glucose values.

resized_IMG_0217

Here is what it can do

  • 6 colorful clockfaces
  • Can get glucose data from Dexcom Share or Nightscout
  • Supports mg/dl and mmol/l
  • 10 minutes setup through web browser
  • Configurable low/high limits
  • Audible alarms in case the blood sugar is too low or too high
  • Automatic brightness adjuistment
  • Notifies of stall data
  • ...and more

How to install

  1. Buy Ulanzi TC001, it is about $50, so you don't have to sell a kidney, it is available both in US and Europe (Aliexpress sells it as well, for the same price)
  2. Wait a few days for the delivery
  3. Unpack, turn on (press on < and > buttons for a few seconds)
  4. Connect the USB-C cable (comes with the clock) to your computer
  5. Go to the installation page
  6. Follow the instructions
  7. Once the clock installed, take out your phone and join nsclock wi-fi network. Then go to http://192.168.4.1/
  8. Set up your device, provide the Wi-Fi network details, your Dexcom or Nightscout credentials, glucose warning limits and other parameters
  9. You're all set, enjoy!

More information for people who needs it

Nightscout CLock is a custom firmware for Ulanzi TC001. It can also run (with minor changes) on AWTRIX-Light custom hardware, so if you need bigger display, feel free to research.

Clockfaces

Name Look
SImple resized_IMG_0225
BIG DIGITS resized_IMG_0222
3-hours graph resized_IMG_0220
Graph and value resized_IMG_0221
Delta resized_IMG_0223
Time and value resized_IMG_0217

Configuration web interface

copped

Features (technical stuff, feel free to ignore)

  • Web-based installation (no need to install flashing tools, you just need the clock and a web browser)
  • AP mode and web-based configuration: the clock hosts a website where the user can configure all the parameters (data source, limits, alarms, display)
  • Simple glucose value display with trend arrow
  • Changing color based on limits
  • Nightscout data source, the clock gett units type and value boundaries from Nightscout
  • Juggluco data source (support for HTTP Nightscout endpoints)
  • Improv WiFi compatibility (setting up WiFi during the installation)
  • Gluroo data source (API_SECRET within the URL parameters)
  • Dexcom Share data source
  • Brightness adjustment
    • Brightness can be adjusted within the Web UI
    • Automatic brightness adjustment based on the ambient light
    • Double-click on the middle button on the clock turns the display on and off
  • Multiple clock faces support
    • Default clock face can be selected in the Web UI
    • Clock faces can be changed using arrow buttons on the clock
    • Simple clock face (value and trend arrow)
    • Full-width glucose graph
    • Graph, value and trend indicator
    • BIG DIGITS
    • Value, trend and delta
    • Clock and BG value (timezone is set in the clock's web interface)
  • Changes color to gray if the data is too old
  • Smart data and screen update timings: read data once it appears, refresh screen when needed
  • API data source. The clock has a simple Nightscout-like API which can receive glucose values from an external source. The main purpose of this feature is the ability to test the clock during the clockfaces development. In order to activate this feature, select the API data source within the clock's Web UI. Here are the endpoints:
    • /api/v1/entries POST endpoint receives an array of Nightscout-like entries. The only significant fields are sgv, date and trend or direction. Due to the limited memory the API is stable when sent less than 10 recotds
    • /api/v1/entries DELETE endpoint deleted all entries no matter the payload
  • Firmware versioning
  • Alarms with configurable Thresholds, snooze times and silence intervals

My TODO list

  • Add more clock faces
    • Battery, humidity and temperature
  • Smooth color change (rainbow) based on the value and boundaries
  • Support multiple WiFi network configurations (WiFi backup)
  • Create installation/configuration video
  • Create a guide for setting up the development environment and code walkthrough for contributions
  • Add more data sources
    • Medtronic
    • ...more... (if you are the author of a CGM data collecting app/service nad you want your data to be displayed on the Nightscout Clock, please contact me)

The code is heavily inspired by (has a lot of copy-pasted code from :D ) AWTRIX Light project.

About

Display blood sugar on a desk clock

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 71.8%
  • HTML 11.4%
  • JavaScript 8.2%
  • C 5.5%
  • Python 2.1%
  • Shell 0.9%
  • Batchfile 0.1%