0.1.0 • Published 5 years ago

drayton-wiser-client v0.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 years ago

drayton-wiser-client

Travis npm (scoped) node support

This is heavily based on the wiserheatingapi Python package and the work by Julian Knight.

Running the example app

  1. Obtain the secret key for your system:
    1. Press the setup button on your HeatHub.
    2. Connect your phone or PC to the temporary setup Wi-Fi hotspot called WiserHeatXXX.
    3. Fetch the secret using a REST client (or just open in a browser) from: http://192.168.8.1/secret/
    4. Press the setup button on your HeatHub to exit setup mode.
  2. Find the IP address of your HeatHub - it should appear on Bonjour/Zeroconf as WiserHeatXXX supporting _http.tcp.
  3. List the status of your rooms using the demo app:
     npm run demo -- -s $SECRET_KEY -a $IP_ADDRESS list

Using the client

To create a client pass in the secret and address of the HeatHub, then start calling operations:

import WiserClient from 'WiserClient';

const client = new WiserClient('secret', '192.168.1.10');
const statuses = await client.roomStatuses();

statuses.forEach((room) => {
  if (room.valid) {
    console.log(`${room.name}: ${room.temperature}ºc`);
  } else {
    console.log(`${room.name}: (invalid)`);
  }
});

Examples of each operation can be found in the example app.

Supported Operations

  • List room statuses: client.roomStatuses().
  • Single room status: client.roomStatus(roomId).
  • Manually set room target: client.overrideRoomSetPoint(roomId, setPoint).
  • Turn off a room: client.disableRoom(roomId).
  • Cancel room overrides: client.cancelRoomOverride(roomId).
0.1.0

5 years ago