There are some examples of events and notifications in the README:
We’ve played around with various options and figured that the best and the most logical way would be to fire custom events directly from HA which can be used to do stuff withing the TileBoard. For instance, if you are using Fully Kiosk Browser and want to make it say something (TTS) you do the following to things:
- Define event withing TileBoard:
{
command: 'tts',
action: function(eventData) {
if (typeof fully !== undefined) {
fully.textToSpeech(eventData.text);
}
}
- Fire an event from HA:
- event: tileboard
event_data:
command: tts
text: "Attention! Rear gate is now opening"
For the door entry (which in fact is simply a fullscreen camera popup with a set of tiles you define, I have a Open gate, Toggle outdoor light and Toggle intercom tiles) you do the following:
- Define a tile in config as a variable:
var DOORENTRY_TILE = {
position: [0, 2],
type: TYPES.DOOR_ENTRY,
id: {},
icon: 'mdi-phone',
title: 'Door entry',
state: false,
layout: {
type: TYPES.CAMERA_THUMBNAIL,
id: 'camera.front_gate',
refresh: 1500,
bgSize: 'cover'
},
page: {},
tiles: [
// Define your tiles (door-entry buttons) here if required
]
}
};
- Define an event using that variable:
{
command: 'open_doorentry',
action: function(eventData) {
this.$scope.openDoorEntry(DOORENTRY_TILE, DOORENTRY_TILE.id);
}
},
3.Fire in the hall! Fire the HA event:
- event: tileboard
event_data:
command: open_doorentry
You can also optionally define doorEntryTimeout: 30
in config to automatically close the popup after 30 secs.