app.publish(topic, payload, retained, qos); - Publish payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.payload - (String) Received raw payload string. You can modify/transform it before it'll be processed and displayed.
event.topic - (String) Topic, to which payload was received.
Example:
if (parseInt(event.payload) > 90) {
app.publish('messages/alert', 'HOT', false, 0);
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.getSecondsSinceLastActivity() - (Integer) Returns number of seconds, elapsed since last payload was received.
event.lastActivityString - (String) Text to display at the bottom of tile.
event.blink - (Boolean) Tile will blink if value of the property is true.
event.name - (String) Text to be shown at the top of tile.
event.getLastPayload() - (String) Returns last received raw payload.
event.text - (String) Main text to display.
event.textColor - (HEX String) Main text color. E.g. "#ffffcc".
Example:
if (parseInt(event.getLastPayload()) > 90) {
event.text = 'HOT';
event.textColor = '#ffcccc';
} else {
event.textColor = '#ffffff';
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.preventDefault - (Boolean) False by default. If True, default tap event behavoiur will be disabled.
Example:
event.preventDefault = true;
if (event.data) {
app.publish('messages/alert', event.data, false, 0);
}
app.publish(topic, payload, retained, qos); - Publish payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.payload - (String) Received raw payload string. You can modify/transform it before it'll be processed and displayed.
event.topic - (String) Topic, to which payload was received.
Example:
if (event.payload == '1') {
app.publish('messages/alert', 'ON', false, 0);
} else {
app.publish('messages/alert', 'OFF', false, 0);
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.getSecondsSinceLastActivity() - (Integer) Returns number of seconds, elapsed since last payload was received.
event.lastActivityString - (String) Text to display at the bottom of tile.
event.blink - (Boolean) Tile will blink if value of the property is true.
event.name - (String) Text to be shown at the top of tile.
event.getLastPayload() - (String) Returns last received raw payload.
event.on - (Boolean) You can set this property in order to change the switch status to ON or OFF.
event.iconColor - (HEX String) Icon color. E.g. "#ffffcc".
Example:
if (parseInt(event.getLastPayload()) == 1) {
event.iconColor = '#ffcccc';
} else {
event.iconColor = '#ffffff';
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.preventDefault - (Boolean) False by default. If True, default tap event behavoiur will be disabled.
Example:
event.preventDefault = true;
if (event.data) {
app.publish('messages/alert', event.data, false, 0);
}
app.publish(topic, payload, retained, qos); - Publish payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.payload - (String) Received raw payload string. You can modify/transform it before it'll be processed and displayed.
event.topic - (String) Topic, to which payload was received.
Example:
if (parseInt(event.payload) > 90) {
app.publish('messages/alert', 'TOO HOT', false, 0);
} else {
app.publish('messages/status', 'NORMAL', false, 0);
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.getSecondsSinceLastActivity() - (Integer) Returns number of seconds, elapsed since last payload was received.
event.lastActivityString - (String) Text to display at the bottom of tile.
event.blink - (Boolean) Tile will blink if value of the property is true.
event.name - (String) Text to be shown at the top of tile.
event.getLastPayload() - (String) Returns last received raw payload.
event.progressColor - (HEX String) Main text color. E.g. "#ffffcc".
Example:
if (parseInt(event.getLastPayload()) > 90) {
event.progressColor = '#ffcccc';
} else {
event.progressColor = '#ffffff';
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.preventDefault - (Boolean) False by default. If True, default tap event behavoiur will be disabled.
Example:
event.preventDefault = true;
if (event.data) {
app.publish('messages/status', event.data, false, 0);
}
app.publish(topic, payload, retained, qos); - Publish payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.payload - (String) Received raw payload string. You can modify/transform it before it'll be processed and displayed.
event.topic - (String) Topic, to which payload was received.
Example:
if (parseInt(event.payload) > 90) {
app.publish('messages/alert', 'HOT', false, 0);
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.getSecondsSinceLastActivity() - (Integer) Returns number of seconds, elapsed since last payload was received.
event.lastActivityString - (String) Text to display at the bottom of tile.
event.blink - (Boolean) Tile will blink if value of the property is true.
event.name - (String) Text to be shown at the top of tile.
event.getLastPayload() - (String) Returns last received raw payload.
event.text - (String) Main text to display.
event.textColor - (HEX String) Main text color. E.g. "#ffffcc".
Example:
if (parseInt(event.getLastPayload()) > 90) {
event.textColor = '#ffcccc';
} else {
event.textColor = '#ffffff';
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.preventDefault - (Boolean) False by default. If True, default tap event behavoiur will be disabled.
Example:
event.preventDefault = true;
if (event.data) {
app.publish('messages/alert', event.data, false, 0);
}
app.publish(topic, payload, retained, qos); - Publish payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.payload - (String) Received raw payload string. You can modify/transform it before it'll be processed and displayed.
event.topic - (String) Topic, to which payload was received.
Example:
if (parseInt(event.payload) == 'rain') {
event.payload = 'http://example.com/rainy.png';
} else if (parseInt(event.payload) == 'sun') {
event.payload = 'http://example.com/sunny.png';
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.getSecondsSinceLastActivity() - (Integer) Returns number of seconds, elapsed since last payload was received.
event.lastActivityString - (String) Text to display at the bottom of tile.
event.blink - (Boolean) Tile will blink if value of the property is true.
event.name - (String) Text to be shown at the top of tile.
event.getLastPayload() - (String) Returns last received raw payload.
event.url - (String) Image URL to download and display.
Example:
if (event.getLastPayload() == '') {
event.url = 'http://example.com/rainy.png';
} else {
event.url = 'http://example.com/sunny.png';
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.preventDefault - (Boolean) False by default. If True, default tap event behavoiur will be disabled.
Example:
event.preventDefault = true;
if (event.data) {
app.publish('messages/alert', event.data, false, 0);
}
app.publish(topic, payload, retained, qos); - Publish payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.payload - (String) Received raw payload string. You can modify/transform it before it'll be processed and displayed.
event.topic - (String) Topic, to which payload was received.
Example:
if (event.payload == 'red') {
event.payload = '#FF0000';
} else if (event.payload == 'green') {
event.payload = '#2AFF00';
} else if (event.payload == 'blue') {
event.payload = '#002BFF';
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.getSecondsSinceLastActivity() - (Integer) Returns number of seconds, elapsed since last payload was received.
event.lastActivityString - (String) Text to display at the bottom of tile.
event.blink - (Boolean) Tile will blink if value of the property is true.
event.name - (String) Text to be shown at the top of tile.
event.getLastPayload() - (String) Returns last received raw payload.
event.color - (HEX String) Icon color. E.g. "#ffffcc".
Example:
if (event.getLastPayload() == 'red') {
event.color = '#FF0000';
} else if (event.getLastPayload() == 'green') {
event.color = '#2AFF00';
} else if (event.getLastPayload() == 'blue') {
event.color = '#002BFF';
}
app.publish(topic, payload, retained, qos); - Publish to payload (String) to topic (String) with specified retained flag (Boolean) and qos (Integer).
app.openUri(uri); - Open specified uri (String) in an external app. uri examples: http://www.example.com/page.html, tel:123, content://contacts/people/
event.data - (Any type) Custom runtime data. You can get/set any data, which you need to be preserved between calls. The data shared between On Receive, On Display, On Tap. So you can set data in On Receive and use this data later in On Display. The data not preserved between app launches.
event.preventDefault - (Boolean) False by default. If True, default tap event behavoiur will be disabled.
Example:
event.preventDefault = true;
if (event.data) {
app.publish('messages/alert', event.data, false, 0);
}