Hi
(App version: 1.2.0)
(Homey version: 5.0.0)
If I change the state of my TZWP-102's either by direct association or by pushing the button locally on the device, the status in homey does not change to reflect it.
I have tried to debug it myself and come up with a working fix, but I cant shake the feeling that I'm missing something obvious.
Especially since it works if I disable the app, and include the plug with the default Homey app.
To me it looks like the the plug uses COMMAND_CLASS_SWITCH_BINARY for operating the device, but the report when it's state changes is sent on COMMAND_CLASS_BASIC:
node.CommandClass['COMMAND_CLASS_BASIC'].on('report') arguments: [
{ value: 3, name: 'BASIC_REPORT' },
{ 'Value (Raw)': <Buffer ff>, Value: 255 },
null
]
With this as my understanding I got it working by adding a custom report listener in the device.js:
this.registerReportListener(
'BASIC',
'BASIC_REPORT',
rawReport => {
if (rawReport && rawReport.hasOwnProperty('Value')) {
return this.setCapabilityValue('onoff', (rawReport.Value > 0));
} else {
return null;
}
},
);
So I submit this as my suggested fix, but, as I said, I feel like I'm missing something obvious.
-Bendik