caseda / com.tkbhome

TKB Home devices for Homey
5 stars 17 forks source link

TZ66D problems #27

Open Drops70 opened 6 years ago

Drops70 commented 6 years ago

Hi,

I have some TZ66D devices. Button one switches the lights, button two is controlling the blinds. Now from time to time, manly in the evening, button one also controlls the blind. Meaning when e.g. switch off the light the blind starts to move. The flow I have set up is Ok (as it is quite simple). Any idea why?

Regards, Oliver

caseda commented 6 years ago

did you change any of the settings? in special the associations

Drops70 commented 6 years ago

I did some changes: LED indicates the Switch is off LED doesn`t blink Buttom = on

Associations is empty.

caseda commented 6 years ago

All association empty means it will not work as designed, they are specificly inputted for tkb devices to make most use of it within a controller (in our case homey) So homeys id (most likely 1) needs to be in groups 2, 3 and 4 (NOT in group 1)

In case you care, tkb switches are actually only designed for direct controlling zwave devices (device node id's in the association groups). I made a very custom and pretty hacky way to see what is pressed on the switch itself. By default (following the manual or how other controllers implemented it) only the left switch would be reported to homey.

Drops70 commented 6 years ago

Many thanks for the detailed explanation. I will adjust the association accordingly. If I understood right, the right switch will not work with Homey? That would be a nightmare for me as I have a couple of These devices and the right Switch is used to controll blinds. With my actual controller (ZipaBox) it is working perfectly. On the other hand it is working in 50% of the case also with Homey ...... still strange for me.

caseda commented 6 years ago

If you put the id of homey in the groups I told in the previous message the the right switch works. Curious how zipato made it work then 🤔 as I needed to implement a rather hacky way to determine if the right switch was pressed or the left switch, and then even more hacky for the double click of the right switch

caseda commented 6 years ago

But it can also be that you have "the zwave bug" that is in homey (v 1.5.0 till 1.5.5) making devices respond not properly, fixed in the upcoming homey update 1.5.6

Drops70 commented 6 years ago

Ok - I will checkt it tonight and report if it already works or if I have to wait for the software update. I will donate for a beer for all the work you did - thanks!

caseda commented 6 years ago

Ooeeh, thank you so much for the donation ❤️

Going to start soon with a rewrite to SDKv2, that should increase stability as well, even if it is just a little bit.

Drops70 commented 6 years ago

Just a Feedback. Tested yesterday, but still the same issue. Or do I have to wait for an App update?

caseda commented 6 years ago

Don't think the rewrite will help with the left switch and right switch thing out of the blue though.

But will look into it, could you post the zwave log here what happens when you press the left switch, multiple times (few seconds apart), and then the right switch the same With a few time codes so I know which one is which.

Maybe I can try to recreate with my own device even though it is a different type.

Drops70 commented 6 years ago

Sure I will, but ..... from where do I get the Zwave log? If needed I can also send you one device. I have one spare part where one of the right button was defect. Think I fixed it and should work OK.

caseda commented 6 years ago

You can currently see it in 2 places. homeys settings -> z-wave -> stuff for geeks. And in the developer tools

In the future (homey fw v1.5.5 and up), it will be gone from the internal settings, and only in the developer tools.

Drops70 commented 6 years ago

Hope I did the logging corrcetly. The switch is node 9: log_tkbswitch

There is no log data when pushing button 1. All data are when button 2 was pushed. First two single click, next two are double clicks .... Hope this helps.

Drops70 commented 6 years ago

Ex- and included the device again as I noticed the status of the left switch was not reported to homey. Standard setuo is only 1 in groups 2 and 3, not in 4. Now left switch is also loged. But something strange (at least for me) happens. Devices is now 92.

log_tkbswitchneu

The data 0x01ff or sometimes 0x03ff changes to 0x0100 or 0x0300 when another button is clicked. Do not know if this is OK or not.

I will now change group for to 1 also and see how the right swichtes work ..... keep you updated.

caseda commented 6 years ago

the value is command class specific, COMMAND_CLASS_SWITCH_BINARY (left switch) 0x0300 or 0x03ff

0x = saying that the value is hexadecimal 03 = SWITCH_BINARY_REPORT, also the "name" of the command

depending if you press the top or bottom part of the left switch: 00 = Off command ff = On command

COMMAND_CLASS_BASIS (right switch): 0x0100 or 0x01ff

0x = saying that the value is hexadecimal 01 = BASIC_SET, also the "name" of the command

depending if you press the top or bottom part of the right switch: 00 = Off command ff = On command

putting homey's id only in 2, 3 and 4 is the only way for me to know if the left (binary switch, group 4) or the right (basic, group 2) is being used ;) that is why that is the default, and should NOT be changed

Drops70 commented 6 years ago

Thanks for explanation. But as I said, default is "1" in group 2 and 3 and not in group 4. I will report backoin the function as soon as I have more experience with it.

caseda commented 6 years ago

if this issue still occurs, i don't think i can fix this issue in your case as i can not decide as to what the device sends to homey then with association groups (2 and 3). let's see if it gets better when the app is in SDKv2 (alsmost finished)

sjaakie33 commented 6 years ago

May be i am missing something, but not having homey id at association group 1 means there is no return to homey when i switch left switch manually and no return to homey when homey switch the switch. association group 4 must also be homey id if you use direct association by other devices association group 2 and 3 are for double pressing

caseda commented 6 years ago

that is the exact reason why this device (well actually these devices) is not meant for being included in a controller where you want all buttons to trigger with (direct association only) if you add homey in group 1 and 2 and 3, you will not be able to distinguished if you press the left button, the right button, or even if you pressed the right button single or twice. as the value is completely the same (basic command class values 0 (off) and 99 (on))

that's why it is as pretty hacky way by not including group 1, as the switch should send the node information frame if you press any button once (now only seen three times where it does not happen, where this issue is one of), i then get the value of the output if the right switch is pressed it still sends the basic command class value so if within 300 ms that is send with the information frame, it is the right button only the node information frame, then it is the left switch if only the basic command class value comes in, then it is the double click of the right switch.

without all this, only the left switch would been able to trigger stuff in homey

sjaakie33 commented 6 years ago

ok thanks for the info