- Device API
- Cloud API
- Application API
- Set up and Account Management
- User notification
- Device types
- Device Activation
- Consumer Mapping
- Post device to consumer mapping
- Update consumers
- Delete consumer
- Set device attributes
- Set device property
- Get device properties
- Delete device property
- Set consumer property
- Get consumer properties
- Delete consumer property
- Create/edit consumer make
- Delete consumer make
- Create/edit consumer model
- Delete consumer model
- Monitoring
- Get devices Info
- Get location current total energy usage
- Get location current power consumption
- Get projection for location
- Get aggregated location energy usage
- Get device current total energy usage
- Get aggregated device level energy usage
- Device instantaneous readings history
- Last N history records
- Get current device parameters
- Get real time device readings
- Control
- Rules
- Analytic Rules
- Compare
- Quiz
- Market
- Analytics and Admin API
- Downloads
- Account
You are here
Device API
Device API - Add Devices
If you have a proxy or gateway communicating with the server on behalf of your devices, you will need to add each new device to the server using the <add ...> command. Otherwise, you can skip this section.
You must add sub-devices after activating your proxy, because the server will ignore the proxy until it is activated to the user's account.
The URL to POST to is http://developer.peoplepowerco.com/deviceio/ml.
In the example POST below, a gateway with ID 123456FFFEABCDEF declares to the Internet of Things Platform that a new device B0C8AD6806123456 has been added to the system.
<?xml version="1.0" encoding="UTF-8"?>
<h2s seq="1" hubId="123456FFFEABCDEF" ver="2">
<add deviceId="B0C8AD6806123456" deviceType="11" />
</h2s>
The gateway does not need to add itself because it has already been activated. Anytime an <add ... /> message is passed to the cloud server, the cloud will verify we can receive measurements for this device, and then send back an ACK.
Duplicate <add ... /> messages are acceptable, and are expected to happen when a hub or gateway reboots and rediscovers all devices in the network.
If the Internet of Things Platform receives a measurement from a device that has not been added, it will respond to measurements with an 'unknown' tag:
<?xml version="1.0" encoding="UTF-8"?>
<s2h seq="6" status="ACK" ver="2">
<unknown>B0C8AD6806123456</unknown>
</s2h>