dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 498 forks source link

Add support for MOES 1 Gang Switch #7867

Closed svenvoss closed 1 month ago

svenvoss commented 1 month ago

Is there already an existing issue for this?

Product name

MOES ZigBee Funkschalter, Smartschalter ohne Installation, 1 Gang

Manufacturer

_TZ3000_axpdxqgu

Model identifier

TS0041

Device type to add

Switch

Node info

Bildschirmaufnahme vom 2024-08-03 15:39:06

Endpoints and clusters

Bildschirmaufnahme vom 2024-08-03 15:48:43

Basic

Bildschirmaufnahme vom 2024-08-03 15:35:04

Bildschirmaufnahme vom 2024-08-03 15:38:03

Further relevant clusters

Power Configuration

On/Off

Level Control

Color Control

Thermostat

Simple Metering

Electrical Measurement

Any other cluster of relevance/interest

Smanar commented 1 month ago

Hello, can try adding your device to this list https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/tuya/_TZ3000_TS0041_1gang_remote.json And in the button_maps.json file to test.

svenvoss commented 1 month ago

Hi, thank you for the quick reply. I am sorry, but it is not fully clear to me what I should do. Could you please give me some more details what I should do.

The device is currently recognized as light but it is light/scene switch.

Smanar commented 1 month ago

The device is currently recognized as light but it is light/scene switch.

Ha yes, this device is already supported, sorry (and in the DDF linked in my previous post) But from the DDF this device need to be reconised as a ZHAswitch.

If I m right you need to be able to see websocket notification every time you press it, visible in Phoscon/help/API information/event

svenvoss commented 1 month ago

Output after reconnecting switch:

"6": { "config": { "battery": 100, "on": true, "reachable": true }, "ep": 1, "etag": "94ef8b3925dbeb6838f6669907f02bff", "lastannounced": null, "lastseen": "2024-08-05T06:01Z", "manufacturername": "_TZ3000_axpdxqgu", "mode": 1, "modelid": "TS0041", "name": "Schalter", "state": { "buttonevent": null, "lastupdated": "none" }, "type": "ZHASwitch", "uniqueid": "xxxxxxxxxxxx" }

After pressing once:

                {
"08:04:25:713": {
    "attr": {
        "id": "6",
        "lastannounced": null,
        "lastseen": "2024-08-05T06:04Z",
        "manufacturername": "_TZ3000_axpdxqgu",
        "mode": 1,
        "modelid": "TS0041",
        "name": "Schalter",
        "swversion": null,
        "type": "ZHASwitch",
        "uniqueid": "f4:b3:b1:ff:fe:f8:fe:e5-01-0006"
    },
    "e": "changed",
    "id": "6",
    "r": "sensors",
    "t": "event",
    "uniqueid": "f4:b3:b1:ff:fe:f8:fe:e5-01-0006"
}

After pressing twice:

                {
"08:05:35:962": {
    "attr": {
        "id": "6",
        "lastannounced": null,
        "lastseen": "2024-08-05T06:05Z",
        "manufacturername": "_TZ3000_axpdxqgu",
        "mode": 1,
        "modelid": "TS0041",
        "name": "Schalter",
        "swversion": null,
        "type": "ZHASwitch",
        "uniqueid": "f4:b3:b1:ff:fe:f8:fe:e5-01-0006"
    },
    "e": "changed",
    "id": "6",
    "r": "sensors",
    "t": "event",
    "uniqueid": "f4:b3:b1:ff:fe:f8:fe:e5-01-0006"
}

}

Currently it is not shown as light, but I am not able to assign any switch/remote functions in Phoscon. If I am in the switch button configurator in Phoscon I am not able to assign any action.

Smanar commented 1 month ago

What is your deconz version ? There is something strange, it seem the DDF is picked, but the value not updated

"state": { "buttonevent": null, "lastupdated": "none" },

And it don'ty appear on event tests.

It's like you have a deconz version with the DDF but not the button_maps.json file.

You have a "custom" installation ? Do you have access to the GUI ? if yes can you share logs with flags "info" and "info_l2" when pressing a button ? (on deconz /help / debug view)

svenvoss commented 1 month ago

Deconz 6.23.0

Installation via Homeassistant Addon on Raspberry Pi. The requested log:

Bildschirmaufnahme vom 2024-08-05 21:22:11

For any reason copying from the log doesn't working.

Smanar commented 1 month ago

For any reason copying from the log doesn't working.

This is normal on HA, but I don't understand On my side I can see it in my file.

[1, "0x01", "ONOFF", "0xfd", "0", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "B1 short"],

Deconz 6.23.0

This is the plugin version, not the deconz version (you can see it in phoscon) This device was added here https://github.com/dresden-elektronik/deconz-rest-plugin/pull/7718 so need a deconz version > v2.27.0

Edit: The error message "No button map" mean there is no button map at all, a missing field give the error "No button handler" So for me your file button_maps.json miss this device, but why you have the good DDF .... And not possible to edit this file on HA,.

svenvoss commented 1 month ago

HI, sorry for the delay. Is this what you meant?: Bildschirmaufnahme vom 2024-08-12 14:59:53

I have tried to update the conbee FW as described here: https://community.home-assistant.io/t/how-to-update-conbee-ii-on-hassio-with-deconz-phoscon-integration/402826/12 but he didn't find any new software. Do I need to update something else and if yes how.

Smanar commented 1 month ago

Ok so the problem is here, you are on older version 2.25.3 (I mean the deconz version, not the device firmware), and this device have it's support on version v2.27.0

svenvoss commented 1 month ago

Is there any manual how to update the deconz version?

Smanar commented 1 month ago

Not on HA if you are using the "integrated deconz version". They are using only Stable version, so they can use the version 2.27.6 if I m right.

svenvoss commented 1 month ago

Thank you very much for your time and support.

Zehir commented 1 month ago

Not on HA if you are using the "integrated deconz version". They are using only Stable version, so they can use the version 2.27.6 if I m right.

Latest version of the HA plugin in hassio (6.23.0) use deconz version 2.25.3

Smanar commented 1 month ago

Yep but as the version 2.27.6 is stable, they will use it nope ?

svenvoss commented 1 month ago

because of your hints I have checked the plugin page/repo. They have already a closed pull request for the actual stable version. Hopefully it is included in the next release. Thank you all for your support!