You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I read userConfiguration I get back [0, 128, 32] right now (no delay, no zone, no dry options, normal wash temp, rinse aid enabled, autosense cycle, leak detect enabled).
If I write [0, 128, 32] back to userConfiguration, I get back:
Uncaught RangeError: index out of range
FROM
checkOffset (buffer.js:625:5)
Buffer.readUInt16BE (buffer.js:679:5)
readUInt16 (/home/ianh/node_modules/green-bean/node_modules/gea-sdk/node_modules/binary-stream/index.js:78:22)
Adapter.<anonymous> (/home/ianh/node_modules/green-bean/node_modules/gea-sdk/src/erd.js:105:38)
emitOne (events.js:82:20)
Adapter.emit (events.js:169:7)
onPacketReceived (/home/ianh/node_modules/green-bean/node_modules/gea-adapter-usb/index.js:103:26)
/home/ianh/node_modules/green-bean/node_modules/gea-adapter-usb/index.js:128:17
Here's the test program:
// This has only been tested with a GE GDF570SGFWW dishwasherrequire('events').EventEmitter.prototype._maxListeners=0;constgreenBean=require("green-bean");vardelayTime=1000;// milliseconds between messages to dishwashervarfields=['userConfiguration','operatingMode','cycleState','cycleStatus','error'];varpendingDishwasherMessages=[];varlastMessage=0;functionflushPendingDishwasherMessages(){varcallback=pendingDishwasherMessages.shift();callback();if(pendingDishwasherMessages.length>0)setTimeout(flushPendingDishwasherMessages,delayTime);}functionsendDishwasherMessage(callback){if(pendingDishwasherMessages.length>0){pendingDishwasherMessages.push(callback);return;}varnow=Date.now();vartimeSinceLastMessage=now-lastMessage;if(timeSinceLastMessage>delayTime){callback();lastMessage=now;return;}pendingDishwasherMessages.push(callback);setTimeout(flushPendingDishwasherMessages,delayTime-timeSinceLastMessage);}functionsubscribe(dishwasher,field){sendDishwasherMessage(function(){dishwasher[field].subscribe(function(value){console.log(field,value);});});}functiondoTest(){sendDishwasherMessage(function(){console.log('writing to userConfiguration...');dishwasher.userConfiguration.write([0,128,32]);});}vardishwasher;console.log('connecting to green bean');greenBean.connect("dishwasher",function(dw){if(dishwasher==null){dw.operatingMode.read(function(value){if(value==11)return;dishwasher=dw;console.log('connected...');for(varindex=0;index<fields.length;index+=1)subscribe(dishwasher,fields[index]);setTimeout(doTest,2000);});}});
The text was updated successfully, but these errors were encountered:
The problem isn't with the write as far as I can tell. If I send [1, 128, 32], then I see the 2-hour delay LED turn on, and if I run the program again, it does report that the value is now [1, 128, 32]. It's just crashing when reading data immediately after the write for some reason.
If I read
userConfiguration
I get back[0, 128, 32]
right now (no delay, no zone, no dry options, normal wash temp, rinse aid enabled, autosense cycle, leak detect enabled).If I write
[0, 128, 32]
back touserConfiguration
, I get back:Here's the test program:
The text was updated successfully, but these errors were encountered: