This repository was archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
WiFi Thermostat - Setting Temp #3
Copy link
Copy link
Open
Description
Hi
Firstly thanks for the work you have put into this.
I can use the module to call data from the WiFi Thermostat okay, however when I try and set a temp i get the following error:
/usr/local/lib/node_modules/heatmiser/lib/wifi.js:173
this.emit( 'error', e );
^
TypeError: Cannot read property 'emit' of undefined
at /usr/local/lib/node_modules/heatmiser/lib/wifi.js:173:21
at Wifi.<anonymous> (/usr/local/lib/node_modules/heatmiser/lib/wifi.js:132:13)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:523:20)
and my test file is:
var heatmiser = require('/usr/local/lib/node_modules/heatmiser/');
var hm = new heatmiser.Wifi('172.**.**.100', ****);
var dcb;
hm.on('success', function(data) {
console.log(data);
});
hm.on('error', function(data) {
console.log(data);
});
hm.read_device(); //this runs okay
dcb = {
heating: {
target: 20, // C
hold: 30 // minutes
}
}
hm.write_device(dcb);
Many Thanks
Metadata
Metadata
Assignees
Labels
No labels