Skip to content

Conversation

@danamlewis
Copy link
Contributor

@danamlewis danamlewis commented Jun 18, 2018

0.7.0 release notes:

oref0 0.7.0 is a fairly major refactoring release that switches from the no-longer-maintained python-based openaps toolkit to @ecc1's Go-based libraries for pump and CGM comms. This dramatically improves performance, particularly on the Pi Zero, and makes pump comms much more robust on all platforms. Due to the large number of fundamental changes, extensive testing is recommended before updating existing production rigs.

Note for Carelink stick users: carelink support is being deprecated and will no longer be supported, beginning in 0.7.0 and subsequent releases. If you are a legacy carelink rig user, please install 0.6.3 from the archives.

Note for TI stick users:

  • There is no support for USB-connected TI sticks in 0.7.0. If you want to keep using the hardware, you'll need to jumper the header to the Pi or Edison, and re-flash the cc111x chip:
    • There is support within oref0-setup.sh for the TI stick when it the headers are jumper-connected to the SPI ports on the Pi (or Edison).
    • There is no support in oref0-setup.sh for UART-wired TI sticks in oref0-setup at the moment, but you can manually configure the software.

Detailed notes about what's included in this release

(in approximate diff order from https://github.com/openaps/oref0/pull/1036/files):

  • Use jq instead of json
  • Password checking for Raspbian on initial install
  • Use node 8
  • Refactor into oref0-bash-common-functions.sh
  • autosens-history.js (research tool)
  • oref0-autotune-dayofweek.sh (for manually autotuning weekdays vs. weekends differently)
  • Dev / custom branch name support in openaps-bootstrap.sh / openaps-install.sh
  • Option for insulin curve tuning of insulinPeakTime and insulinEndTime on manual autotune runs
  • Additional autotune field showing how often a given hour's basal was tuned vs. interpolated
  • oref0-bluetoothup.sh improvements
  • Refactor cron jobs into oref0-cron-every-*.sh
  • Various syntax fixes and refactoring
  • New oref0-g4-loop.sh using Go binaries for G4 CGM comms
  • Updates to support MDT Enlite CGM (including new oref0-mdt-update.sh, oref0-monitor-cgm.sh)
  • New oref0-mmtune.sh to handle mmtuning using Go pump comms
  • Various oref0-online updates
  • Extensive updates to oref0-pump-loop.sh for Go-based pump comms etc.
  • Updates to oref0-set-device-clocks.sh to use Go-based pump comms and only update CGM time where possible
  • Extensive updates to oref0-setup.sh for Go-based pump comms etc.
  • Add example json files for use with oref0-simple-simulator
  • Updates to autotune to improve convergence
  • Support for retrospective autosens
  • Support for additional treatment data entry input methods
  • If CGM data is changing less than 1 mg/dL/5m for 45m, cancel any high temps and shorten any long zero temps
  • Support for custom SMBInterval
  • Ignore SGVs older than the last cal record to avoid dosing for calibration jumps
  • Remove old openaps aliases (from Python code, now that we are using Go)
  • Allow high_temptarget_raises_sensitivity for temptargets >= 101 and exercise_mode > 100 (vs. 111 and 105 previously)
  • Support custom bolus_increment
  • Update npm dependencies
  • Additional unit tests
  • Uploading the oref0 version and preferences file inside of devicestatus (useful for retrospective analysis)
  • x12 pump users no longer need extra setup steps; this is taken care of in oref0-setup.sh
  • xdrip-js support in oref0setup.sh`
  • also now supports xdrip+ offline as CGM source, when rig is connected to the phone's hotspot, it can pull BGs from xdrip+ even when the phone is technically offline.

Copy link
Contributor

@scottleibrand scottleibrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a "Request changes" flag to prevent accidentally merging this until we're ready to release 0.7.0.

@tim2000s

This comment has been minimized.

@scottleibrand

This comment has been minimized.

@tim2000s

This comment has been minimized.

@scottleibrand

This comment has been minimized.

@tim2000s

This comment has been minimized.

@scottleibrand

This comment has been minimized.

@tim2000s

This comment has been minimized.

@tim2000s

This comment has been minimized.

@scottleibrand

This comment has been minimized.

scottleibrand and others added 20 commits June 26, 2018 07:20
*  Update duty cycling code

* Add SPI reset
* Add logging function
* Enable independend timer for emergency actions

(Tested for around two weeks on my Pi0+ HAT + MDT)

* set duty cycle default to 0 (disable)

* fix typo
Conflicts:
	lib/determine-basal/determine-basal.js
* add prefs for phones that can support advanced bt tethering

bt_with_wifi: allow bt tether while rig also has a wifi connection.
bt_offline: keep bt tether steady even when there is no internet

not all phones will support these, but with them our samsung galaxy s7 will stay connected to the rig regardless of wifi, so we can always use the offline flask served pages, with or without internet, and the rig will still use wifi (either via its own wifi or the phone's) when available, even when bt tethered.

* Update oref0-online.sh

restore change missing in prior commit

* change spaces to tabs for consistent indentation
- Recognize AndroidAPS Temp Basal records
- Delete AndroidAPS "Cancel Temp Basal" records
0.7.0-dev (Go-based pump comms)
Added tz alias to allow quick access to changing timezone on rig.
wait_for_bg was waiting even though mdt was configured. Old grep command wasn't working any more and was replaced by get_pref_string function.
it is same clock as pump, so no update needed
@scottleibrand
Copy link
Contributor

Ok, so not a blocker. I’ll run npm audit fix again though.

@scottleibrand
Copy link
Contributor

npm audit fix can't automatically fix handlebars, because istanbul, the only package that uses it inside oref0, hasn't been updated yet. We could add handlebars to our package.json, but I'd rather not force people to do a new npm install for that, because we only use handlebars to run tests via istanbul, not to process arbitrary input. So this vulnerability doesn't affect us, and we should probably just wait until istanbul releases a new version with the updated dependency, and npm audit fix again at that point.

@viq
Copy link
Contributor

viq commented Oct 7, 2019 via email

@cluckj
Copy link
Contributor

cluckj commented Oct 7, 2019

Istanbul is deprecated and unlikely to get an update; nyc is the replacement but I haven't looked into what switching over would do to oref0.

danamlewis and others added 7 commits October 7, 2019 18:49
* Have autotune sync to NS nightly after autotune runs

This will keep Nightscout in sync with autotune after the nightly run.

* always round insulin to carb ratios to 0.1g

* round basal rates to 0.01 U/h, not 0.001

* sleep 60s to generate a new profile.json
* Standalone MRAA installer for OpenAPS v0.7.0

Addresses #1270

* Add oref0-mraa-install to package.json
* Unused local variables

* Unused local variables
* per #1288, only use minZTUAMPredBG if enableUAM, and use minGuardBG otherwise

* upload preferences.json to devicestatus

* use --preferences instead of positional arguments

* yargs entry for --preferences

* upload oref0 package.json version string

* redact sensitive fields in preferences.json

* reduce size of large logfiles like new -date ones
* Move the enable SMB into its own dedicated function

This will allow easier SMB conditional implementations

* Forgot to remove the existing logic...

* fix function naming

* function fix round 2
@danamlewis
Copy link
Contributor Author

danamlewis commented Oct 20, 2019

Ok, we have a release candidate to begin testing in all the configurations. If you've been running dev, please update (note below that we need to test re-installs as as well as full re-flash and install from scratch methods) and observe. If you're wondering what changes are included, please see the summarized notes at the top of the PR. After a day or two, please comment here with your setup type noting your rig type, CGM type, any particular configurations that you've tested or paid special attention to, and also your timezone. Thanks!

  • Rig types:

    • Edison & Explorer
    • Pi Zero & Explorer HAT
    • Pi 3 & Explorer HAT
    • Pi 3+Bonnet & Explorer HAT
    • Anyone still using a TI stick that wants to test? (Please see notes in the summary regarding TI limitations)
    • (Any other hardware types?)
  • Pump types:

    • x12
    • x15
    • x22
    • x23 /x54 (international)
  • Install types

    • Re-install per dev instructions with new dev branch
    • Reflash and install from scratch
  • All CGM types

    • G4-Go
    • xdrip-js methods
      - [x] xdrip offline
    • G5
    • G6
    • online only via NS
  • Timezones

    • Pacific
    • Eastern
    • Europe
    • Australia or NZ

General notes in addition to the summary of changes above in the PR:

  • After installing the version, make sure your autotune still makes sense the next few days
  • Ditto for autosens
  • If you're using high_temptarget_raises_sensitivity, make sure you test the new behavior there.

As a reminder for best practices, do not paste old preferences.json when upgrading between major versions as that often causes errors.

scottleibrand and others added 6 commits October 20, 2019 17:11
* Non-breaking space detected by eslint
* killall-g command

* killall-g command

* chmod +x

* add rudimentary older-than support

* use killall-g script to kill bash commands

* expand using tzachi's suggested code

* fix bugs and show pstree output of command(s) to be killed

* check that pid is still running before trying to kill its pgid

* don't check pstree output
* Offline xDrip looping

* Add the script to package.json

* Add the glucose value

* Changed the setup json to use the offline script

* Also add the script to ns-loop shell script

* Fix web script trying to access BG data when there's none

* Better error logging

* Output full filename on on parse error

* Ensure JSON parse gets a string, not a stream

* Don't read the file we're outputting to

* Don't read file we're outputting to

* Fix path typo

* Try loading from router, not hardcoded address

* Fix bug resulting from code restructuring

* The apparently rare case where glucose is loaded from Nightscout before a new reading was available out misformatted data

* Better error logging for wrong secret

* Code cleanup

* remove unused ns-glucose report instead of updating it

* remove commented-out Spike stuff

* tabs to sapces

* Remove binary download options (#1252)

* Remove binary download options

* Add radiotags to runagain, and fix bug for radiofruit hardware type

* Use Edison's FAT32 Partition (#1253)

Mount the Edison's FAT32 partition to give us enough room to install golang.

* Radiotags in oref0-runagain.sh (#1254)

Pass radiotags to oref0-setup.sh from oref0-runagain.sh.

* Add network module dependency (#1261)

Fixes issue of `Cannot find module 'network'` in the ns-looplog.

* Debian Buster compatibility  (#1275)

* Save hardwaretype in preferences.json

Store hardwaretype so that it can be used elsewhere.

* Install node v8

Make sure nodesource repo is used to install nodejs and npm.

* Install node v8

Make sure nodesource repo is used to install nodejs and npm, except on armv6...

* Switch Radiofruit openaps-menu back to main repo

* fix systemctl syntax

* skip bgproxy if we already have a new glucose value and it's time for another loop

* checkip.amazonaws.com now puts spaces after commas

* Allow oref0-upload-profile to also switch to new profile (#1285)

* Unused local variables (#1284)

* raspbian password checking adjustment (#1282)

old line 12: the existing logic didn't make sense to me check for edison  but expire root so adjusting to check for root, expire root
old line 16-21: If you changed the password for 'pi' before running the script you'd never get to the part about changing root's password as it's disabled and locked by default and therefore /run/sshwarn will not exist.
new line 16-32: Check if we are running Raspbian, check the build date against the current password date for both pi and root. If they are the same, we are using default passwords and prompt for change. Checking them independently and only information message once.

* fix wrong interface choose (#1286)

By default, choose the first interface found with a control socket in the socket path.

* fix bootstrap to put tune-dia-and-peak argument on openaps-install, not the curl

* Allow G4 Share serial to be blank (#1268)

* Categorize improvements for libre 1 minute data (#1238)

* Work in progress on categorize

  * Determine date & dateString properties in prepGlucose map function
  * Filter invalid records in filterRecords filter function
  * Clean up for loop to remove previously performed checks
  * Average any values that fall within the 2 minute deadband

* Increase limit to allow for 1 minute data

  * Ensure 1440 (60*24) records can be downloaded

* refactoring: round_basal (#1294)

- parametrized mocha test

* Improved rounding of mmol/L units in oref0-upload-profile (#1295)

* Round ISF properly in oref0-upload-profile with mmol/L units

* Round BG targets properly in oref0-upload-profile with mmol/L units

* Add explanations for unit conversion code

* Reestablish bluetooth connection after failure to set bluetooth hci name (#1291)

* Reset bluetooth adapter if fail to set bluetooth hci name

* Check to make sure oref0-bluetoothup not already running

* Stop bluetoothd and allow next cycle to handle restart

* per #1288, only use minZTUAMPredBG if enableUAM, and use minGuardBG otherwise (#1292)

* run oref0-set-system-clock after oref0-set-device-clocks in case rig is offline (#1290)

* run oref0-set-system-clock if oref0-set-device-clocks fails

* remove output redirection for debugging

* run oref0-set-system-clock regardless of return code from oref0-set-device-clocks

* fix tabs that should be spaces

* Fix case mismatch that causes values in mg/dl to be multiplied by 18 (#1296)

* Add checks to make sure variables are defined. (#1297)

* Update bin/all-autosens-history.sh

Add 2019

Co-Authored-By: viq <[email protected]>

* lodash 4.17.15 per npm audit fix

* Have autotune sync to NS nightly after autotune runs (#1098)

* Have autotune sync to NS nightly after autotune runs

This will keep Nightscout in sync with autotune after the nightly run.

* always round insulin to carb ratios to 0.1g

* round basal rates to 0.01 U/h, not 0.001

* sleep 60s to generate a new profile.json

* Standalone MRAA installer for OpenAPS v0.7.0 (#1302)

* Standalone MRAA installer for OpenAPS v0.7.0

Addresses #1270

* Add oref0-mraa-install to package.json

* Unused local variables (#1301)

* Unused local variables

* Unused local variables

* Upload preferences.json and oref0 version to devicestatus (#1300)

* per #1288, only use minZTUAMPredBG if enableUAM, and use minGuardBG otherwise

* upload preferences.json to devicestatus

* use --preferences instead of positional arguments

* yargs entry for --preferences

* upload oref0 package.json version string

* redact sensitive fields in preferences.json

* reduce size of large logfiles like new -date ones

* remove old commented-out code

* remove old commented and deprecated code

* Refactor enable smb in determine-basal.js (#1299)

* Move the enable SMB into its own dedicated function

This will allow easier SMB conditional implementations

* Forgot to remove the existing logic...

* fix function naming

* function fix round 2

* don't let  kill the script if oref0 already exists

* Travis CI: Upgrade to Python 3.8 and add more flake8 tests (#1304)

* Non-breaking space (#1305)

* Non-breaking space detected by eslint

* Detect socket timeout and don't log stack trace

* whitespace

* Add  ECONNREFUSED to safe error list, better error message

* Reduced logging (#1309)

* Detect socket timeout and don't log stack trace

* Add  ECONNREFUSED to safe error list, better error message

* Consolidate IP logging to same line as xDrip load notification, remove unused variables

* Disabled xDrip logging after first error

* expand one-line json to properly count glucose entries
@straykatz

This comment has been minimized.

@danamlewis

This comment has been minimized.

@straykatz

This comment has been minimized.

tzachi-dar and others added 4 commits November 6, 2019 16:21
Needed in order to delete the file if the rig was booted after a long time.
* Give hci name time to be set before stopping bluetooth

* Reduce max wait for hci name to be set

* Fix indentation inconsistency
I want to share the online status with other services (for now with my menu script, but Logger could use ist too).
* Fix comments

* Update comments to include nightly profile upload to Nightscout
@danamlewis

This comment has been minimized.

@danamlewis danamlewis merged commit ee154b0 into master Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.