Listening events
Definition:
Ubidots Listening events on are custom events that allow users to programatically interact with Ubidots through the HTML Canvas widget. This way, Ubidots users can register callbacks for said events and execute logic upong their trigerring. They are designed specifically to get information from Ubidots.
Usage:
After declaring an instance of the Ubidots class as:
You can set a callback function on that instance for a particular event as:
Where:
Ubidots
: is the constructor of the Ubidots classubidots
: is an instance of the Ubidots classUbidotsEvent: is any of the following events available on Ubidots.
Listening events:
Event | Description | Result |
---|---|---|
| Default account token |
|
| Actual selected date range in the dynamic dashboard (timestamp in milliseconds). |
|
| This event is triggered every time the Real Time button in the Dashboard is clicked. |
|
| This event is activated when a user clicks the refresh button in the dashboard. |
|
| Returns a list containing the ids of the selected devices in a dynamic dashboard |
|
| Returns a list containing the device objects of the selected devices in a dynamic dashboard |
|
| [DEPRECATED]
Use Returns the id of the currently selected device in a dynamic dashboard. |
|
| [DEPRECATED]
Use Returns the device object of the currently selected device in a dynamic dashboard. |
|
| Return the whole object of a Dashboard as received when loading the dashboard |
|
| Returns an object with the information of all the other events. See example. |
|
Go to the Examples/Interacting with dashboard data section for examples on how to use this events.
Last updated