-
Notifications
You must be signed in to change notification settings - Fork 2
Data Object Formats
simen edited this page May 3, 2017
·
9 revisions
Data Object Formats
Property | Type | Description |
---|---|---|
enabled | Boolean | Tells if this device is enabled. |
joinTime | Number | Device joined time, which is an UNIX(POSIX) time in ms. |
timestamp | Number | Timestamp at the last activity. |
traffic | Object | The traffic record of this device. |
role | String | Device role, which depends on protocol. For example, it may be 'peripheral' of a BLE device. |
parent | String | The parent of this device. It is '0' if the parent is the netcore, otherwise parent's permanent address. |
maySleep | Boolean | Tells whether this device may sleep or not. |
sleepPeriod | Number | The sleep period in seconds. This property is only valid when maySleep is true . |
status | String | Can be 'unknown' , 'online' , 'offline' , or 'sleep' . |
address | Object | The permanent and dynamic addresses of this device. This object is in the shape of { permanent, dynamic } . |
Others | Depends | Other net |
Property | Type | Description |
---|---|---|
manufacturer | String | Manufacturer name |
model | String | Model name |
serial | String | Serial number of this device. |
version | Object | Version tags. This object is in the shape of { hw: '', sw: 'v1.2.2', fw: 'v0.0.8' }
|
power | Object | Power source. This object is in the shape of { type: 'battery', voltage: '5 V' } . The type can be 'line', 'battery' or 'harvester'. |
Others | Depends | Other attrs |
Property | Type | Description |
---|---|---|
name | String | Human-readable name of this device, default will be an empty string '' if not set. |
description | String | Device description. Default will be an empty string '' if not set. |
location | String | Location of this device. Default will be an empty string '' if not set. |
Others | Depends | Other props |
Property | Type | Description |
---|---|---|
enabled | Boolean | Indicate whether this gadget is enabled |
profile | String | Profile of this gadget, can be any string, such as 'Home' |
classId | String | Gadget class to tell what kind of an application is on this gadget |
Property | Type | Description |
---|---|---|
Others | Depends | Remote attributes depend on classId of gadget. For a temperature sensor, it will have an attribute sensorValue , and may have attributes like units and resetMinMaxMeaValues . The possible attributes are listed here. |
Property | Type | Description |
---|---|---|
name | String | Human-readable name of this gadget, default will be a string of 'unknown' if not set |
description | String | Gadget description. Default will be an empty string '' if not set |
Others | Depends | Other props |
freebird team
Overview
Main Classes
Design Your Own Netcore
- Workflow
- APIs for Implementer
- Unified data model
- What should be implemented
Appendix
- Device data object format
- Gadget data object format