Skip to content

appliance.applianceType.read() not working #4

@rudybrian

Description

@rudybrian

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions