@TooTallNate TooTallNate released this May 28, 2018

Assets 2

It was brought to my attention that the project had become confusing to set up. Allow me to explain what happened, and how hopefully v3 will remedy that…

The original repo for the daemon was here (TooTallNate/nightscout-ps1). It was simple enough but worked great. Specifically, it lacked some additional features that the Nightscout web UI offers, like difference between last reading, respecting high and low alarms instead of just target thresholds, and a few others.

For the v2 release, I renamed the repo to TooTallNate/nightscout-ps1-daemon, which synced the previous reading and more generic properties from the Nightscout API, but it output an INI file instead of an ENV file. I also rewrote the bash portion in C, and that project stole this repository name which was the root of the confusion (that project now lives at TooTallNate/nightscout-ps1-c, but should be considered deprecated). This was a bummer because it was over-engineered and left the Windows users to fend for themselves, which I don't like.

That leads to this v3 release! The deamon project has been renamed back to the original repo name, and includes all of the previous improvements from v3 with hopefully less confusion. The included bash helper function is identical to the C counterpart, and is just as fast in my testing.

Happy BGLs!

Migrating from v1

Compared to the v1 daemon, there's a few differences in v3 that your bash function might need updating for:

  • If none other is specified, the default location for the cache file to be saved is ~/.nightscout-ps1.env (it used to be called ~/.bgl-cache)
  • If you specify your own file path, the cache file name MUST env in .env or .json
  • The cache file used to contain a local prefix on all the variable names. This is no longer the case. See here for an example of what the env file looks like now.
  • v1 mangled the variable names to not match what the Nightscout API was returning and added a nightscout_ prefix. This is no longer the case. For example, the variable previously called nightscout_bgl is now latest_entry_mgdl.
  • The previous reading values were not in v1. Now you may use them to calculate the diff from the current reading since the previous reading to render it in the prompt. The included bash helper function does this.

Major Changes

  • Add @zeit eslint config: 1a019e2
  • Add support for arbitrary formatters based on filename extension: 4830d3c
  • Rename project back to nightscout-ps1: 5015613
  • Add bash source script for optional usage: e49efcf
  • Add MIT license file: 90b6f04

Minor Changes

  • Port the logic from nightscout-ps1-c to bash: 6bbba6b
  • Manually resolve ~ to homedir: d5f9b03
  • Add examples: 4d67397


  • Fix lint: be8d5e7
  • Only one printf call in the bash function: 67533b4
  • -ge for the timeago thresholds: 27cbe2c

(I messed up Travis-CI from the rename ☹️. Binaries equivalent to this release can be found in v3.0.1).

@TooTallNate TooTallNate released this Jan 24, 2018

Assets 2

Minor Changes

  • Add previous_entry to INI file: 92493b3
  • Resolve the nightscout URL before closing previous socket connection: 3df5d03
  • Refactor to store entries in a Map keyed by mills: abebb23