thingsx
- Description:
Things namespace
This namespace provides access to external devices and services, which is usually functionality provided by bindings.
- Source:
Classes
Methods
(static) createReEnableThingWithItemRule(itemName, thingUID)
- Description:
Creates a rule that re-enables a Thing on command ON to a given Item.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
itemName |
string | |
thingUID |
string |
(static) createThingStatusNotificationRule(thingUID, recipientsopt, offlineDurationopt, onlineDurationopt, offlineMessageopt, onlineMessageopt)
- Description:
Creates a rule that sends a notification if a Thing goes offline and another one if it goes back online.
- Source:
Parameters:
(static) createThingStatusToItemRule(groupName, patterns, replacements)
- Description:
Creates a rule that posts Thing statuses to String Items. The rule takes the name of a group of String Items, generates a Thing UID for each member Item using string replace operations, and then posts the Thing status on every Thing status change to the Items. The rule also runs when start level 100 is reached and regularly (every 5 minutes, starting with minute 0).
- Source:
Example
thingsx.createThingStatusRule('gYamahaState', ['_state', '_'], ['', ':']);
// This removes "_state" from the Item name and replaces all "_" with ":" to get the Thing UID from the members of the "gYamahaState" group members.
Parameters:
Name | Type | Description |
---|---|---|
groupName |
string | |
patterns |
string | Array:.<string:> | Pattern(s) to replace. |
replacements |
string | Array:.<string:> | String(s) that is/are used for replacing. |
(static) reEnableThing(thingUID)
- Description:
Re-enables a Thing by disabling, and then enabling it again.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
thingUID |
string |