Trying to get Moes Smart Button to work

I have bough some Moes Smart Buttons, but I haven’t been able to get them to work. These are one button devices with very little documentation.

I have been able to connect it to phoscon and it appears as a button, I have added it to a group but it is not doing anything with my lights. I can see some event logs in phoscon eg

   "21:40:24:889": {
        "attr": {
            "id": "24",
            "lastannounced": "2023-10-13T11:43:55Z",
            "lastseen": "2023-10-13T12:10Z",
            "manufacturername": "_TZ3000_ja5osu5g",
            "modelid": "TS004F",
            "name": "HallButton1",
            "swversion": null,
            "type": "ZHASwitch",
            "uniqueid": "70:ac:08:ff:fe:c5:ce:4e-01-1000"
        },
        "e": "changed",
        "id": "24",
        "r": "sensors",
        "t": "event",
        "uniqueid": "70:ac:08:ff:fe:c5:ce:4e-01-1000"
    }
}

Any suggestions on what to try next?

Hello, you can catch with your third app “state/buttonevent” event.
The one on your sample is a “attr” one, useless for you, if you haven’t one, waht is your deconz version ?

I m looking the issue on deconz github, it seem this device haven’t group support in the DDF, can you share the complete device json ? Visible in Phoscon/help/API Information/sensors/X

        {
          "name": "config/group"
        },

    {
      "bind": "groupcast",
      "config.group": 0,
      "src.ep": 1,
      "cl": "0x0006"
    },
    {
      "bind": "groupcast",
      "config.group": 0,
      "src.ep": 1,
      "cl": "0x0008"
    },

I only see these attr ones, although I thought I once saw one that said “config”.

For the device json: I assume you mean switches/X? This is what I see.

 {
    "config": {
        "battery": 100,
        "on": true,
        "reachable": true
    },
    "ep": 1,
    "etag": "6fea6d220229f2106b99f69a179e154f",
    "lastannounced": "2023-10-13T11:43:55Z",
    "lastseen": "2023-10-15T04:54Z",
    "manufacturername": "_TZ3000_ja5osu5g",
    "mode": 1,
    "modelid": "TS004F",
    "name": "HallButton1",
    "state": {
        "buttonevent": null,
        "lastupdated": "none"
    },
    "type": "ZHASwitch",
    "uniqueid": "70:ac:08:ff:fe:c5:ce:4e-01-1000"
}

It’ s realy like your device is not supported. What is your deconz version ?
The PR that support your device is Add DDF + Button Map for _TZ3000_ja5osu5g Tuya Smart Button by Xyaren · Pull Request #6977 · dresden-elektronik/deconz-rest-plugin · GitHub

My deconz is version 2.23.02.

I will watch that PR.

It’s strange, the code to support my devices is in my version of deCONZ. But for some reason I can’t get it to work.

Do you have access to the GUI ?
If yes, select the noe device, make a right clic then “edit DDF” you will see the DDF used by this device, if not perhaps the problem will be visible.
You haven’t a “custom” DDF for this device ? (even made by error playing with the editor)

I can see the DDF in the GUI. I am fairly sure I haven’t created a custom DDF - I don’t think I have ever gone into edit DDF before.

Try changing the Status for “Gold”. (then save the file and make “hot reload” in the menu)

I have tried this, but the behaviour is unchanged. (I have also tried changing the DDF mode in deCONZ to Silver).

Perhaps

The button has two modes, you can switch between them by 3xPressing the button very fast.

“doc”: “Smart Button with two modes (remote mode not mapped)”,

Try changing the mode ?

Yes, I saw that, and I have tried pressing three times each time I have tested this, but the result is always the same.

I have tried assigning actions in deCONZ, looking for events in deCONZ, and with REST via homebridge-deconz.

I have a second button that I intend to try to see if maybe I just have a defective device.

Ok, I have tried a second button with the same results.

Do you have the GUI ?
Take a look in deconz/help/debug view , with flag “info”, “info_l2” (“DDF”), and press the button, you need to see something about “buttonmap”.

Nothing about buttonmap. I see lines like:

17:15:46:867 [INFO] - No button handler for: TS004F, broadcast to: 0x0000, endpoint: 0x01, cluster: LEVEL_CONTROL (0x0008), command: MOVE_TO_LEVEL (0x00), payload: 3F0100, zclSeq: 100

followed shortly later with

17:15:47:165 [INFO] - No button handler for: TS004F, broadcast to: 0x0000, endpoint: 0x01, cluster: COLOR_CONTROL (0x0300), command: 0x06, payload: A93F0100, zclSeq: 101

These always come in pairs one LEVEL_CONTROL and one COLOR_CONTROL.

It’s not the mapping used for this device.

        "TuyaSmartButton": {
            "vendor": "Tuya",
            "doc": "Smart Button with two modes (remote mode not mapped)",
            "modelids": ["_TZ3000_ja5osu5g"],
            "map": [
                [1, "0x01", "ONOFF", "0xfd", "0", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "Short"],
                [1, "0x01", "ONOFF", "0xfd", "1", "S_BUTTON_1", "S_BUTTON_ACTION_DOUBLE_PRESS", "Double"],
                [1, "0x01", "ONOFF", "0xfd", "2", "S_BUTTON_1", "S_BUTTON_ACTION_LONG_RELEASED", "Long"]
            ]

The one previsouly tested use the cluster 0x0006.
You have a device picture here Add DDF + Button Map for _TZ3000_ja5osu5g Tuya Smart Button by Xyaren · Pull Request #6977 · dresden-elektronik/deconz-rest-plugin · GitHub it’s the same one you have ?

If you change the mode, the device still using same cluster ?

This device have 2 mode

  • Scenario Mode, with only single/long/double press (for me using the cluster 0x0006 on/off)
  • Remote Mode with feature like variation, that look more like the cluster you have in log (LEVEL_CONTROL / COLOR_CONTROL)

The mapping is done for the Scenario mode.

This certainly seems to be the same device.

I have never been able to get it to change mode. :slightly_frowning_face:

From the page you linked to above:

Notes

Testing is quite challenging. When playing aroung with bindings, I managed to put the button in some kind of state, that prevented the mode switch by 3x pressing the button.
Even after re-pairing this state remained.
Only after I brute-force played around with the unbinding in the GUI I managed to revert it backt to its initial behaviour.

I wonder if this is my issue. I will try playing around to see if I can somehow trick it into changing modes.

I still haven’t managed to change mode. I see other systems like hubitat report issues around integration, saying things like needing to pair twice.

So I tried pairing again, but that didn’t help either.

I am not sure what to try next

The only information I found if pressing 3 time fastly the button, removing the batterie can reset it, but IDK what is the defaut mode.
There is no information to switch mode on the documentation ?

I have no tried removing the battery and the result is the same.

The only documentation I have says “3 click” to swap the mode.