caseda / com.tkbhome

TKB Home devices for Homey
5 stars 17 forks source link

TZ66 updates #40

Closed damianxd closed 5 years ago

damianxd commented 6 years ago

Hi,

I'm having troubles getting the current status of several TZ66 and TZ56. If I manually turn on the switch, Homey doesn't get the change and I have no poll frequency options.

Is there any way to fix this?

caseda commented 5 years ago

My apologies for the late response.

These devices should send the switching command on its own, no need for polling. is homey's ID still in the association group(s)? if so, can you please check if anything comes in with the z-wave log when you are switching (https://developer.athom.com/tools/zwave)

PS: Accidentally closed 😊

damianxd commented 5 years ago

Yes! I get the data on the log:

2018-09-27T22:31:02.054Z Node[12]: Received application command for COMMAND_CLASS_BASIC, data: 0x0100
2018-09-27T22:31:02.054Z Node[12]: [COMMAND_CLASS_BASIC] {"Value (Raw)":{"type":"Buffer","data":[0]},"Value":0}
2018-09-27T22:31:39.937Z Node[12]: Received application update: 0x100125852770738672
2018-09-27T22:31:40.019Z Node[12]: Received application command for COMMAND_CLASS_BASIC, data: 0x01ff
2018-09-27T22:31:40.019Z Node[12]: [COMMAND_CLASS_BASIC] {"Value (Raw)":{"type":"Buffer","data":[255]},"Value":255}

But the information on the device on the Homey app is not being updated with it

gunnarssonlars commented 5 years ago

Hi. I have the same problem with TZ36D. And no flow start with click on right switch. Double click on right switch start flow.

caseda commented 5 years ago

now that i think about it, its awfully close to the issue as #27.

so pretty much impossible to fix by me, at least without a device with this behavior. (not all the switches behave the same, yes even with the same id's and/or device types)

damianxd commented 5 years ago

I don't think that's my case because I get value 0 and 255 on both sides of the switch, as you can see on my log, but the change doesn't affect the position stored on Homey

caseda commented 5 years ago

As it is coded now (the only way to make the right switch also work) is that homey is awaiting a certain command (a node information frame, also the application update you see in the log, and only this command) to retrieve the current value of the output.

If it receives more then just that command (the COMMAND_CLASS_BASIC you see) it assumes it is the right switch (the reason for homey's id only in 2 and 3 (and sometimes 4, but that's optional) group 1 should not have homey's id for this reason, as it then also sends the basic command when pressing the left switch.

If weird things like this keep popping up I'm almost forced to change all drivers to let it work like tkb home is intending them to be, and that is only the left switch working inside homey, and the right switch only for direct associations.

So please really confirm that homey's Id is only in group 2 and 3, like it was during pairing.

damianxd commented 5 years ago

but the one I'm sending in the logs to you is one switch only, it doesn't have any right side. I did test it too, but the one in the logs is a single switch

caseda commented 5 years ago

But does it still have the associations the way I described? Yes even if it is only a single switch. the inside (at least the chip and id's used) of the dual and single are completely the same (one of the very bad design choices tkb made), might even be completely the same if you open it up (and be able to switch out the rocker.)

damianxd commented 5 years ago

captura de pantalla 2018-10-02 a la s 09 47 46 captura de pantalla 2018-10-02 a la s 09 47 34 Here are current associations settings

caseda commented 5 years ago

So not the same as I described :wink:

damianxd commented 5 years ago

I could try to remove all the devices and pair them again if you want, maybe that will give you more hints

caseda commented 5 years ago

It is exactly as I already said, remove homey's id from group 1, even if it is a single switch. Repairing will give you the same exact result as it will not add homey's id to group 1

damianxd commented 5 years ago

I've tried removing homey's id (1) from group 1. Now I'm getting this on the log:

2018-10-06T00:33:17.087Z Node[16]: Received application update: 0x100125852770738672
2018-10-06T00:33:23.780Z Node[16]: Received application update: 0x100125852770738672
2018-10-06T00:33:35.426Z Node[16]: Received application update: 0x100125852770738672
2018-10-06T00:33:42.860Z Node[16]: Received application update: 0x100125852770738672
2018-10-06T00:33:52.487Z Node[16]: Received application update: 0x100125852770738672
2018-10-06T00:33:54.964Z Node[16]: Received application update: 0x100125852770738672

but still no change on the device on Homey

caseda commented 5 years ago

Combinig this issue with #27 they are the same