forked from carlossg/heatmiser-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update license to MIT, same as Ben Pirt original work
- Loading branch information
Carlos Sanchez
committed
Apr 28, 2014
1 parent
70a21df
commit ee47c4e
Showing
10 changed files
with
811 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
var heatmiser = require("../lib/heatmiser"); | ||
|
||
var neo = new heatmiser.Neo("192.168.1.112"); | ||
|
||
neo.on('success', function(data) { | ||
console.log(data); | ||
}); | ||
neo.on('error', function(data) { | ||
console.log(data); | ||
}); | ||
|
||
neo.info(); | ||
neo.statistics(); | ||
|
||
var devices = ['bathroom', 'livingroom']; | ||
|
||
neo.setAway(false, devices); | ||
neo.setStandby(false, devices); | ||
|
||
var comfortLevels = { | ||
"bathroom": { | ||
"monday": { | ||
"wake": ["07:00", 20], | ||
"leave": ["09:00", 16], | ||
"return": ["24:00", 21], | ||
"sleep": ["24:00", 16] | ||
}, | ||
"sunday": { | ||
"wake": ["09:00", 20], | ||
"leave": ["11:00", 16], | ||
"return": ["24:00", 21], | ||
"sleep": ["24:00", 16] | ||
} | ||
}, | ||
"livingroom": { | ||
"monday": { | ||
"wake": ["07:00", 19], | ||
"leave": ["08:30", 16], | ||
"return": ["16:30", 19], | ||
"sleep": ["23:00", 16] | ||
}, | ||
"sunday": { | ||
"wake": ["09:00", 19], | ||
"leave": ["10:00", 16], | ||
"return": ["20:00", 19], | ||
"sleep": ["23:00", 16] | ||
} | ||
} | ||
} | ||
|
||
var keys = Object.keys(comfortLevels); | ||
for (var i=0; i<keys.length; i++) { | ||
var name = keys[i]; | ||
neo.setComfortLevels(comfortLevels[name], [name]); | ||
} | ||
|
||
|
||
var wait = function() { | ||
console.log("waiting"); | ||
} | ||
setTimeout(wait, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
var heatmiser = require("../lib/heatmiser"); | ||
|
||
var hm = new heatmiser.Wifi("192.168.1.100", 1234); | ||
|
||
hm.on('success', function(data) { | ||
console.log(data); | ||
}); | ||
hm.on('error', function(data) { | ||
console.log(data); | ||
}); | ||
|
||
hm.read_device(); | ||
|
||
var dcb; | ||
|
||
// set temperature | ||
|
||
// target before hold! | ||
var dcb1 = { | ||
heating: { | ||
target: 20 | ||
} | ||
} | ||
var dcb2 = { | ||
heating: { | ||
hold: 5 | ||
} | ||
} | ||
|
||
hm.write_device(dcb1); | ||
hm.write_device(dcb2); | ||
|
||
// // set frost mode | ||
dcb = { | ||
runmode: 'frost' | ||
} | ||
hm.write_device(dcb); | ||
|
||
// // set current date and time | ||
dcb = { | ||
time: new Date() | ||
} | ||
hm.write_device(dcb); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{ | ||
"devices": [ | ||
{ | ||
"AWAY": false, | ||
"COOLING": false, | ||
"COOLING_ENABLED": false, | ||
"COOLING_TEMPERATURE_IN_WHOLE_DEGREES": 0, | ||
"COUNT_DOWN_TIME": "0:00", | ||
"CRADLE_PAIRED_TO_REMOTE_SENSOR": false, | ||
"CRADLE_PAIRED_TO_STAT": false, | ||
"CURRENT_FLOOR_TEMPERATURE": 22, | ||
"CURRENT_SET_TEMPERATURE": "7.0", | ||
"CURRENT_TEMPERATURE": "17.9", | ||
"DEVICE_TYPE": 1, | ||
"ENABLE_BOILER": false, | ||
"ENABLE_COOLING": false, | ||
"ENABLE_PUMP": false, | ||
"ENABLE_VALVE": false, | ||
"ENABLE_ZONE": false, | ||
"FAIL_SAFE_ENABLED": false, | ||
"FLOOR_LIMIT": false, | ||
"FULL/PARTIAL_LOCK_AVAILABLE": false, | ||
"HEAT/COOL_MODE": false, | ||
"HEATING": false, | ||
"HOLD_TEMPERATURE": 21, | ||
"HOLD_TIME": "0:00", | ||
"HOLIDAY": false, | ||
"HOLIDAY_DAYS": 0, | ||
"HUMIDITY": 0, | ||
"LOCK": false, | ||
"LOCK_PIN_NUMBER": "0000", | ||
"LOW_BATTERY": false, | ||
"MAX_TEMPERATURE": "21.0", | ||
"MIN_TEMPERATURE": "18.0", | ||
"MODULATION_LEVEL": 0, | ||
"NEXT_ON_TIME": "255 days 255:255", | ||
"OFFLINE": false, | ||
"OUTPUT_DELAY": 0, | ||
"PREHEAT": false, | ||
"PREHEAT_TIME": "255:255", | ||
"PROGRAM_MODE": "5DAY/2DAY", | ||
"RADIATORS_OR_UNDERFLOOR": false, | ||
"SENSOR_SELECTION": "BUILT_IN_AND_FLOOR", | ||
"SET_COUNTDOWN_TIME": 0, | ||
"STANDBY": true, | ||
"STAT_MODE": { | ||
"THERMOSTAT": true | ||
}, | ||
"TEMPERATURE_FORMAT": false, | ||
"TEMP_HOLD": false, | ||
"TIMECLOCK_MODE": false, | ||
"TIMER": false, | ||
"TIME_CLOCK_OVERIDE_BIT": false, | ||
"VERSION_NUMBER": 69, | ||
"WRITE_COUNT": 11, | ||
"ZONE_1PAIRED_TO_MULTILINK": true, | ||
"ZONE_1_OR_2": false, | ||
"ZONE_2_PAIRED_TO_MULTILINK": false, | ||
"device": "livingroom" | ||
}, | ||
{ | ||
"AWAY": false, | ||
"COOLING": false, | ||
"COOLING_ENABLED": false, | ||
"COOLING_TEMPERATURE_IN_WHOLE_DEGREES": 0, | ||
"COUNT_DOWN_TIME": "0:00", | ||
"CRADLE_PAIRED_TO_REMOTE_SENSOR": false, | ||
"CRADLE_PAIRED_TO_STAT": false, | ||
"CURRENT_FLOOR_TEMPERATURE": 255, | ||
"CURRENT_SET_TEMPERATURE": "7.0", | ||
"CURRENT_TEMPERATURE": "18.0", | ||
"DEVICE_TYPE": 1, | ||
"ENABLE_BOILER": false, | ||
"ENABLE_COOLING": false, | ||
"ENABLE_PUMP": false, | ||
"ENABLE_VALVE": false, | ||
"ENABLE_ZONE": false, | ||
"FAIL_SAFE_ENABLED": false, | ||
"FLOOR_LIMIT": false, | ||
"FULL/PARTIAL_LOCK_AVAILABLE": false, | ||
"HEAT/COOL_MODE": false, | ||
"HEATING": false, | ||
"HOLD_TEMPERATURE": 21, | ||
"HOLD_TIME": "0:00", | ||
"HOLIDAY": false, | ||
"HOLIDAY_DAYS": 0, | ||
"HUMIDITY": 0, | ||
"LOCK": false, | ||
"LOCK_PIN_NUMBER": "0000", | ||
"LOW_BATTERY": false, | ||
"MAX_TEMPERATURE": "20.0", | ||
"MIN_TEMPERATURE": "18.0", | ||
"MODULATION_LEVEL": 0, | ||
"NEXT_ON_TIME": "255 days 255:255", | ||
"OFFLINE": false, | ||
"OUTPUT_DELAY": 0, | ||
"PREHEAT": false, | ||
"PREHEAT_TIME": "255:255", | ||
"PROGRAM_MODE": "5DAY/2DAY", | ||
"RADIATORS_OR_UNDERFLOOR": false, | ||
"SENSOR_SELECTION": "BUILT_IN_AIR_SENSOR", | ||
"SET_COUNTDOWN_TIME": 0, | ||
"STANDBY": true, | ||
"STAT_MODE": { | ||
"THERMOSTAT": true | ||
}, | ||
"TEMPERATURE_FORMAT": false, | ||
"TEMP_HOLD": false, | ||
"TIMECLOCK_MODE": false, | ||
"TIMER": false, | ||
"TIME_CLOCK_OVERIDE_BIT": false, | ||
"VERSION_NUMBER": 69, | ||
"WRITE_COUNT": 4, | ||
"ZONE_1PAIRED_TO_MULTILINK": true, | ||
"ZONE_1_OR_2": false, | ||
"ZONE_2_PAIRED_TO_MULTILINK": false, | ||
"device": "bathroom" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"houserecords": { | ||
"highestmonthtemp": "280.5", | ||
"highestweektemp": "280.5", | ||
"highestyeartemp": "280.5", | ||
"lowestmonthtemp": "10.0", | ||
"lowestweektemp": "10.0", | ||
"lowestyeartemp": "10.0" | ||
}, | ||
"preheatrecords": { | ||
"monthrun": "bathroom", | ||
"weekrun": "bathroom", | ||
"yearrun": "bathroom" | ||
}, | ||
"preheatstarts": {}, | ||
"roomrecords": { | ||
"bathroom": { | ||
"highestmonthtemp": "280.5", | ||
"highestweektemp": "280.5", | ||
"highestyeartemp": "280.5", | ||
"lowestmonthtemp": "17.9", | ||
"lowestweektemp": "17.9", | ||
"lowestyeartemp": "17.9" | ||
}, | ||
"livingroom": { | ||
"highestmonthtemp": "280.5", | ||
"highestweektemp": "280.5", | ||
"highestyeartemp": "280.5", | ||
"lowestmonthtemp": "16.9", | ||
"lowestweektemp": "16.9", | ||
"lowestyeartemp": "16.9" | ||
} | ||
}, | ||
"runrecords": { | ||
"monthrun": "livingroom", | ||
"weekrun": "livingroom", | ||
"yearrun": "livingroom" | ||
} | ||
} |
Oops, something went wrong.