GEMakers / gea-sdk

The GE Appliances Software Development Kit
GNU General Public License v2.0
51 stars 10 forks source link

appliance.applianceType.read() not working #4

Open rudybrian opened 9 years ago

rudybrian commented 9 years ago

Hi folks,

I tried out examples/display-info.js with my laundry pair and couldn't get it to output anything. After doing some digging, it appears that the culprit is appliance.applianceType.read() as all the other read() functions appear to be working.

Here is my sample re-written version of examples/display-info.js without the nested functions:

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("."));
    });
});

Output from my washing machine:

address: 37
version: 0.1.1.46.1.91.1.1.3
model: GFWR4805F0MC
serial: ZxxxxxxxG

Note the conspicuously missing type. The way examples/display-info.js is written, not getting a result from appliance.applianceType.read() causes it to not descend into the inner functions resulting in no output.

Hixie commented 8 years ago

For what it's worth, with my GE GDF570SGFWW dishwasher, I only get address and version. Model, serial, and type all just don't return anything. In fact none of the fields listed here: https://github.com/GEMakers/gea-sdk#table-of-contents ...(from modelNumber to soundLevel) do anything on this dishwasher.

johnnysako commented 8 years ago

Many of the appliances supported the ability to communicate before we had fully designed more of the cross-appliance data (i.e. appliance type).

Items missing (modelNumber, soundLevel, etc) have been added over time as the software has been updated for other reasons (new models/features).

rudybrian commented 7 years ago

@johnnysako is there a published list somewhere with this info? Not knowing which appliance models/software versions do/do not support certain items makes it a bit difficult to author software intended to provide universal support.

rbultman commented 7 years ago

@rudybrian this list is the latest official list, but it is a bit dated.