Closed bendikwa closed 3 years ago
Thank you for reporting. I think I know the reason. I had both BASIC and SWITCH_BINARY for another plug, and that caused problems earlier. I was also told that including both binary and basic on/off capability was not needed. So I thought I should remove it for TZWP-102 as well. I will re-add BASIC now, and release a new version.
Athom takes care of things behind the scenes, so no need to add custom report listener. It should be enough to add this line in device.js for TZWP-102 in ‘onNodeInit(): "this.registerCapability('onoff','BASIC’);"
I am sorry for the inconvenience.
New version coming very soon!
Yngve
This should be fixed in next version.
Yes, I can confirm that adding this.registerCapability('onoff', 'BASIC')
also did the trick.
Thank you for the quick response.
-Bendik
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:
With this as my understanding I got it working by adding a custom report listener in the device.js:
So I submit this as my suggested fix, but, as I said, I feel like I'm missing something obvious.
-Bendik