npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-tado-client

v0.11.0

Published

Tado web API client node for Node Red

Downloads

254

Readme

Tado Web API Node with shared config

A Node-RED node with the shared configuration that lets you connect to the Tado Web API.

Please note: The library used by this node is derived from reverse engineering the Tado Web API and hence may be unstable.

[!IMPORTANT] From v0.9.0 onward this node requires at least nodejs v12 due to using async functions.

Installation

Node-RED Palette (Preferred)

You can install the node from the built-in Node-RED palette. It is available on the menu in the top-right corner of Node-RED, under the "Manage Palette" option; search for tado.

Using NPM

Run the following command in the root directory of your Node-RED install or home directory (usually ~/.node-red) and will also install needed libraries.

npm install node-red-contrib-tado-client

Getting Started

Install the Example Flow

There is an example flow available in the repo. I'd recommend giving it a go to trial the functionality available. Link to example

Link to Node-RED documenation on import/export

The example can be installed from the Node-RED menu in the top-right, then choose "Import", and paste the JSON from the example into the box. It is a good idea to change the target to "New Flow" so you don't override any of your existing nodes. Once imported make sure to deploy the changes.

Configure the Node

Open the Tado configuration node by selecting the Node-RED menu and choosing "Configuration Nodes" then double clicking the "Tado Config" node in the righthand sidebar. This will open the configuration window, here you can enter your Tado username and password, click update to save. You can then press deploy to update your Node-RED.

Find your home_id

In order to use most API calls you'll need to know your Tado home_id. This can be found using the first example (getMe) from the example flow. Make sure you've done the previous step and click the inject button to the left of the getMe node. You should see your home_id in the debug message pane on the righthand side. You can now edit other Tado nodes to include this home_id value.

Going further

You can create multiple Tado nodes, each of which interacts with a single end-point on the Tado API. Many are demoed in the example.

The node is triggered by each message on the input, regardless of content. This allows creating flows using other nodes to trigger the API. If the message on the input contains any of the following fields then they will ovewrite the properties on the node.

  • Account:

    • getMe (msg.homeId)
  • Home:

    • getAirComfort (msg.homeId)
    • getAirComfortDetailed (msg.homeId)
    • getHeatingCircuits (msg.homeId)
    • getHome (msg.homeId)
    • getInstallations (msg.homeId)
    • getState (msg.homeId)
    • getUsers (msg.homeId)
    • getWeather (msg.homeId)
  • Zone:

    • getZones (msg.homeId)
    • clearZoneOverlay (msg.homeId, msg.zoneId)
    • getAwayConfiguration (msg.homeId, msg.zoneId)
    • getTimeTable (msg.homeId, msg.zoneId, msg.timetableId)
    • getTimeTables (msg.homeId, msg.zoneId)
    • getZoneCapabilities (msg.homeId, msg.zoneId)
    • getZoneControl (msg.homeId, msg.zoneId)
    • getZoneDayReport (msg.homeId, msg.zoneId, msg.reportDate)
    • getZoneOverlay (msg.homeId, msg.zoneId)
    • getZoneState (msg.homeId, msg.zoneId)
    • getZoneStates (msg.homeId)
    • setOpenWindowMode (msg.homeId, msg.zoneId, msg.openWindowMode)
    • setZoneOverlay (msg.homeId, msg.zoneId, msg.power, msg.temperature, msg.terminationType, msg.fanSpeed, msg.acMode)
  • Device:

    • getDevices (msg.homeId)
    • getDeviceTemperatureOffset (msg.deviceId)
    • identifyDevice (msg.deviceId)
    • setChildlock (msg.deviceId, msg.childlock)
    • setDeviceTemperatureOffset (msg.deviceId, msg.temperatureOffset)
    • setWindowDetection (msg.homeId, msg.zoneId, msg.windowDetection, msg.windowDetectionTimeout)
  • Mobile Device:

    • getMobileDevices (msg.homeId)
    • getMobileDevice (msg.homeId, msg.deviceId)
    • getMobileDeviceSettings (msg.homeId, msg.deviceId)
    • setGeoTracking (msg.homeId, msg.deviceId, msg.geoTracking)
  • Presence:

    • isAnyoneAtHome (msg.homeId)
    • setPresence (msg.homeId)
    • updatePresence (msg.homeId)
  • Energy IQ:

    • getEnergyIQ (msg.homeId)
    • getEnergyIQTariff (msg.homeId)
    • addEnergyIQTariff (msg.homeId, msg.unit, msg.startDate, msg.endDate, msg.tariffInCents)
    • updateEnergyIQTariff (msg.homeId, msg.tariffId, msg.unit, msg.startDate, msg.endDate, msg.tariffInCents)
    • getEnergyIQMeterReadings (msg.homeId)
    • addEnergyIQMeterReading (msg.homeId, msg.readingDate, msg.reading)
    • deleteEnergyIQMeterReading (msg.homeId)

[!NOTE] For AC users - Tado changed from FanSpeed to FanLevel. If you zone shows FanLevel then please use Level1, Level2, etc. as the FanSpeed parameter, otherwise use High, Medium, Low.

The response from the Tado API is represented in msg.payload and the generating API call is msg.topic.

Advanced Usage

It is now possible to make API calls that aren't in the list above but that have been implemented in the underlying library.

This can be done by injecting a msg.apiCall with the function name and a msg.payload with an array of arguments.

For instance to call the clearZoneOverlays API as defined here but not yet exposed in Node-RED, you could do the following.

  • Configure an Inject node with the following properties
    • msg.apiCall = clearZoneOverlays
    • msg.payload = [12345, [1, 2, 3]] - where 12345 is your home_id and [1, 2, 3] is a list of zones to clear

Other available apiCalls can be found by reading the library documenation but some noteworthy calls are:

  • clearZoneOverlays

  • setZoneOverlays

  • apiCall

    • This is the generic API call wrapper with authenticaion already handled you can call this method to test new API calls that even the underlying library doesn't yet support. If you find something useful then please open a PR or Issue with what you find. Thanks!

Examples of using this advanced functionality can be found in the examples here

Credits

This node is based on the work of SCPhillips