iCasa - ICZB-IW11D (Dimmer) TypeError

Hi,

I’m not sure how to start debugging this issue, so I thought I’d ask here.
I’ve paired a iCasa ZB Dimmer and although it’s working fine, it’s showing a lot of errors in the debug log:

08:52:22:772 failed to evaluate expression for 54:ef:44:XX:XX:XX:XX:XX-01/attr/swversion: Item.val = Attr.val, err: TypeError: failed to set Item.val
08:52:22:773 JS failed to set Item.val for attr/swversion
08:52:22:774 failed to evaluate expression for 54:ef:44:XX:XX:XX:XX:XX-01-0b04/attr/swversion: Item.val = Attr.val, err: TypeError: failed to set Item.val
08:52:22:775 JS failed to set Item.val for attr/swversion
08:52:22:776 failed to evaluate expression for 54:ef:44:XX:XX:XX:XX:XX-15-000c/attr/swversion: Item.val = Attr.val, err: TypeError: failed to set Item.val
08:52:22:777 JS failed to set Item.val for attr/swversion
08:52:22:777 failed to evaluate expression for 54:ef:44:XX:XX:XX:XX:XX-01-0702/attr/swversion: Item.val = Attr.val, err: TypeError: failed to set Item.val
08:52:22:778 JS failed to set Item.val for attr/swversion
08:52:22:779 failed to evaluate expression for 54:ef:44:XX:XX:XX:XX:XX-1f-000c/attr/swversion: Item.val = Attr.val, err: TypeError: failed to set Item.val

These show up every half a second or so.

In the DDF the swversion is set to:

ZCL
Endpoint: 255
Cluster ID: 0x0000
Attribute ID: 0x4000

Expression: Item.val = Attr.val

In the debug view → ZCL it shows a couple of errors: got unsupported status: 0x86 for mandatory attribute which show in between the ZLC read attr for that device.

Any advice here?

Hello, the device probably don’t support this attribute. You can take a look direclty on the GUI, cluster 0x0000 Basic cluster, attribute 0x4000, I think this attribute will be grayed.

Not a problem can use other one, the date for exemple, if you can post a capture of the attribute list from the same cluster ?

And I don’t found the DDF, it’s a personnal one ?

I’m not sure, because I’m doing it for the first time, but this is what you mean right?
EDIT: forgot to click Read

Also, it’s not a private DDF, I just added it via Phoscon and it seemed to be supported.
I’ll add the whole DDF below:

{
  "schema": "devcap1.schema.json",
  "manufacturername": "icasa",
  "modelid": "ICZB-IW11D",
  "product": "ICZB-IW11D",
  "sleeper": false,
  "status": "Draft",
  "path": "/devices/iczb-iw11d.json",
  "subdevices": [
    {
      "type": "$TYPE_DIMMABLE_LIGHT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "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": "state/alert",
          "description": "The currently active alert effect.",
          "default": "none"
        },
        {
          "name": "state/bri",
          "description": "The current brightness.",
          "refresh.interval": 5
        },
        {
          "name": "state/on",
          "description": "True when device is on; false when off.",
          "refresh.interval": 5
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0006",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x10",
          "min": 1,
          "max": 300
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0008",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x20",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "groupcast",
      "config.group": 24,
      "src.ep": 1,
      "cl": "0x2000"
    }
  ]
}

EDIT ADD:
This is the device

It’s picked up directly by legacy code #1124 and the swversion attribute seems reacheable looking at your screenshot.

But surprinsingly nobody mentionned this effect before.

@Smanar : It’s perhaps time to convert this to a DDF and may be correct the behavior if we can ? Hope this is not due to the firmware version of the device.

Yep, if the DDF solve the issue.

But first, like you said, the issue is realy strange as the attribute is perfectly usable, and I don’t think there is a convertion issue as the value can’t be a number (because of the “_”)
Secondly I have doubts the error message is from this device

failed to evaluate expression for 54:ef:44:XX:XX:XX:XX:XX-01-0b04
failed to evaluate expression for 54:ef:44:XX:XX:XX:XX:XX-15-000c
failed to evaluate expression for 54:ef:44:XX:XX:XX:XX:XX-01-0702

And the DDF is still on “draft” mode.
Can you compare the mac adress ? because thoses cluster are for power measurement on a plug for exemple, from the github issue, your device don’t have thoses clusters (and the DDF neither).

If it could help, these MAC addresses are for LUMI, icasa seems to use MAC 00:0d:6f from Ember Corporation (but may be other too ;-))

I’m terribly sorry, I must have looked wrong.

The device is indeed a different one, namely this one:

This one has an own DDF.

Should it throw the error, though, even when the field is empty?

This is the Cluster:

EDIT: Occured to me that I have another one of this exact type (exact same data in ‘Basic’ Cluster Info), that one throws errors too.

Created Correct Aqara T1 SSM-U01 & SSM-U01 switch DDFs by SwoopX · Pull Request #6841 · dresden-elektronik/deconz-rest-plugin · GitHub to have it corrected.