cloud.smarthq.service.volume.liquid.v1¶
Description¶
Service for the volume of a liquid.
Example Device Response (Digital Twin API)¶
Rinse water level for Frontload Commercial Laundry Washer.
{
"adapterId": "0000000000000000000000000000000000000000",
"alertTypes": [],
"createdDateTime": "2022-03-04T12:12:12.123Z",
"deviceId": "0000000000000000000000000000000000000000000000000000000000000000",
"deviceType": "cloud.smarthq.device.washer",
"gatewayId": "0000000000000000000000000000000000000000000000000000000000000000",
"kind": "device#item",
"lastPresenceTime": "2022-03-04T12:12:12.123Z",
"lastSyncTime": "2022-03-04T12:12:12.123Z",
"presence": "OFFLINE",
"removable": true,
"services": [
{
"serviceType": "cloud.smarthq.service.volume.liquid.v1",
"lastSyncTime": "2022-03-04T12:12:12.123Z",
"domainType": "cloud.smarthq.domain.rinse.level",
"supportedCommands": [
"cloud.smarthq.command.volume.liquid.v1.set"
],
"state": {
"liters": 10.0,
"gallonsConverted": 2.6417217685798895
},
"serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
"serviceDeviceType": "cloud.smarthq.device.washer",
"config": {
"litersMaximum": 32.0,
"gallonsMinimumConverted": 1.3208608842899447,
"litersMinimum": 5.0,
"gallonsDefaultConverted": 2.6417217685798895,
"gallonsMaximumConverted": 8.453509659455646,
"litersDefault": 10.0
},
"lastStateTime": "2022-03-04T12:12:12.123Z"
}
],
"userId": "000000000000000"
}
Configuration¶
The following are properties for the gateway/device sync as part of the "config" object for each individual service.
Field Name | Property Type | Required | Calculated |
---|---|---|---|
gallonsDefault | DOUBLE | No | |
gallonsDefaultConverted | DOUBLE | No | Yes |
gallonsMaximum | DOUBLE | No | |
gallonsMaximumConverted | DOUBLE | No | Yes |
gallonsMinimum | DOUBLE | No | |
gallonsMinimumConverted | DOUBLE | No | Yes |
liquidType | LIQUID_TYPE | No | |
litersDefault | DOUBLE | No | |
litersDefaultConverted | DOUBLE | No | Yes |
litersMaximum | DOUBLE | No | |
litersMaximumConverted | DOUBLE | No | Yes |
litersMinimum | DOUBLE | No | |
litersMinimumConverted | DOUBLE | No | Yes |
State¶
The following are properties for the device state report as part of the "state" object for each individual service.
Field Name | Property Type | Required | Calculated |
---|---|---|---|
disabled | BOOLEAN | No | |
gallons | DOUBLE | No | |
gallonsConverted | DOUBLE | No | Yes |
liters | DOUBLE | No | |
litersConverted | DOUBLE | No | Yes |
Commands¶
The following are properties for both the Digital Twin API to send a command to the device as well as the properties passed as part of a command to the gateway to be processed by the device itself.
cloud.smarthq.command.volume.liquid.v1.set¶
Command used to set the volume of a liquid.
Field Name | Property Type | Required | Calculated |
---|---|---|---|
gallons | DOUBLE | No | |
gallonsConverted | DOUBLE | No | Yes |
liters | DOUBLE | No | |
litersConverted | DOUBLE | No | Yes |
Example Commands¶
Command to set the rinse level of a Frontload Commercial Laundry Washer.
{
"command": {
"commandType": "cloud.smarthq.command.volume.liquid.v1.set",
"liters": 10.0
},
"deviceId": "00000000000000000000000000000000000000000000000000000000000000",
"domainType": "cloud.smarthq.domain.rinse.level",
"kind": "service#command",
"serviceDeviceType": "cloud.smarthq.device.washer",
"serviceType": "cloud.smarthq.service.volume.liquid.v1"
}
Supported Outcomes¶
Each service has an allow listed set of outcomes that the device may return when asked to execute a command.
Outcome | Documentation |
---|---|
cloud.smarthq.outcome.badrequest | The request was invalid. |
cloud.smarthq.outcome.developererror | Only used when there is a server side bug |
cloud.smarthq.outcome.deviceoffline | The device is offline. |
cloud.smarthq.outcome.forbidden | The request is forbidden due to permissions. |
cloud.smarthq.outcome.internalerror | The server had an issue processing the request |
cloud.smarthq.outcome.missingconfig | The service config is missing |
cloud.smarthq.outcome.missingstate | The service state is missing |
cloud.smarthq.outcome.notallowed | The command is not allowed. |
cloud.smarthq.outcome.notfound | The request is forbidden due to permissions. |
cloud.smarthq.outcome.notsupported | The command is not supported. |
cloud.smarthq.outcome.outofbounds | General out of bounds error |
cloud.smarthq.outcome.servicedisabled | Feature is currently disabled |
cloud.smarthq.outcome.success | Successful request |
cloud.smarthq.outcome.timeout | The server experienced timeout waiting for a response from the gateway |
Data Types¶
BOOLEAN¶
Value must be either true or false.
DOUBLE¶
Value must be an double. Field specific restrictions such as a minimum and maximum may apply depending on the field.
LIQUID_TYPE¶
LIQUID_TYPE | Documentation |
---|---|
cloud.smarthq.type.liquid.unknown | Unknown |
cloud.smarthq.type.liquid.water | Water |