kkossev / SmartThings

SmartThings
3 stars 39 forks source link

TS004F experimental driver needs testing in Scene Switch mode (all 12 keypress actions) #2

Closed kkossev closed 2 years ago

kkossev commented 3 years ago

TS004F experimental driver version 2.0 needs testing in Scene Switch mode (all 12 keypress actions).

Please let me know if it works in your ST environment.

QKnoliver commented 3 years ago

I have tried it but i only get feedback from the single press and the held from 2 buttons. no luck here im sorry.

kkossev commented 3 years ago

Thank you @QKnoliver !

Switching the new TS004F device into 'TS0044 compatible mode' is rather tricky and difficult. It involves fast sending of a 'magic' sequence of Zigbee commands and if the reception and the acknowledgment of any command fail the first time, there is a high chance that the initialization will not be successful. In such cases, TS004F operates in its default ''Dimmer mode". I will try to optimize this initialization process, hoping the chance for a successful complete pairing will increase.

For the moment, the only advice for a successful pairing of TS004F into 'Scene switch' mode is to make it very close to the hub (hence reducing the chance for communication errors and re-transmissions of the initialization commands ). Also, can you try switching the modes by simultaneously pressing and holding the right two buttons (#3 and #4) for about 4..5 seconds? When button#1 LED flashes, release the buttons, With this keypress combination the device should cycle between scene switch (12 keypress events) and dimmer (7 keypress events) modes. You must monitor the debug events in SmartThings Groovy IDE (Live Logging) or check whether your automation work for double-press of all hold keys.

On another note - I started to ask myself whether we really need such kind of complication (TS004F to be able to operate is two different modes)? Assigning (and remembering! :) ) 12 different functions of one and the same switch seems a bit complicated, especially for the other members of the household .. :)

QKnoliver commented 3 years ago

I have tried it next to the receiver because I do see an latency error where it sometimes thinks the second double press was just a single press. But with no luck. To change it between modes is indeed to much to remember in my household to all my switches will be directly linked to these buttons so it needs to be simple actions for them 😅. But for me, the hidden buttons would be handy then again pressing 2 buttons at the same time won't be an option here because the wiring is one switch in the house to 1 button (and that for 100 buttons 😅). The double press would be amazing but we already gave that up for now.

kkossev commented 3 years ago

The ability to switch TS004F between the two operational modes by simultaneously pressing the right two buttons was discovered (probably accidentally) by a HA user, but now I think this hidden/undocumented feature adds more confusion rather than bringing any useful functionality.

There is no need to dynamically / operationally switch between the two possible modes. This ST device handler is intended to initialize the device into the 'scene switch' mode during the pairing process. So it may be a good idea that I remove any references in the DH code (including inside the comments section) for the possibility to switch back to the dimmer control mode (no double-clicks available). It just adds confusion.

The double press would be amazing but we already gave that up for now.

No, this works in Hubitat and I don't see a reason to not make it work for SmartThings too (the old DHT only).

I hope that during this weekend I will have an updated DH version with optimized (faster) initialization that should work more reliably.

kkossev commented 3 years ago

@QKnoliver can you try the new version 2.3 ? At least one ST user already confirmed the previous version to be working for him ..

kkossev commented 2 years ago

In rev 2.4 I have made some more optimizations to the TS004F driver operating in scene mode only. Now I can pair it even when the switch is away from my ST hub, i.e. the initialization is now much less dependant on delays or retransmission errors during the initialization

kkossev commented 2 years ago

rev 2.5 - fixed bug in createChildButtonDevices(); removed preferences section

kkossev commented 2 years ago

Important: If pressing a button does nothing and you don't see any debug logs on SmartThings Groovy IDE 'Live Logging' page, try the following:

Press simultaneously the two buttons on the right row (some TS004F switches have 2 dots and 4 dots engraved on these buttons) for about 5-6 seconds until the led of the bottom left key (3-dot-button) lights up for a split second. This key sequence circles between 'dimmer' and 'scene control' modes. Although this DHT tries to configure the switch in 'scene control' mode during the installation and inital pairing, for some users this fails by unknown (yet) reasons.

kkossev commented 2 years ago

TS004F initialization in Scene Control mode for SmartThings seems to be working OK, confirmed by several ST users.

I welcome any Pull Requests for future improvements to this DHT. Please make sure your fork is synced with the latest release version.

I am closing this issue for the moment.