Battery status won't be updated at aqara mini switch

Hi,

at my aqara mini switch (lumi.remote.b1acn01) the battery status and the button pressed events aren’t updated. I added these button in 2020 and there all works fine, but not in 2.19.1 (actual stable of deconz)

The correct device name is: WXKG11LM Rev.2

Where I can find the DDF for the lumi.remote.b1acn01 in the devices/xiaomi folder at github?
Are the button pressed events included in the DDF?

Here is a similar case: Can’t find aqara mini switch(lumi.remote.b1acn01) in Phoscon · Issue #5729 · dresden-elektronik/deconz-rest-plugin · GitHub

Hello, there is no DDF for this device yet, so you can create one (or see/complete the auto generated one in the editor), but for the moment it s the first time I m seing this issue (a device working but without battery return on 2.19.1 and working perfectly in previous version)

Are the button pressed events included in the DDF?

No they are in the button_maps.json file but can be used by the DDF, you just need to have in the DDF

                {
                    "name": "state/buttonevent"
                }

It will work with the defaut mode and use the buttonmap file.

You are sure the device is not just disconnected ?

The button is online. I get the buttonpressed as a number. buttonevent does not change.
Here is a screen of the values in IOBroker. The values “double_press”,“hold”, release_hold" and “release_press” won’t be updated. I only get the number, here 1002 at buttonpressed.

In addition the battery value is fixed at 100%.
The button was added to deconz in 2020.

Here the API-Information from deconz of these button.



                    
{
    "config": {
        "battery": 100,
        "on": true,
        "reachable": true,
        "temperature": 1300
    },
    "ep": 1,
    "etag": "5403b11accc8531680c4466bd11xxxxxx",
    "lastannounced": "2022-11-16T18:54:57Z",
    "lastseen": "2022-11-17T16:11Z",
    "manufacturername": "LUMI",
    "mode": 1,
    "modelid": "lumi.remote.b1acn01",
    "name": "Anwesenheit-Taster",
    "state": {
        "buttonevent": 1002,
        "lastupdated": "2022-11-17T16:11:44.928"
    },
    "swversion": "20180525",
    "type": "ZHASwitch",
    "uniqueid": "00:15:8d:00:04:50:db:98-01-xxxx"
}

Hu ? It’s the normal result, deconz return a number X00Y where X is the button number and Y the action.
The convertion is not from deconz.

In addition the battery value is fixed at 100%.

Do you have the GUI to check the value returned by the device ? (I will explain where to search)

okay, then the value with number is correct but buttonevent is not updated.

Which gui? Phoscon? Screen in top is from phoscon.
Deconz gui not, I’m headless at my server

So mean the value stay the same, even you press different button ?

For me it have been updated recently.

Yes, stays the same.

yes, last updated, but not changed. See screen. “Zuletzt geändert” means last changed.

But there is no “last changed” in the deconz API.
Can you make a try only with the API like you do ATM with phoscon, press a button look the “buttonevent” in the API, press the second button and look again ?

It’s the only one sensor that have issue ?

Hi,
I only have these button. Cannot test it with another one.

What do you mean with “Can you make a try only with the API like you do ATM with phoscon”?
Can u gimme a hint, what I have to do?

Ha ^^, it s the model with only 1 button ?
So to see if it work need to use Phoscon/help/API Information/event

And if it 's fine, you will see a new notification every time you use it.

Yes, it is this one: Wireless mini switches - Remote control light switch | Aqara

Okay, that’s the result of the button event:

{
    "18:02:28:388": {
        "attr": {
            "id": "15",
            "lastannounced": "2022-11-16T18:54:57Z",
            "lastseen": "2022-11-19T17:02Z",
            "manufacturername": "LUMI",
            "modelid": "lumi.remote.b1acn01",
            "name": "Anwesenheit-Taster",
            "swversion": "20180525",
            "type": "ZHASwitch",
            "uniqueid": "00:15:8d:00:04:50:db:98-01-xxxx"
        },
        "e": "changed",
        "id": "15",
        "r": "sensors",
        "t": "event",
        "uniqueid": "00:15:8d:00:04:50:db:98-01-xxxx"
    },
    "18:02:28:439": {
        "e": "changed",
        "id": "15",
        "r": "sensors",
        "state": {
            "buttonevent": 1002,
            "lastupdated": "2022-11-19T17:02:30.504"
        },
        "t": "event",
        "uniqueid": "00:15:8d:00:04:50:db:98-01-xxxx"
    }
}

Hi,
I use the same button and since deCONZ 2.9.1 it works randomly.
Sometimes events seem to be ignored or sometimes with a lot of latency.
Prior to CONZ 2.9.1, this button worked fine.

Best regards

With your point, I can confirm that.
At first I thought it was a dead battery, but with your point, you’re right.

We have so much performance issue with 2.9.1.
The 2.9.2 solve some of them Release Razzle Dazzle · dresden-elektronik/deconz-rest-plugin · GitHub
(Somes are still here, like groupcast issue, but will be not worst than the 2.9.1)

I think on your test the “buttonevent” value don’t move because you have same value (but have a new notification every time)

I m looking the code, it seem you can have other value with double or long press.

If you still have the latency issue with the version 2.9.2, I can make a DDF for this device, to use the DDF core instead of the legacy core, perhaps will be better.

Whatever, creating a DDF file for this device makes sense !

If someone wana try this DDF ?

{
  "schema": "devcap1.schema.json",
  "manufacturername": "LUMI",
  "modelid": "lumi.remote.b1acn01",
  "product": "WXKG11LM 2018 remote",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_SWITCH",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0012"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/buttonevent",
          "awake": true,
          "parse": {
            "cl": "0x0012",
            "cmd": "0x10",
            "eval": "Item.val = ZclFrame.at(0)"
          }
        },
        {
          "name": "config/battery",
          "awake": true,
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "eval": "Item.val = Attr.val / 2;",
            "fn": "zcl"
          }
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 60,
          "max": 3600,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0012"
    }
  ]
}

It’s not finished, because I m trying to not use the buttonmap file, just use it and give me the value returned by the button when using it by “buttonevent”

If you wana try with the buttonmap just need to use insteaod my code

        {
          "name": "state/buttonevent",
        }