dresden-elektronik / phoscon-app-beta

Access to Phoscon app beta
79 stars 5 forks source link

Xiaomi Aqara Smart Switch - Long Press Button not available #180

Closed Maddinthebrain closed 4 years ago

Maddinthebrain commented 4 years ago

Describe the bug

I am using several Xiaomi Apara Smart Switches (Button). It works fine. But deconz only offers two possibilties to use it. 1x short press and 2x press. But the Button offers a 3rd possibilty: 1x long press. Could you please implement this into deconz? By the way the API recongizes the 1x long press yet. I can see and also use in FHEM.

Steps to reproduce the behavior

Expected behavior

Implement the 1x long press function, too

Screenshots

Environment

Version: 2.05.78 Firmware: 26350500

deCONZ Logs

Additional context

Smanar commented 4 years ago

Wich one model id is ? Not all model have same features.

Maddinthebrain commented 4 years ago

Wich one model id is ? Not all model have same features.

On the bottom there is written 型号: (this means model number) WXKG11LM CMIIT ID: 2016DP6442 IMG_20200814_213116 IMG_20200814_213043

Do you need more information?

Martin

Smanar commented 4 years ago

I think 2016 is the year, and with the model 2016 you don't have long press.

ebaauw commented 4 years ago

@Maddinthebrain I’m not sure what you’re saying, nor what you’re asking.

By the way the API recongizes the 1x long press yet. I can see and also use in FHEM.

Are you telling that the API does support long press for this switch? In that case, there is no issue with the REST API plugin.

But deconz only offers two possibilties to use it. 1x short press and 2x press

What do you mean by “deconz”? The GUI? The API? The Phoscon web app? See https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/deCONZ-for-Dummies for the differences between these. A screenshot would have helped here.

Smanar commented 4 years ago

You can too take a look on model id, if you have "lumi.sensor_switch.aq2" > 2016 > no long press

    { VENDOR_JENNIC, "lumi.sensor_switch.aq2", jennicMacPrefix }, // Xiaomi WXKG11LM 2016
    { VENDOR_JENNIC, "lumi.remote.b1acn01", jennicMacPrefix },    // Xiaomi WXKG11LM 2018
Maddinthebrain commented 4 years ago

The Problem is, that in Phoscon you cannot choose long press for an action. But in Fhem you can use it as the status is recognized properly. The long press option is just missing in the Phoscon GUI and not anywhere else. It is where you define the actions of a light depending on switch actions. The "Schaltereditor" . There are only the two possibilities 1x short and 2x short.

Maybe this button has a long press because in Phoscon a different and newer ID appears.

IMG_20200815_080157 Screenshot_20200815_080051_com android chrome

Smanar commented 4 years ago

For me, your device don't have long press, it s in the device firmware, not software.

ebaauw commented 4 years ago

I would never have done this, but they hacked something to emulate long press for the lumi.sensor_switch. https://github.com/dresden-elektronik/deconz-rest-plugin/blob/f245b37194add12c23e1be3f7b96190351da1452/de_web_plugin.cpp#L3758-L3785

Maddinthebrain commented 4 years ago

Sorry, you are wrong, why Fhem then can use it? Fhem gets the data from deconz. And deconz from the switch. Fhem shows different status messages for 1x short, 2x short and as well as for 1x long. Please check it. It must be value 1003. There's indeed a 1x long! I use it in Fhem, so it's there.

Martin

Am 15. August 2020 14:31:22 schrieb Smanar notifications@github.com:

For me, your device don't have long press, it s in the device firmware, not software.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ebaauw commented 4 years ago

Anyways, the API already issues buttonevent 1003, so this is an issue for Phoscon. @Mimiix can you transfer it?

Mimiix commented 4 years ago

Your wish is my command @ebaauw

YKO-de commented 4 years ago

The problem should have been resolved by now. I would therefore close the issue for the time being. If it still exists please create a new one.