0.2.3 • Published 9 years ago
node-rwe-smarterhome-lib v0.2.3
RWE-SmarterHome Lib
RWE-SmarterHome is a Node.JS library for the RWE-SmartHome which directly communicates with the SmartHome central.
var sh = require("./lib/smarthome");
var smartHome = new sh("192.168.1.17");
var DO_EXIT = false;
smartHome.login("USERNAME", "PASSWORD", function (res, error) {
if (res) {
console.log("LOGIN COMPLETE");
smartHome.init(function () {
console.log("INIT COMPLETE");
var devices = smartHome.devices;
devices.forEach(function (device) {
console.log(device.Name + " (" + device.Id + ", " + device.Type + "): " + device.getFriendlyState());
});
var p = smartHome.getDeviceByName("Test");
if (p)
p.setState(true);
});
smartHome.on("StatusChanged", function (device) {
console.log("DEVICE STATUS CHANGED", device.Name, device.getFriendlyState());
});
} else {
console.log("LOGIN ERROR", error);
}
});
(function wait() {
if (!DO_EXIT) setTimeout(wait, 1000);
})();
0.2.3
9 years ago
0.2.2
9 years ago
0.2.1
9 years ago
0.2.0
9 years ago
0.1.2
9 years ago
0.1.1
9 years ago
0.1.0
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
10 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.7
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago
1.0.0
10 years ago