Trouble adding GE 45852 plug
I'm trying to add a wall plug & dimmer - the GE/Jasco 45852. It seems to pair, however when I trigger the switch on/off manually, I don't see any messages in the log file (that i can use to create new toZigbee.js and fromZigbee.js entries).
Below are listed the only related messages I see in the log file, and the last database.db entry for the device. Any ideas for debugging or fixing are appreciated!
Thanks, Kimon
Log file entries:
2018-06-10T06:07:50.205Z - info: MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}' 2018-06-10T06:07:50.425Z - info: Connecting with device... 2018-06-10T06:07:50.426Z - info: MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}' 2018-06-10T06:07:50.430Z - info: Device incoming... 2018-06-10T06:07:50.431Z - info: MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"device incoming"}'
database.db entry:
{"id":5,"type":"Router","ieeeAddr":"0x0022a300001af090","nwkAddr":56148,"manufId":4388,"manufName":"Jasco Products","powerSource":"Mains (single phase)","modelId":"45852","epList":[1,2],"status":"online","joinTime":1528610866,"endpoints":{"1":{"profId":260,"epId":1,"devId":257,"inClusterList":[0,3,4,5,6,8,1794,2821],"outClusterList":[10,25],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{"zclVersion":1,"appVersion":18,"stackVersion":80,"hwVersion":1,"manufacturerName":"Jasco Products","modelId":"45852","powerSource":1}},"genIdentify":{"dir":{"value":1},"attrs":{"identifyTime":0}},"genGroups":{"dir":{"value":1},"attrs":{"nameSupport":0}},"genScenes":{"dir":{"value":1},"attrs":{"count":0,"currentScene":0,"currentGroup":0,"sceneValid":0,"nameSupport":0}},"genOnOff":{"dir":{"value":1},"attrs":{"onOff":0}},"genLevelCtrl":{"dir":{"value":1},"attrs":{"currentLevel":168,"onLevel":255}},"genTime":{"dir":{"value":2},"attrs":{}},"genOta":{"dir":{"value":2},"attrs":{}},"seMetering":{"dir":{"value":1},"attrs":{"currentSummDelivered":{"0":0,"1":0},"status":0,"unitOfMeasure":0,"multiplier":1,"divisor":10000,"summaFormatting":251,"demandFormatting":11,"historicalConsumpFormatting":120,"meteringDeviceType":0,"instantaneousDemand":0}},"haDiagnostic":{"dir":{"value":1},"attrs":{"averageMacRetryPerApsMessageSent":1,"lastMessageLqi":255,"lastMessageRssi":-41}}}},"2":{"profId":260,"epId":2,"devId":260,"inClusterList":[0,3,2821],"outClusterList":[3,6,8],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{"zclVersion":1,"appVersion":18,"stackVersion":80,"hwVersion":1,"manufacturerName":"Jasco Products","modelId":"45852","powerSource":1}},"genIdentify":{"dir":{"value":3},"attrs":{"identifyTime":0}},"genOnOff":{"dir":{"value":2},"attrs":{}},"genLevelCtrl":{"dir":{"value":2},"attrs":{}},"haDiagnostic":{"dir":{"value":1},"attrs":{"averageMacRetryPerApsMessageSent":1,"lastMessageLqi":255,"lastMessageRssi":-42}}}}},"_id":"yvS1D5Rs9Cb9SJK6"}
When running with DEBUG=* npm start, do you see anything in the log when pressing the button?
Thanks for the quick reply! It doesn't seem like the debug messages come on button pushes (not instantly at least). The bottom of the debug is:
6/9/2018, 11:53:06 PM INFO Connecting with device... 6/9/2018, 11:53:06 PM INFO MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"connecting with device"}' zigbee-shepherd Device: 0x0022a300001af090 join the network. +8ms zigbee2mqtt:controller Recieved zigbee message with data 0x0022a300001af090 +6ms 6/9/2018, 11:53:06 PM INFO Device incoming... 6/9/2018, 11:53:06 PM INFO MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"pairing","message":"device incoming"}' zigbee2mqtt:controller Recieved zigbee message with data online +2ms
zigbee2mqtt:zigbee Check online 0x0022a300001af090 +0ms
zigbee-shepherd:request REQ --> ZDO:nodeDescReq +26s
cc-znp:SREQ --> ZDO:nodeDescReq, { dstaddr: 56148, nwkaddrofinterest: 56148 } +26s
serialport write 9 bytes of data +26s
cc-znp:SRSP <-- ZDO:nodeDescReq, { status: 0 } +13ms
cc-znp:AREQ <-- ZDO:srcRtgInd, { dstaddr: 56148, relaycount: 0, relaylist:
zigbee2mqtt:zigbee Check online 0x0022a300001af090 +1m
zigbee-shepherd:request REQ --> ZDO:nodeDescReq +60s
cc-znp:SREQ --> ZDO:nodeDescReq, { dstaddr: 56148, nwkaddrofinterest: 56148 } +60s
serialport write 9 bytes of data +1m
cc-znp:SRSP <-- ZDO:nodeDescReq, { status: 0 } +13ms
cc-znp:AREQ <-- ZDO:srcRtgInd, { dstaddr: 56148, relaycount: 0, relaylist:
Ok, in that case it looks similar to the OSRAM Smart+ plug where we need to setup reporting.
Please add the configure from https://github.com/Koenkk/zigbee-shepherd-converters/blob/master/devices.js#L376.
Note that const device = shepherd.find(ieeeAddr, 3); has to be changed to const device = shepherd.find(ieeeAddr, 1); or const device = shepherd.find(ieeeAddr, 2); (because the device epList is [1, 2].
That worked. Dimming works, too. Thanks for the help,! Now i just have to learn the code, etc. to understand what the setup reporting is doing, for future reference.
In case it helps others, below is the my entry for devices.js. I'll submit a pull request to zigbee-sheperd-converters, if I figure out how.
{ zigbeeModel: ['45852'], model: '45852', vendor: 'GE', description: 'GE wall switch 45852', supports: 'on/off', fromZigbee: [fz.light_brightness, fz.ignore_onoff_change, fz.generic_state], toZigbee: [tz.onoff, tz.light_brightness, tz.ignore_transition], configure: (ieeeAddr, shepherd, coordinator, callback) => { const cfgRptRec = { direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0, };
const device = shepherd.find(ieeeAddr, 1);
if (device) {
device.bind('genOnOff', coordinator, (error) => {
if (error) {
callback(error);
} else {
device.foundation('genOnOff', 'configReport', [cfgRptRec]).then((rsp) => {
callback(rsp[0].status === 0);
});
}
});
}
}
},