Last active
August 29, 2015 14:07
-
-
Save rudybrian/c1e2e1e087d0dcf551e0 to your computer and use it in GitHub Desktop.
Display appliance info for washing machine and dryer
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
var gea = require("gea-sdk"); | |
var adapter = require("gea-adapter-usb"); | |
var app = gea.configure({ | |
//address: 0xcb | |
address: 0xe5 | |
}); | |
app.bind(adapter, function (bus) { | |
bus.once("appliance", function (appliance) { | |
appliance.applianceType.read(function (applianceType) { | |
console.log("type:", applianceType); | |
}); | |
appliance.modelNumber.read(function (modelNumber) { | |
console.log("model:", modelNumber.trim()); | |
}); | |
appliance.serialNumber.read(function (serialNumber) { | |
console.log("serial:", serialNumber.trim()); | |
}); | |
console.log("address:", appliance.address); | |
console.log("version:", appliance.version.join(".")); | |
}); | |
}); |
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
var gea = require("gea-sdk"); | |
var adapter = require("gea-adapter-usb"); | |
var app = gea.configure({ | |
//address: 0xcb | |
address: 0xe4 | |
}); | |
app.bind(adapter, function (bus) { | |
bus.once("appliance", function (appliance) { | |
appliance.applianceType.read(function (applianceType) { | |
console.log("type:", applianceType); | |
}); | |
appliance.modelNumber.read(function (modelNumber) { | |
console.log("model:", modelNumber.trim()); | |
}); | |
appliance.serialNumber.read(function (serialNumber) { | |
console.log("serial:", serialNumber.trim()); | |
}); | |
console.log("address:", appliance.address); | |
console.log("version:", appliance.version.join(".")); | |
}); | |
}); |
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
Output from display-info-washer.js (started first) | |
address: 37 | |
version: 0.1.1.46.1.91.1.1.3 | |
address: 36 | |
version: 1.1.1.43.1.32.1.3.3.1 | |
model: GFWR4805F0MC | |
model: GFDR485GF0MC | |
serial: ZxxxxxxxG | |
serial: SxxxxxxxG | |
Output from display-info-dryer.js (started second) | |
cannot open device with path USB_04d8_fcf0_14500000 | |
cannot open device with path USB_04d8_fcf0_14100000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment