Owlet Vitals
Grafana Dashboard to be used to display data collected from an Owlet Smart Sock via HomeAssistant->Prometheus
HomeAssistant Owlet Integration available at:
https://github.com/jlamendo/ha-sensor.owlet

Graphs are configured to be used with a HomeAssistant->Prometheus export that is not namespaced - i.e. is not filtering and is collecting all data. You will need to update the queries if that is not the case for you, or modify your HA prometheus config.

Example HomeAssistant Sensor Configuration:
```
- platform: template
  sensors:
    owlet_heart_rate:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.heart_rate}}"
      unit_of_measurement: BPM
    owlet_spo2:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.oxygen_saturation}}"
      unit_of_measurement: SPO2
    owlet_movement:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.movement}}"
      unit_of_measurement: "%"
    owlet_battery:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.battery}}"
      unit_of_measurement: "%"
    owlet_rssi:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.ble_rssi}}"
      unit_of_measurement: dBm
    owlet_monitoring_status:
      value_template: "{{(states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.active) and (states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].state == 'Connected')}}"
      unit_of_measurement: boolean
    owlet_connection:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].state}}"
      unit_of_measurement: boolean
    owlet_tachycardia_alert:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.HIGH_HR_ALRT}}"
      unit_of_measurement: boolean
    owlet_bradycardia_alert:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.LOW_HR_ALRT}}"
      unit_of_measurement: boolean
    owlet_hypoxia_alert:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.LOW_OX_ALRT}}"
      unit_of_measurement: boolean
    owlet_lobatt_alert:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.LOW_BATT_ALRT}}"
      unit_of_measurement: boolean
    owlet_read_integrity_alert:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.LOW_INTEG_READ}}"
      unit_of_measurement: boolean

```
{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.0.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 13454,
  "graphTooltip": 2,
  "id": null,
  "links": [],
  "panels": [
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null
          },
          "mappings": [
            {
              "from": "",
              "id": 0,
              "operator": "",
              "text": "OK",
              "to": "",
              "type": 1,
              "value": "0"
            },
            {
              "from": "",
              "id": 1,
              "operator": "",
              "text": "ALERT",
              "to": "",
              "type": 1,
              "value": "1"
            }
          ],
          "max": 1,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "rgb(72, 222, 55)",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 10,
        "x": 0,
        "y": 0
      },
      "id": 14,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "expr": "sensor_unit_boolean{entity=\"sensor.owlet_bradycardia_alert\"}",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "Low Heart Rate",
          "refId": "A"
        },
        {
          "expr": "sensor_unit_boolean{entity=\"sensor.owlet_tachycardia_alert\"}",
          "instant": false,
          "interval": "",
          "legendFormat": "High Heart Rate",
          "refId": "B"
        },
        {
          "expr": "sensor_unit_boolean{entity=\"sensor.owlet_hypoxia_alert\"}",
          "instant": false,
          "interval": "",
          "legendFormat": "Low Oxygen",
          "refId": "C"
        },
        {
          "expr": "sensor_unit_boolean{entity=\"sensor.owlet_lobatt_alert\"}",
          "instant": false,
          "interval": "",
          "legendFormat": "Low Battery",
          "refId": "D"
        },
        {
          "expr": "sensor_unit_boolean{entity=\"sensor.owlet_read_integrity_alert\"}",
          "instant": false,
          "interval": "",
          "legendFormat": "Integrity",
          "refId": "E"
        },
        {
          "expr": "sensor_unit_boolean{entity=\"sensor.owlet_monitoring_status\"}",
          "instant": false,
          "interval": "",
          "legendFormat": "Monitoring Status",
          "refId": "F"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Alerts",
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 10,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 13,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pluginVersion": "7.0.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sensor_unit_percent{entity=\"sensor.owlet_movement\"}",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "Movement",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "WiggleMeter",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:1084",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:1085",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-red",
                "value": null
              },
              {
                "color": "red",
                "value": 10
              },
              {
                "color": "semi-dark-yellow",
                "value": 20
              },
              {
                "color": "rgb(220, 234, 57)",
                "value": 39
              },
              {
                "color": "rgb(69, 191, 53)",
                "value": 50
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 16,
        "y": 0
      },
      "id": 11,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "expr": "sensor_unit_percent{entity=\"sensor.owlet_battery\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Battery",
      "type": "gauge"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "dBm"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 19,
        "y": 0
      },
      "id": 12,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "expr": "sensor_unit_dbm{entity=\"sensor.owlet_rssi\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "BLE RSSI",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "RSSI",
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "max": 220,
          "min": 60,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-red",
                "value": null
              },
              {
                "color": "semi-dark-yellow",
                "value": 90
              },
              {
                "color": "rgb(163, 191, 105)",
                "value": 100
              },
              {
                "color": "dark-green",
                "value": 110
              },
              {
                "color": "dark-red",
                "value": 200
              }
            ]
          },
          "unit": "BPM"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 13,
        "w": 6,
        "x": 0,
        "y": 4
      },
      "id": 2,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "expr": "sensor_unit_bpm{entity=\"sensor.owlet_heart_rate\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Heart Rate",
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 8,
      "gridPos": {
        "h": 13,
        "w": 16,
        "x": 6,
        "y": 4
      },
      "hiddenSeries": false,
      "id": 10,
      "interval": "5s",
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "null as zero",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sensor_unit_bpm{entity=\"sensor.owlet_heart_rate\"}",
          "interval": "",
          "legendFormat": "CURRENT",
          "refId": "A"
        },
        {
          "expr": "avg_over_time(sensor_unit_bpm{entity=\"sensor.owlet_heart_rate\"}[1m])",
          "interval": "",
          "legendFormat": "AVG-1M ROLLING",
          "refId": "B"
        },
        {
          "expr": "avg_over_time(sensor_unit_bpm{entity=\"sensor.owlet_heart_rate\"}[5m])",
          "interval": "",
          "legendFormat": "AVG-5M ROLLING",
          "refId": "C"
        },
        {
          "expr": "avg_over_time(sensor_unit_bpm{entity=\"sensor.owlet_heart_rate\"}[30m])",
          "interval": "",
          "legendFormat": "AVG-30M ROLLING",
          "refId": "D"
        },
        {
          "expr": "changes(last_updated_time_seconds{entity=\"sensor.owlet_smart_sock_ac000w008452681\"}[15s])",
          "format": "time_series",
          "hide": true,
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "refId": "E"
        },
        {
          "expr": "sensor_unit_boolean{entity=\"sensor.owlet_monitoring_status\"}",
          "hide": true,
          "interval": "",
          "legendFormat": "",
          "refId": "F"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Heart Rate",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:245",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:246",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "max": 100,
          "min": 80,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-red",
                "value": null
              },
              {
                "color": "dark-red",
                "value": 80
              },
              {
                "color": "#EAB839",
                "value": 85
              },
              {
                "color": "rgb(95, 135, 45)",
                "value": 90
              },
              {
                "color": "semi-dark-green",
                "value": 95
              },
              {
                "color": "dark-green",
                "value": 100
              }
            ]
          },
          "unit": "% SpO2"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 12,
        "w": 6,
        "x": 0,
        "y": 17
      },
      "id": 4,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "expr": "sensor_unit_spo2{entity=\"sensor.owlet_spo2\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "SpO2",
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 3,
      "gridPos": {
        "h": 12,
        "w": 16,
        "x": 6,
        "y": 17
      },
      "hiddenSeries": false,
      "id": 8,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 3,
      "nullPointMode": "connected",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sensor_unit_spo2{entity=\"sensor.owlet_spo2\"}",
          "interval": "",
          "legendFormat": "CURRENT",
          "refId": "A"
        },
        {
          "expr": "avg_over_time(sensor_unit_spo2{entity=\"sensor.owlet_spo2\"}[1m])",
          "hide": false,
          "interval": "",
          "legendFormat": "AVG-1M ROLLING",
          "refId": "D"
        },
        {
          "expr": "avg_over_time(sensor_unit_spo2{entity=\"sensor.owlet_spo2\"}[5m])",
          "interval": "",
          "legendFormat": "AVG-5M ROLLING",
          "refId": "B"
        },
        {
          "expr": "avg_over_time(sensor_unit_spo2{entity=\"sensor.owlet_spo2\"}[30m])",
          "hide": false,
          "interval": "",
          "legendFormat": "AVG-30M ROLLING",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "SpO2",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:245",
          "format": "percent",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:246",
          "format": "percent",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "",
  "schemaVersion": 25,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Owlet Vitals",
  "uid": "LetdQroGz",
  "version": 19,
  "description": "Grafana Dashboard to be used to display data collected from an Owlet Smart Sock via HomeAssistant->Prometheus"
}