UbisyD1/S2/C4: button problems

Hi,

I have a problem configuring the buttons of my Ubisys D1/S2/C4. It is not possible (anymore) to adjust groups to the buttons. I tried:

  • modern Phoscon GUI
  • the old web interface
  • the bind box in the deCONZ GUI

After that I tried to use my homeassistant instance, but there are no events for the buttons reported and I am sure, that there have been some time ago!

So I did take a look using the REST interface and there’s something interesting to see in the result. Let’s have a look:

"12": {
  "config": {
    "group": "25,26,27,28",
    "mode": "momentary",
    "on": true,
    "reachable": true
  },
  "ep": 1,
  "etag": "3b1fcce7f00f060156cad90256f13f89",
  "lastannounced": "2021-09-26T22:31:35Z",
  "lastseen": "2021-12-31T08:21Z",
  "manufacturername": "ubisys",
  "mode": 1,
  "modelid": "C4 (5504)",
  "name": "Schalter Küchenzeile",
  "state": {
    "buttonevent": 1002,
    "lastupdated": "2020-12-15T22:00:31.416"
  },
  "swversion": "1.9.3",
  "type": "ZHASwitch",
  "uniqueid": "00:1f:ee:00:00:00:4d:18-01-0006"
}

Did you spot it?

It claims that the last button even has been about a year ago! But;

  • I do use them more often :wink:
  • And they work with the groups I assigned ages ago to them! I just cannot assign new groups.

All devices should be on latest firmware, but my impression is that it wasn’t a firmware update but is rather a problem with deCONZ. I had the problem with an older firmware too (button assignment) and hoped an update would resolve is, but it didn’t.

I could even live without the direct assignment of the buttons as long as the events get emitted, because then I just would use homeassistant…

I have exactly the same issue with my C4. I am no longer able to assign new groups and cannot read buttonevents with openhab or node-red-deconz.

Node-red output:
16.1.2022, 17:27:58[node: 8dc490cad455d71f](http://192.168.1.130:1880/#)msg.payload : Object object buttonevent: 1002 lastupdated: "2020-12-01T19:51:22.895"

The ubisys devices are currently under testing, due some non ubisys related changes some problems leaked into the ubisys devices.

The C4 is fixed by this PR:

J1 is currently in testing, guess S1 / S2 need the same changes.

2 Likes

Small update, I get the S1 and S2 for testing on Wednesday, fix should hopefully be easy.

1 Like

Great, buttonevents in 2.14.0-beta for the C4 and S2 devices are back and updated. It is possible to add these fixes to the S2-R as well?

Hm, assignment of C4 and D1 buttons seems to work again, but I do not see any events in home assistant. Is there something I need to do to get them?

Buttonevents are properly triggered in NodeRed and OpenHab. Did you restart HA?

Note: deCONZ automatically signals Home Assistant when new sensors are added, but other devices must at this point in time (deCONZ v2.05.35) be added manually using this service or a restart of Home Assistant

I did at least reload the deConz integration, but that doesn’t seem to do the trick - a restart helped. Thanks.

Unfortunately I don’t have a S2-R unit for testing, but I think unlike the S1/S1-R they work the same.
So it might be worth a try to duplicate the S2 DDF and modify the modelid value to the one shown in the Basic Cluster.

According to the Ubisys reference manual on p27 the model id is: “S2-R (5602)”

I used the S2 as a template and changed the modelid. But this doesn’t seem to work (no button events are created). Should changes in DDF after saving appear directly in the REST API?

The DDF is fine I think, the button events are currently separate in the file button_maps.json.
Can you please try to change the modelid for the SR-2 like the following snipped and restart deCONZ:

        "ubisysS2Map": {
            "vendor": "Ubisys",
            "doc": "Power switch S2",
            "modelids": ["S2 (5502)", "S2", "S2-R (5602)"],
            "map": [
                [1, "0x03", "ONOFF", "TOGGLE", "0", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "Toggle"],
                [1, "0x03", "LEVEL_CONTROL", "MOVE_WITH_ON_OFF", "0", "S_BUTTON_1", "S_BUTTON_ACTION_HOLD", "Move up (with on/off)"],
                [1, "0x03", "LEVEL_CONTROL", "STOP_WITH_ON_OFF", "0", "S_BUTTON_1", "S_BUTTON_ACTION_LONG_RELEASED", "Stop_ (with on/off)"],
                [1, "0x03", "LEVEL_CONTROL", "MOVE_WITH_ON_OFF", "1", "S_BUTTON_1", "S_BUTTON_ACTION_HOLD", "Move down (with on/off)"],
                [1, "0x03", "LEVEL_CONTROL", "STOP_WITH_ON_OFF", "1", "S_BUTTON_1", "S_BUTTON_ACTION_LONG_RELEASED", "Stop_ (with on/off)"],
                [1, "0x04", "ONOFF", "TOGGLE", "0", "S_BUTTON_2", "S_BUTTON_ACTION_SHORT_RELEASED", "Toggle"],
                [1, "0x04", "LEVEL_CONTROL", "MOVE_WITH_ON_OFF", "0", "S_BUTTON_2", "S_BUTTON_ACTION_HOLD", "Move up (with on/off)"],
                [1, "0x04", "LEVEL_CONTROL", "STOP_WITH_ON_OFF", "0", "S_BUTTON_2", "S_BUTTON_ACTION_LONG_RELEASED", "Stop_ (with on/off)"],
                [1, "0x04", "LEVEL_CONTROL", "MOVE_WITH_ON_OFF", "1", "S_BUTTON_2", "S_BUTTON_ACTION_HOLD", "Move down (with on/off)"],
                [1, "0x04", "LEVEL_CONTROL", "STOP_WITH_ON_OFF", "1", "S_BUTTON_2", "S_BUTTON_ACTION_LONG_RELEASED", "Stop_ (with on/off)"]
            ]
        },
1 Like

Thank you very much. After editing, the S2-R now reports button events too!

OpenHab output:

2022-02-03 19:46:44.826 [INFO ] [openhab.event.ChannelTriggeredEvent ] - deconz:switch:cf2cb54b:001fee0000002345030006:buttonevent triggered 1002

2022-02-03 19:46:45.899 [INFO ] [openhab.event.ChannelTriggeredEvent ] - deconz:switch:cf2cb54b:001fee0000002345030006:buttonevent triggered 1002

Nice, I’ll add the adapted DDF and button file to the release.