Listing all Telldus Live devices in Node-RED
Continuing from the previous post about publishing data from Telldus Live to MQTT, here is small piece of related Node-RED code. It outputs a list of all (wirelessly controlled) 220V/mains switches I have linked to Telldus Live, using a Tellstick Net.
The background of the code was simply that I wanted a convenient way of getting a complete list of all devices (switches, dimmers, door bells, …) known to my Telldus Live account. When testing different devices, moving them around, renaming them etc, it is very easy to loose track of which device does what, and what their respective IDs are. This little function solves that quite nicely.
Using the device is easy:
- Make sure the node.js wrapper for the Telldus Live API is installed and accessible to Node-RED
- Configure the Telldus Live user credentials in the function node
- Attach some kind of input node as a trigger (an injector node works well)
The node will create one output message for each device in Telldus Live, as shown above. The same information is also written to the console log (easy to disable if it’s too spammy).
Code is found in the tellduslive-list-all-devices.js file over at GitHub.