[OBSOLETE] Moes 2 and 3 gang Zigbee wall switch ( cluster EF00)

great news!! please post here the thread also that you work on
also can we know what must change for 3 gangs?

i will try now

EDIT
I change the model on the handler to my model so recognised automatically

i found a false code line 210 must be
cmds += createChildOnOffCommand(2,false)
was 1 not 2

i am searching now how will become for 3 gangs already the 2 works

Hi Kostas,
I would suggest to try dp=3 for third gang.

wich line you mean?

i think many lines must change
 can you help me on this?
thanks Ygerlovin

Hi @b16b ,

Please try the handlers from the side branch
https://bitbucket.org/yashik_gt/smartthings/src/ts0601-kostas/SmartHome4U/

Please remove your devices, take both child and parent handlers and perform zigbee join.
I added the fingerprint for your device, it should be discovered automatically.

After this, you should be able to configure the number of child devices in the settings.
Cheers,
Yakov

1 Like

Hi Chares,

Could you please elaborate on processing differences between switch and if statements?
Thanks

Groovy which is based on Java has the same considerations on processing,

If future code will need multi conditions an if/else statement would be the approach to go, but if you’re only trying to evaluate one condition (something =? X) the switch statement is faster processing wise as the JVM loads the values of the ‘cases’ into a table and iterates through them without doing for example a mathematical comparison (‘is 2+2 = 4 ?’).

Interesting that the zbjoin that @b16b doesn’t have more than one endpoint, which means if its a 3-gang switch, the buttons are inside the same EF00 command structure (or non consecutive endpoint numbers).

1 Like

Thank you for your clarifications.
That’s an interesting insight, even though I believe the difference wouldn’t be noticeable for cloud environment.

Tuya implements proprietary protocol on top of 0xEF00 cluster. From what I understand

  • all messages are sent to destination EP =1
  • the format of the message is as follows:
    DPID 1 byte
    type 1 byte
    0x00 raw
    0x01 bool
    0x02 uint32 (big endian)
    0x03 string (N bytes)
    0x04 enum 1 byte
    0x05 bitmap 1/2/4 bytes
    len 2 bytes (in big endian, 01FF would mean 511 dec)
    value 1/2/4/N

DPID is basically a kind of proprietary endpoint inside Tuya cluster.
Please take it with a grain of salt, I’m new to this stuff

2 Likes

thanks for your fix
 i create the 3rd switch from the settings but the 3rd gang is always on and does not work

i think
you must change some of the code

207 line add
case 3: // Switch 3
247 and 262
cmds += createChildOnOffCommand(3,true)
cmds += createChildOnOffCommand(3,false)
279
zigbee.readAttribute(zigbee.ONOFF_CLUSTER, 0x0000, [destEndpoint: 0x03]) + // switch 3 state

I don’t have the device to test the changes, so will need your help for this.
Could you please open “Live logging” and perform the following:

  1. On/Off on the main (parent) device
  2. On/Of on the 3rd gang device
    and provide the log output?
    Thanks

i can’t turn on sw3 because never turn off

EDIT

when tap it from the wall

1 Like

Ok, great, I can see the problem, thank you.
Will update once the fix is ready

2 Likes

Hi @b16b ,
Please try the fix
https://bitbucket.org/yashik_gt/smartthings/src/ts0601-kostas/SmartHome4U/TS0601.groovy
Thanks

2 Likes

nice job the 3rd gang work

but now i have 2 other problem

  1. hub recognise the switch as a thing a must change it from ide

and

  1. main relay parent open and turn off when every gang is turn offand turn on if is at least one is turn on
    but does not follow the gang 2
    also as switch does not turn on or off, still loading when tap it
    maybe the reason that does not work as parent switch is the gang 2

For the first issue to fix I will need a complete zigbee join line from the hub.
For the second- the logs

Gang 2 is zero based (i.e you count it from zero: 0,1,2 or 1 based,the one in the middle)?

This is what you need or ask something else?
https://community.smartthings.com/t/device-handler-moes-3-gang-zigbee-wall-switch-cluster-ef00/229325/22?u=b16b

When I say gang 2 I mean the middle I count as 1,2,3

before that work the 2 of the 3 gangs (1 and 2 not 3) parent open and cllose all and follow gang 2

Regarding zigbee join, this is what needed as a text, not image. I already added a fingerprint from this post and if that doesn’t work I probably have typo somewhere. Therefore, please post it as s text, so it could be copy&pasted.

Regarding the second issue, please provide logs as a text, not image.
Thank you

Also, could you please provide a link to your product?
In your log I see messages that I don’t know how to decode. It could be related to some additional functionality your switch has

Can you highlight the text that you need as a text

And also 2here I can find the link that you ask

Thanks so much for your help

Can you please paste it as a text

https://community.smartthings.com/t/device-handler-moes-3-gang-zigbee-wall-switch-cluster-ef00/229325/22?u=ygerlovin