Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Represent pump status as 'device status' entry #1

Merged
merged 4 commits into from
Jan 7, 2016
Merged

Represent pump status as 'device status' entry #1

merged 4 commits into from
Jan 7, 2016

Conversation

mddub
Copy link
Owner

@mddub mddub commented Jan 7, 2016

@jasoncalabrese, let me know how this looks. I made the entries look like those in nightscout/cgm-remote-monitor#1375. I'll merge this here, and then update the mmconnect plugin in c-r-m to use this version and upload to the devicestatus collection instead of entries. cc @ps2, @loudnate

Before (entries.json):

{

    "_id": "568db6af245858b23a42e4f2",
    "type": "pump_status",
    "conduitInRange": true,
    "conduitMedicalDeviceInRange": true,
    "conduitSensorInRange": true,
    "conduitBatteryLevel": 66,
    "reservoirLevelPercent": 50,
    "reservoirAmount": 74,
    "medicalDeviceBatteryLevelPercent": 75,
    "sensorDurationHours": 143,
    "timeToNextCalibHours": 11,
    "sensorState": "NORMAL",
    "calibStatus": "LESS_THAN_TWELVE_HRS",
    "activeInsulin": 1.075,
    "date": 1452127915386,
    "dateString": "2016-01-07T00:51:55.386Z",
    "device": "connect://paradigm"
}

After (devicestatus.json):

{
   "device" : "connect://paradigm",
   "created_at" : "2016-01-07T00:51:55.386Z",
   "_id" : "568db6b48d55378405a5b5c2",
   "uploader" : {
      "battery" : 66
   },
   "pump" : {
      "iob" : {
         "timestamp" : "2016-01-07T00:51:55.386Z",
         "bolusiob" : 1.075
      },
      "reservoir" : 74,
      "battery" : {
         "percent" : 75
      }
   },
   "connect" : {
      "sensorDurationHours" : 143,
      "conduitMedicalDeviceInRange" : true,
      "timeToNextCalibHours" : 11,
      "conduitSensorInRange" : true,
      "calibStatus" : "LESS_THAN_TWELVE_HRS",
      "sensorState" : "NORMAL",
      "conduitInRange" : true
   }
}

@jasoncalabrese
Copy link

looks good, we can update nightscout/cgm-remote-monitor#1455 to look for pump.battery.percent you could also have a connect pill to show the other info if you want

mddub added a commit that referenced this pull request Jan 7, 2016
Represent pump status as 'device status' entry
@mddub mddub merged commit 490427f into master Jan 7, 2016
@mddub mddub deleted the v1.0.0 branch January 7, 2016 20:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants