Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 50 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,64 @@ A nodejs module to talk to Heatmiser WiFi and Neo thermostats
See more examples in the `examples` dir

# Heatmiser Neo

var heatmiser = require('heatmiser');
var neo = new heatmiser.Neo("192.168.1.100");

neo.on('success', function(data) {
console.log(data);
});
neo.on('error', function(data) {
console.log(data);
});

neo.info();
neo.statistics();
neo.setAway(true, ["living","kitchen"]);

```js
const heatmiser = require('heatmiser');
const neo = new heatmiser.Neo("192.168.1.100");

neo.on('success', function(data) {
console.log(data);
});
neo.on('error', function(data) {
console.log(data);
});

neo.info();
neo.statistics();
neo.setAway(true, ["living","kitchen"]);
```

# Heatmiser WiFi

## Reading the thermostat status
```js
const heatmiser = require('heatmiser');
const hm = new heatmiser.Wifi('localhost', 1234);

var heatmiser = require('heatmiser');
var hm = new heatmiser.Wifi('localhost', 1234);

hm.on('success', function(data) {
console.log(data);
});
hm.on('error', function(data) {
console.log(data);
});
hm.on('success', function(data) {
console.log(data);
});
hm.on('error', function(data) {
console.log(data);
});

hm.read_device();
hm.read_device();
```

## Writing to the thermostat

var dcb;

// set frost mode
dcb = {
runmode: 'frost'
}
hm.write_device(dcb);

// set current date and time
dcb = {
time: new Date()
}
hm.write_device(dcb);

// set the thermostat hold
dcb = {
heating: {
target: 20, // C
hold: 30 // minutes
}
}
hm.write_device(dcb);

```js
const dcb;

// set frost mode
dcb = {
runmode: 'frost'
}
hm.write_device(dcb);

// set current date and time
dcb = {
time: new Date()
}
hm.write_device(dcb);

// set the thermostat hold
dcb = {
heating: {
target: 20, // C
hold: 30 // minutes
}
}
hm.write_device(dcb);
```
# Credits

* Ben Pirt for the Heatmiser WiFi reading functions in Node https://github.com/bjpirt/heatmiser-js
Expand Down