GEMakers / gea-plugin-dishwasher

Dishwasher plugin for the GEA SDK
GNU General Public License v2.0
13 stars 6 forks source link

dishwasher gets registered multiple times with differently-acting objects #6

Open Hixie opened 8 years ago

Hixie commented 8 years ago
require('events').EventEmitter.prototype._maxListeners = 0;
const greenBean = require("green-bean");
greenBean.connect("dishwasher", function(dw) {
   console.log('hello ' + dw);
});

...leads to the following output:

hello [object Object]
hello [object Object]

If I compare the two values, they are not the same. The second one gives different values, too. For example, the first object, if I read cycleCounts, gives me positive non-zero values for startedCount and completedCount (72 and 60), and resetCount is 17. The second one returns 0, 0, and 28. If, on startup, I subscribe to every field, then the first one tells me about cycleStatus, operatingMode, disabledFeatures, reminders, rates, doorCount, userConfiguration, error, and cycleCounts, but the second tells me about only cycleStatus, operatingMode, disabledFeatures, reminders, rates, and doorCount, nothing else.

I only have one dishwasher plugged in (a GE GDF570SGFWW).

johnnysako commented 8 years ago

@Hixie your model Dishwasher does have 2 control boards. I suspect both are connecting. One is a machine control only and will likely return odd data for some values. As I mentioned in https://github.com/GEMakers/gea-plugin-dishwasher/issues/4, the Operating Mode can be used to determine which object is the Machine Control and which is the User Interface (generally speaking you want the UI).

Hixie commented 8 years ago

Interesting. What does the machine control board expose?

johnnysako commented 8 years ago

Any information that it exposes is mirrored on the UI already (I haven't directly verified that though).

Hixie commented 8 years ago

I've been ignoring the one that reports "11" for a while now, but in #4 I commented that apparently the "11" board has a different idea of the reset count in cycleCounts. Other than that, I don't see anything in the "11" board that's interesting. I'll continue ignoring it!