Device Object Overview
On flowthings.io, IoT Devices are treated as first-class objects which can be monitored, managed and cataloged. Furthermore, they integrate seamlessly with the flowthings.io Agent, which handles bi-directional communication between a gateway device and flowthings.io.
Basic Device Management
A Device object should represent a single, real-world device which will communicate with flowthings.io. By making use of Device objects, you are can see what physical devices are connected to your application and their current state.
A Device Object has the following components:
- A Token, which assigns permissions to the real-world device
- A set of Flow objects, which facilitate communication to and from the device.
By pairing a Token to a Device, you can be sure that it only has access to certain parts of your application. Furthermore, the Token can be revoked at any time, thus disabling the device.
Flow objects are associated with a Device:
- Default Flow - for data sent from the device
- Command Flow - for Drops sent to the device
- Report Flow - reporting information originating from the device
The Device object also contains useful reporting attributes,
status. The responsibility for updating these attributes lies with the real-world device itself.
Using the flowthings.io Agent
The power of Device objects is seen when utilizing the flowthings.io Agent. When installed on a device, the Agent will do the following:
- Ensure only the correct Token is used
- Update the Device object with its current state
- Send Reporting information
- Handle communication between the device and flowthings.io, utilizing the Device Flow objects
More information about the flowthings.io Agent is available here.
Device Object Members
The location under which the Device Flows are created.
The Token object tied to this Device
How often the device should send a status report to flowthings.io (Only relevant to the flowthings.io Agent)