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

ADEO LDSENK02F 16A plug #7834

Closed Idaho947 closed 1 month ago

Idaho947 commented 3 months ago

Is there already an existing issue for this?

Product name

Adeo plug 16 A

Manufacturer

Adeo

Model identifier

LDSENK02F

Device type to add

Other

Node info

image

Endpoints and clusters

image

image

Basic

image

Further relevant clusters

On/Off

image

image

Simple metering

image

image

image

Electrical Measurement

image

image

image

image

image

image

image

Smanar commented 3 months ago

Hello, DDF to try

{
  "schema": "devcap1.schema.json",
  "manufacturername": "ADEO",
  "modelid": "LDSENK02F",
  "vendor": "Adeo",
  "product": "Plug 16A",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_SMART_PLUG",
      "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/on",
          "refresh.interval": 360
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_CONSUMPTION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0702"
      ],
      "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/consumption"
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "$TYPE_POWER_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0b04"
      ],
      "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/lastupdated"
        },
        {
          "name": "state/power",
          "refresh.interval": 360
        },
        {
          "name": "state/voltage",
          "refresh.interval": 360
        },
        {
          "name": "state/current",
          "refresh.interval": 360
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0006",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x10",
          "min": 1,
          "max": 300
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0702",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x25",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0B04",
      "report": [
        {
          "at": "0x050B",
          "dt": "0x29",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        },
        {
          "at": "0x0505",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000064"
        },
        {
          "at": "0x0508",
          "dt": "0x21",
          "min": 1,
          "max": 300,
          "change": "0x00000064"
        }
      ]
    }
  ]
}

Like usualy, some value can need to be "corrected" (*10 or / 100 for exemple) just give me the value and the needed convertion.

Idaho947 commented 3 months ago

Power is good. I look at the consumption after a couple of hour.

Edit : think there is an issue for consumption : 50 watt for 30 min and it tell 0,005.

Smanar commented 3 months ago

50 watt during 30 mn give 0.025 KW/h. On your capture we have divisor 100, multiplicator 1.

Honnestly not enought consumption to be sure for me ^^

Can replace

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

by

{
  "name": "state/consumption",
  "read": {
    "at": "0x0000",
    "cl": "0x0702",
    "ep": 1,
    "fn": "zcl:attr"
  },
  "parse": {
    "at": "0x0000",
    "cl": "0x0702",
    "ep": 1,
    "eval": "Item.val = Attr.val *XX"
  },
  "refresh.interval": 300,
  "default": 0
}

With a better convertion than "eval": "Item.val = Attr.val *XX"

Idaho947 commented 3 months ago

What do you mean whith : With a better convertion than "eval": "Item.val = Attr.val *XX" ?

Smanar commented 3 months ago

For exemple "eval": "Item.val = Attr.val * 10"

or

"eval": "Item.val = Attr.val / 10"

According the value you want, but make a test on a longer period first 30mn is not enought for me.

Idaho947 commented 3 months ago

Ok I let it like that one week and see if it's relevant.

Idaho947 commented 2 months ago

Ok everythinks seems OK. You can valid the ddf.

Smanar commented 2 months ago

So without changes ? the same than here > https://github.com/dresden-elektronik/deconz-rest-plugin/issues/7834#issuecomment-2206784102

Idaho947 commented 2 months ago

Yes no change needed

Smanar commented 2 months ago

DDF created https://github.com/dresden-elektronik/deconz-rest-plugin/pull/7855