Devices¶
Manage devices in account.
create¶
Generates and retrieves a new action from the Device
Parameters:
deviceObj: DeviceCreateInfoObject data to create new device
delete¶
Deletes an device from the account
Parameters:
deviceID: GenericID: strDevice ID
edit¶
Modify any property of the device
Parameters:
deviceID: GenericID: strDevice IDdeviceObj: DeviceEditInfoDevice object with fields to replace
emptyDeviceData¶
Empty all data in a device.
Parameters:
deviceID: GenericID: strDevice ID
getDeviceData¶
Get data from all variables in the device.
Parameters:
deviceID: GenericID: strDevice IDOptional queryParams: DataQueryQuery parameters to filter the results.
Example:¶
from tagoio_sdk import Resources
resources = Resources()
resources.devices.getDeviceData("myDeviceId");
info¶
Get Info of the Device
Parameters:
deviceID: GenericID: strDevice ID
listDevice¶
Retrieves a list with all devices from the account
Parameters:
Optional queryObj: DeviceQuerySearch query params
Default queryObj:¶
queryObj: {
"page": 1,
"fields": ["id", "name"],
"filter": {},
"amount": 20,
"orderBy": ["name", "asc"],
"resolveBucketName": False
}
paramSet¶
Create or edit param for the Device
Parameters:
deviceID: GenericID: strDevice IDconfigObj: ConfigurationParams or list[ConfigurationParams]Configuration DataparamID: Optional[GenericID: str]Parameter ID
paramList¶
List Params for the Device
Parameters:
deviceID: GenericID: strDevice IDOptional sentStatus: boolTrue return only sent=true, False return only sent=false
paramRemove¶
Remove param for the Device
Parameters:
deviceID: GenericID: strDevice IDparamID: GenericID: strParameter ID
tokenCreate¶
Generates and retrieves a new token
Parameters:
deviceID: GenericID: strDevice IDtokenParams: TokenDataParams for new token
tokenDelete¶
Delete a token
Parameters:
token: GenericToken: strDevice ID
tokenList¶
Retrieves a list of all tokens
Parameters:
token: GenericToken: strDevice IDOptional queryObj: ListDeviceTokenQuerySearch query params
Default queryObj:¶
queryObj: {
"page": 1,
"fields": ["name", "token", "permission"],
"filter": {},
"amount": 20,
"orderBy": ["created_at", "desc"],
}
sendDeviceData¶
Send data to a device.
Example:¶
from tagoio_sdk import Resources
resources = Resources()
resource.devices.sendDeviceData("myDeviceID", {
"variable": "temperature",
"unit": "F",
"value": 55,
"time": "2015-11-03 13:44:33",
"location": { "lat": 42.2974279, "lng": -85.628292 },
})
editDeviceData¶
Edit data in a device.
Example:¶
resources = Resource()
resource.devices.editDeviceData("myDeviceID", {
"id": "idOfTheRecord",
"value": "new value",
"unit": "new unit"
})
deleteDeviceData¶
Delete data from a device.
Parameters:
deviceID: GenericID: strDevice IDOptional queryParams: DataQueryQuery parameters to filter the results.
Example:¶
resources = Resource()
resource.devices.deleteDeviceData("myDeviceID", {
"ids": ["recordIdToDelete", "anotherRecordIdToDelete" ]
})
- Devices Type
- bucket
- DeviceInfo
- DeviceInfoList
- DeviceQuery
- DeviceListItem
- ConfigurationParams
- DeviceCreateResponse
- DeviceCreateInfoBasic
- DeviceCreateInfoBasicMutable
- DeviceCreateInfoBasicImutable
- DeviceCreateInfoMutable
- DeviceCreateInfoImmutable
- DeviceCreateInfo
- DeviceEditInfo
- TokenData
- DeviceTokenDataList
- ListDeviceTokenQuery