Global

Members

CommandState

Represents state of command.
  • CommandState.SENDING: commands is sedning.
  • CommandState.DELIVERED: commands is delivered.
  • CommandState.INCOMPLETE: commands is incompleted.
  • CommandState.DONE: commands is handled.

DataGroupingInterval

DataGroupingInterval will be used to create the bucket to store the state history when the thing is not using traits.
  • DataGroupingInterval.INTERVAL_1_MINUTE: data is grouped in 1 minute.
  • DataGroupingInterval.INTERVAL_15_MINUTES: data is grouped in 15 minutes.
  • DataGroupingInterval.INTERVAL_30_MINUTES: data is grouped in 30 minutes.
  • DataGroupingInterval.INTERVAL_1_HOUR: data is grouped in 1 hour.
  • DataGroupingInterval.INTERVAL_12_HOURS: data is grouped in 12 hours.

Errors

Represents types of error
  • Errors.ArgumentError: error caused by invalid arguments.
  • Errors.HttpError: error caused when doing http request to kii server.
  • Errors.IlllegalStateError: error caseud of illlegal states.
  • Errors.NetworkError: error caseud of network connection.

EventSource

Represent source to fire trigger.
  • EventSource.STATES: fire trigger based on states.
  • EventSource.SCHEDULE: fire trigger based on schedule.
  • EventSource.SCHEDULE_ONCE: fire trigger based on schedule only once.

LayoutPosition

Represent layout of thing
  • LayoutPosition.GATEWAY: when thing is gateway.
  • LayoutPosition.ENDNODE: when thing is endnode.
  • LayoutPosition.STANDALONE: when thing is not either gateway nor endnode.

Site

Represents KiiCloud server location.
  • Site.US: use cloud in US.
  • Site.JP: use cloud in Japan.
  • Site.CN3: use cloud in cn3 site of China.
  • Site.SG: use cloud in Singapore.
  • Site.EU: use cloud in EU.

TriggersWhat

Represents Action type of the trigger.
  • TriggersWhat.COMMAND: Execute a command when trigger is fired.
  • TriggersWhat.SERVER_CODE: Call a server code when trigger is fired.

TriggersWhen

Represents the type of condition to fire a trigger.
  • TriggersWhen.CONDITION_TRUE: Always fires when the Condition is evaluated as true.
  • TriggersWhen.CONDITION_FALSE_TO_TRUE: Fires when previous State is evaluated as false and current State is evaluated as true.
  • TriggersWhen.CONDITION_CHANGED: Fires when the previous State and current State is evaluated as different value. i.e. false to true, true to false.

Types

Represents Types
  • Types.Group: use group type.
  • Types.User: use user type.
  • Types.Thing: use thing type.

Methods

default_1(options, onCompletionopt) → {Promise}

Perform an asynchronous HTTP request.
Parameters:
Name Type Attributes Description
options Object
  • method:The HTTP method to use for the request (e.g. "POST", "GET", "PUT").
  • url:A string containing the URL to which the request is sent.
  • body:Data to be sent to the server.
  • headers:An object of http header key/value pairs to send along with requests.
onCompletion onCompletion <optional>
callback function when completed
Returns:
promise object
Type
Promise