cloud.smarthq.service.battery¶
Description¶
Service that represents the state of a battery system.
Example Device Response (Digital Twin API)¶
Service representing a battery system.
{
"adapterId": "0000000000000000000000000000000000000000",
"alertTypes": [],
"createdDateTime": "2022-03-04T12:12:12.123Z",
"deviceId": "0000000000000000000000000000000000000000000000000000000000000000",
"deviceType": "cloud.smarthq.device.battery",
"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.battery",
"lastSyncTime": "2022-03-04T12:12:12.123Z",
"domainType": "cloud.smarthq.domain.energy",
"supportedCommands": [],
"state": {
"statusOfCharge": 1.0,
"timeRemaining": 360.0
},
"serviceId": "0000000000000000000000000000000000000000000000000000000000000000",
"serviceDeviceType": "cloud.smarthq.device.battery",
"config": {
"storageCapacityUnits": "cloud.smarthq.type.battery.kwh",
"timeRemainingUnits": "cloud.smarthq.type.timeunits.minutes",
"statusOfChargeUnits": "cloud.smarthq.type.integerunits.percentage",
"storageCapacity": 1.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 |
---|---|---|
statusOfChargeUnits | INTEGER_UNITS | Yes |
storageCapacity | DOUBLE | Yes |
storageCapacityUnits | BATTERY | Yes |
timeRemainingUnits | TIME_UNITS | 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 |
---|---|---|
statusOfCharge | DOUBLE | Yes |
timeRemaining | INTEGER | No |
Data Types¶
DOUBLE¶
Value must be an double. Field specific restrictions such as a minimum and maximum may apply depending on the field.
INTEGER¶
Value must be an integer. Field specific restrictions such as a minimum and maximum may apply depending on the field.
BATTERY¶
BATTERY | Documentation |
---|---|
cloud.smarthq.type.battery.kwh | Kwh |
INTEGER_UNITS¶
INTEGER_UNITS | Documentation |
---|---|
cloud.smarthq.type.integerunits.cfm | Cubic feet per minute |
cloud.smarthq.type.integerunits.count | Integer count |
cloud.smarthq.type.integerunits.dbm | Decibel milliwatts |
cloud.smarthq.type.integerunits.gallons | Gallons |
cloud.smarthq.type.integerunits.hours | Hours |
cloud.smarthq.type.integerunits.kwh | Kilo watt hour |
cloud.smarthq.type.integerunits.level | level |
cloud.smarthq.type.integerunits.minutes | Minutes |
cloud.smarthq.type.integerunits.ounces | Ounces |
cloud.smarthq.type.integerunits.ounces.fluid | Fluid ounces |
cloud.smarthq.type.integerunits.percentage | Percentage |
cloud.smarthq.type.integerunits.rpm | Revolutions per Minute |
cloud.smarthq.type.integerunits.seconds | Seconds |
cloud.smarthq.type.integerunits.thermostatsignalv1 | Thermostat Signal v1 |
cloud.smarthq.type.integerunits.unitless | unitless |
cloud.smarthq.type.integerunits.watts | Watts |
TIME_UNITS¶
TIME_UNITS | Documentation |
---|---|
cloud.smarthq.type.timeunits.hours | Hours |
cloud.smarthq.type.timeunits.minutes | Minutes |
cloud.smarthq.type.timeunits.seconds | Seconds |