OmniCare Data Alert

OmniCare provide data alert function when device upload their date.


Setting Alert Condition

Create Alert Condition

[Request]

1 POST https://omnicare.asus.life/api/alert

Request header

Description

Request header

Description

Authorization

See Omnicare Authorization API

Content-Type

application/json

[Request Body]

1 2 3 4 5 6 7 8 9 10 11 12 13 [ { "deviceId": "string", "schemaType": "string", "valueCondition": [ { "valueName": "string", "valueNumber": 0, "valueOperator": "string" } ] } ]

Example 01 :

Setting alert condition to device ( “OmniCare-Test-0001“ ) when SPO2 value less than 90

1 2 3 4 5 6 7 8 9 10 11 12 13 [ { "deviceId": "OmniCare-Test-0001", "schemaType": "omnicare_SPO2", "valueCondition": [ { "valueName": "value", "valueNumber": 90, "valueOperator": "<" } ] } ]

 

Example 02:

Setting alert condition to multi-device ( “OmniCare-Test-0001“ & “OmniCare-Test-0002“ ) when heart rate value greater than 150 and less than 50

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 [ { "deviceId": "OmniCare-Test-0001", "schemaType": "omnicare_bloodPressure", "valueCondition": [ { "valueName": "hr", "valueNumber": 50, "valueOperator": "<" }, { "valueName": "hr", "valueNumber": 150, "valueOperator": ">" } ] }, { "deviceId": "OmniCare-Test-0002", "schemaType": "omnicare_bloodPressure", "valueCondition": [ { "valueName": "hr", "valueNumber": 50, "valueOperator": "<" }, { "valueName": "hr", "valueNumber": 150, "valueOperator": ">" } ] } ]

[Response Body]

success

1 2 3 4 { "status": "success", "msg": "true" }

error

1 2 3 4 { "status": "fail", "msg": {error message} }

 

Update Alert Condition

[Request]

1 PUT https://omnicare.asus.life/api/alert

Request header

Description

Request header

Description

Authorization

See Omnicare Authorization API

Content-Type

application/json

[Request Body]

1 2 3 4 5 6 7 8 9 10 11 12 13 [ { "deviceId": "string", "schemaType": "string", "valueCondition": [ { "valueName": "string", "valueNumber": 0, "valueOperator": "string" } ] } ]

[Response Body]

success

1 2 3 4 { "status": "success", "msg": "true" }

error

1 2 3 4 { "status": "fail", "msg": {error message} }

 

Get Alert Condition

[Request]

1 GET https://omnicare.asus.life/api/alert/{deviceId}/{schemaType}

Request header

Description

Request header

Description

Authorization

See Omnicare Authorization API

Content-Type

application/json

[Response Body]

success

1 2 3 4 { "status": "success", "msg": "true" }

error

1 2 3 4 { "status": "fail", "msg": {error message} }

 

Example :

get device ( “OmniCare-Test-0001“ ) alert condition data in schemaType : omnicare_SPO2

1 2 3 4 curl --request GET \ --url https://omnicare.asus.life/api/alert/OmniCare-Test-0001/omnicare_SPO2 \ --header 'Authorization: {token}' \ --header 'Content-Type: application/json'

 


Receive Alert Data

Subscribe MQTT Topic

  • FQDN: mqtt.asus.life

  • Port: 1883(TCP), 1884(WebSockets), 8883(SSL)

  • Topic Base: omnicare/{ hash string }/dataAlert

  • username: OmniCare login account

  • password: OmniCare login password

 

{hash string} value is from login account ,and use md5(16bit) to hash login account.(only accept lowercase)

Example:

login account is test@abc.123

md5(16bit) value will be “a530ab4bd5a32165”