SkygearIoT
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public get |
console: Console A javascript console that outputs to the skygear server. |
|
public get |
Device-specific data |
Method Summary
Public Methods | ||
public |
async initDevice(platform: Object): Promise Binds SDK with provided platform, setup event handlers. |
|
public |
reportStatus(metadata: Object): * Reports device status to the skygear server. |
Public Constructors
public constructor() source
Public Members
Public Methods
public async initDevice(platform: Object): Promise source
Binds SDK with provided platform, setup event handlers. Register this device with the current user if not registered
Note: This function must be called AFTER logging into skygear and you MUST ensure that the current user is not already registered with another device.
Params:
Name | Type | Attribute | Description |
platform | Object | ||
platform.action | Object | Object containing platform specific actions, all actions are optional if they do not apply to your platform. |
|
platform.action.shutdown | function | ||
platform.action.restart | function | ||
platform.deviceSecret | string | A string that is unique to the hardware, could be SoC model + serial number. |
|
platform.appVersion | string | Version string of the user application. |