Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power meter support for WOOLLEY/eWeLink SmartPlug CK-BL702-SWP-01(7020) #7473

Closed
1 task done
larskoenig opened this issue Dec 20, 2023 · 8 comments · Fixed by #7488
Closed
1 task done

Power meter support for WOOLLEY/eWeLink SmartPlug CK-BL702-SWP-01(7020) #7473

larskoenig opened this issue Dec 20, 2023 · 8 comments · Fixed by #7488

Comments

@larskoenig
Copy link

Is there already an existing issue for this?

  • I have searched the existing issues and there is none for my device

Product name

WOOLLEY Zigbee Smart Plug

Manufacturer

eWeLink

Model identifier

CK-BL702-SWP-01(7020)

Device type to add

Sensor

Node info

image

Endpoints and clusters

image

Basic

image

Further relevant clusters

Power Configuration

On/Off

image

Level Control

Color Control

Thermostat

Simple Metering

Electrical Measurement

image

Any other cluster of relevance/interest

@larskoenig
Copy link
Author

On/Off works fine but power metering does not show up. Here's a thread successfully adding support to zigbee2mqtt: Koenkk/zigbee2mqtt#19334

@Smanar
Copy link
Collaborator

Smanar commented Dec 22, 2023

Hello, can try this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "eWeLink",
  "modelid": "CK-BL702-SWP-01(7020)",
  "vendor": "WOOLLEY ",
  "product": "Zigbee Smart Plug",
  "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/alert"
        },
        {
          "name": "state/on",
          "refresh.interval": 360
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_POWER_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0xFC11"
      ],
      "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",
          "read": {
            "at": "0x7006",
            "cl": "0xFC11",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x7006",
            "cl": "0xFC11",
            "ep": 1,
            "eval": "Item.val = Attr.val"
          }
        },
        {
          "name": "state/current",
          "read": {
            "at": "0x7004",
            "cl": "0xFC11",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x7004",
            "cl": "0xFC11",
            "ep": 1,
            "eval": "Item.val = Attr.val"
          }
        },
        {
          "name": "state/voltage",
          "read": {
            "at": "0x7005",
            "cl": "0xFC11",
            "ep": 1,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x7005",
            "cl": "0xFC11",
            "ep": 1,
            "eval": "Item.val = Attr.val"
          }
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0006",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x10",
          "min": 1,
          "max": 300
        }
      ]
    }
  ]
}

You probably need some value convertion.
I haven't set bind/report as Z2M haven't do them, perhaps need it, and no poll too for test, it can be native.

@larskoenig
Copy link
Author

larskoenig commented Dec 22, 2023

Hi! Thanks so much for the DDF. Just tried it and it works! As you said, I had to scale voltage and power by 0.001, but other than that it looks fine. Verified with a smart plug from another vendor and the values are consistent.

@Smanar
Copy link
Collaborator

Smanar commented Dec 23, 2023

Was lucky, If you can make a PR to submit the device officialy ?
Or share the final DDF (with your convertions) for I make it for you.

@larskoenig
Copy link
Author

I've attached the json file with the conversions:
ck-bl702-swp-01(7020).json
What's still missing is power consumption though. I guess it's somehow related to cluster FC57, but I'm not sure how to analyze this further.

@Smanar
Copy link
Collaborator

Smanar commented Dec 24, 2023

From Z2M this device don't support consumption, you have it in description ? Perhaps its just still missing ?

PR done #7488

@larskoenig
Copy link
Author

larskoenig commented Dec 25, 2023 via email

@Smanar
Copy link
Collaborator

Smanar commented Dec 26, 2023

Right, I have read the complete post on Z2M and it seem it's present, but not found yet.
As report are native, you can try to get them in logs.
Can enable deconz log with flag "Info" and "Info_l2", thoses one are easy to understand.
If you see nothing can eanble "ZCL", in this one you will see the request for sure, but not easy to understand.

For me the request need to be a classic reporting on one of the 2 unknow cluster and repetitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants