Smart Meter Direct Connection - Eliminate User Setup

This article pertains to: Inform (v2)

Connecting a Smart Meter device via the Validic Marketplace is easy. Instead of the typical cloud account linking workflow, users simply enter their Smart Meter device’s unique IMEI number and they’re done.

However, an even easier user setup workflow is available for cellular sources like Smart Meter. Now, Validic Inform clients can build a workflow using Direct Connection API calls to automatically connect their users to Smart Meter - without requiring the user to enter anything into the Validic Marketplace.

Direct Connection offers benefits such as:

  • Setup-free workflow: User interaction is not required to connect the cellular device. Virtually no setup is needed by the user.

  • App-optional experience: User is not required to use a smartphone to connect or sync readings.

  • API-based implementation: Clients can implement Direct Connection using simple JSON APIs.

This page details how the Direct Connection APIs work for Smart Meter. To learn more about the Inform integration to Smart Meter, please submit a request to your Validic Customer Success Executive or contact our support team at support@validic.com.


User Authorization for Smart Meter Cellular Devices

 

Overview

End users cannot purchase Smart Meter cellular devices directly from Smart Meter. These devices must be acquired through a client who has signed a contract with Smart Meter. Validic Inform does not have access to the PHI necessary to ship devices, therefore Inform clients using Smart Meter cellular devices are responsible for acquiring the devices and distributing them to patients/users.

This guide details the Inform APIs that clients will need to implement in order to create and manage the data connection between Smart Meter and Validic Inform on behalf of the end user. The required steps are:

  1. Provision a user in Validic Inform

  2. Establish the user device connection between Smart Meter and Validic Inform

  3. Receive Smart Meter data in Validic Inform

We also cover disconnecting the user’s Smart Meter device connection, in case the user leaves your program.

Let’s get into the individual steps.

 

 

Provision User in Validic Inform

 

Sample Request

Content-Type: application/x-www-form-urlencoded

POST https://api.v2.validic.com/organizations/:orgid/users?token=:token

{  

   "uid":"277040620sol3"

}

 

Where:

:orgid is the Validic Organization ID to associate the user with

:token is the Organization access token

uid is the client’s user identifier

 

 

Sample Response

{

    "id": "59b0664cf758800001e13ea9",

    "uid": "277040620sol3",

    "marketplace": {

        "token": "ee889ef9d7fb7a9644c97ef9d69ZSAMPLEa0be23352bdee46a775c066ef0f890",

        "url": "https://syncmydevice.com?token=ee889ef9d7fb7a9644c97ef9d69ZSAMPLEa0be23352bdee46a775c066ef0f890"

    },

    "mobile": {

        "token": "7c001f84255SAMPLE8c168ba563035"

    },

    "sources": [],

    "created_at": "2023-07-06T21:19:08Z",

    "updated_at": "2023-07-06T21:19:08Z"

}

 

 

Establish User Device Connection via Direct Connection API

 

Sample Request

Content-Type: application/json

POST https://syncmydevice.com/direct/auth/smart_meter/connect

{

    "token": :token,

    "device_id": :deviceID,

    "device_type": :deviceType

}

 

Where:

:token is the user’s marketplace token

:deviceID is the Smart Meter device IMEI (see Note 3 below)

:deviceType is the device type (see Note 4 below)

 

Note: 

  1. All values are strings

  2. If the user has multiple Smart Meter devices to connect then multiple requests must be made, one for each device

  3. device_ID is the 15-digit IMEI number found on the back of the Smart Meter device or its packaging

  4. device_type must be one of the following: blood_glucose|blood_pressure|weight_scale|pulse_oximeter

 

 

Example Request Body

{

   "token": "02f0c59b63310f7cec951a5027d1e8SAMPLEec1dfd5f7e1f6927",

   "device_id": "123453782873223",

   "device_type": "blood_glucose"

}

 

 

Sample Response

{
"credentials": {
"device_id": "123453782873223",
"device_type": "blood_glucose",
"device_name": null
},
"type": "smart_meter",
"created_at": "2023-10-01T15:53:41Z"
}

 

When enabled, Smart Meter also appears in your Validic Inform Marketplace. If users connect via the marketplace, they will be routed to a screen to enter their 15-digit IMEI number manually, which will also connect them to Smart Meter.

If you want to prevent users from seeing Smart Meter as an option in the marketplace you’ll want to either avoid routing the user to the marketplace or hide the Smart Meter (smart_meter) source from your user’s view using the Custom Marketplace.

 

Disconnect User via Direct Connection API

Disconnecting the user from Smart Meter can be done in two ways:

  1. Disconnect a single device IMEI from the user - this leaves any other Smart Meter device IMEIs connected to the user and only removes the IMEI indicated.

  2. Disconnect all device IMEIs from the user - this disconnects all Smart Meter device IMEIs from the user at once.

 

Disconnect a single device

Sample Request

POST https://syncmydevice.com/direct/auth/smart_meter/disconnect/:IMEI?token=:token

 

Where:

:IMEI is the Smart Meter device IMEI (see Note 2 below)

:token is the user’s marketplace token

 

Note: 

  1. If the user has multiple Smart Meter devices to connect then multiple requests must be made, one for each device. Or you can disconnect all Smart Meter devices at once using the Disconnect All Devices API in the section below.

  2. The device IMEI is a 15-digit number found on the back of the Smart Meter device or its packaging

 

 

Example Request

POST 'https://syncmydevice.com/direct/auth/smart_meter/disconnect/123453782873223?token=02f0c59b63310f7cec951aSAMPLEdd15481ec1dfd5f7e1f6927'

 

 

Sample Response

{
"credentials": {
"device_id": "123453782873223",
"device_type": "blood_glucose",
"device_name": null
},
"type": "smart_meter",
"created_at": "2023-10-01T15:53:41Z",
"deleted_at": "2023-10-10T17:47:15Z",
"deleted_reason": "User disconnected from Direct Endpoint"
}

 

 

Disconnect all devices

Sample Request

POST https://syncmydevice.com/direct/auth/smart_meter/disconnect_all?token=:token

 

Where:

:token is the user’s marketplace token

 

Note: 

  1. This endpoint will disconnect all Smart Meter devices for the given user. If you only want to disconnect a specific device then the Disconnect A Single Device API in the section above should be used.

 

 

Example Request

POST 'https://syncmydevice.com/direct/auth/smart_meter/disconnect_all?token=02f0c59b63310f7cec951aSAMPLEdd15481ec1dfd5f7e1f6927'

 

 

Sample Response

{
"meta": {
"total": 2
},
"connections": [
{
"credentials": {
"device_id": "111111111111111",
"device_type": "blood_pressure",
"device_name": ""
},
"type": "smart_meter",
"created_at": "2023-10-01T15:46:15Z",
"deleted_at": "2023-10-10T17:49:21Z",
"deleted_reason": "User disconnected from Direct Endpoint"
},
{
"credentials": {
"device_id": "222222222222222",
"device_type": "weight_scale",
"device_name": ""
},
"type": "smart_meter",
"created_at": "2023-10-01T15:46:26Z",
"deleted_at": "2023-10-10T17:49:21Z",
"deleted_reason": "User disconnected from Direct Endpoint"
}
]
}

 

Smart Meter Data

The Smart Meter Inform integration has the source ‘type’: smart_meter

The Smart Meter Inform integration supports the data metrics defined on the Standard Metrics Used Per App page (see “Smart Meter” app).

 

Sample Data

The below example illustrates a single weight measurement using the Smart Meter iPulseOx pulse oximeter. This sample shows how these readings appear in the Validic Inform Streaming API and REST API.

{ "checksum": "b0a2547d56SAMPLE5d57437a90b", "created_at": "2023-10-10T17:20:04.858Z", "deleted_at": null, "end_time": "2023-10-10T15:58:56Z", "id": "3de314260ccSAMPLE69c5bae6547f1", "log_id": "500000046950878", "metrics": [ { "type": "spo2", "origin": "device", "unit": "percent", "value": 99.0 }, { "type": "pulse", "origin": "device", "unit": "bpm", "value": 82 } ], "offset_origin": "source", "source": { "type": "smart_meter", "device": { "id": "111111111111111", "model": "smc-ox", "manufacturer": "smart meter", "diagnostics": [] } }, "start_time": "2023-10-10T15:58:56Z", "tags": [], "type": "measurement", "user": { "organization_id": "5ef0ef69SAMPLEba562", "user_id": "652572SAMPLEe18b8b8", "uid": "123456" }, "user_notes": [], "utc_offset": -14400, "version": "1.0" }

 

Details on using the Inform Streaming API and REST APIs can be found in our online technical documentation.