DevicePilot is a universal cloud-based software service allowing you to easily locate, monitor and manage your connected devices at scale, with proactive management of the entire device lifecycle.
This library helps you quickly get started posting your device telemetry so you can begin exploring your IoT data in DevicePilot.
- Sign up for a DevicePilot account if you haven't already!
- Get your API key
- Add the DevicePilot library to your python project:
pip install devicepilot
- Start posting your device telemetry:
import devicepilot
# api key should be explicitly provided, or stored in the environmental variable DP_API_KEY
apikey = "your-devicepilot-api-key"
record = {
"$id": "unique-device-id", # this is used to identify your device
# any valid json body will be converted into key:value telemetry:
"ledColour": 'blue',
"switchedOn": True,
"temperature": 20,
}
# an array of record objects can also be provided
devicepilot.post(record, apikey)
For more information about using DevicePilot, check out: https://help.devicepilot.com/