AlexxIT / SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
https://github.com/AlexxIT/Blog
MIT License
2.65k stars 412 forks source link

No Energy entity for CK-BL602-SWP1-01(182) by coolkit #1084

Closed nabster82 closed 1 year ago

nabster82 commented 1 year ago

Hi, First, I would like to say how awesome all entities are working ! I am new on HA. I started with Sonoff as first entities.

All my POWR2 are working perfectly with Energy monitoring, but for ewelink outlets (CK-BL602-SWP1-01(182) by coolkit), no energy entity is present in sensor.

image

Is it possible to add energy statistics to this entity ? Thank you.

luca6003 commented 1 year ago

Hi @nabster82 did you solve the problem?

AlexxIT commented 1 year ago

Show device diagnostics

nabster82 commented 1 year ago

Hi @nabster82 did you solve the problem?

Not yet :(

nabster82 commented 1 year ago

Show device diagnostics

Screenshot_20230207_085845_Home Assistant

AlexxIT commented 1 year ago

Device diagnostics is a button on this page. Connection lost is error from your Hass. Not related to integration

nabster82 commented 1 year ago

Below the diagnostics. Sorry for the connection error. I did a quick screenshot with my VPN down :)

{
  "home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2023.1.4",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.10.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Paris",
    "os_name": "Linux",
    "os_version": "5.10.60-qnap",
    "run_as_root": true
  },
  "custom_components": {
    "sonoff": {
      "version": "3.3.1",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "hacs": {
      "version": "1.30.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "google_home": {
      "version": "1.9.15",
      "requirements": [
        "glocaltokens==0.6.8"
      ]
    },
    "pyscript": {
      "version": "1.3.3",
      "requirements": [
        "croniter==1.3.4",
        "watchdog==2.1.6"
      ]
    }
  },
  "integration_manifest": {
    "domain": "sonoff",
    "name": "Sonoff",
    "config_flow": true,
    "documentation": "https://github.com/AlexxIT/SonoffLAN",
    "issue_tracker": "https://github.com/AlexxIT/SonoffLAN/issues",
    "codeowners": [
      "@AlexxIT"
    ],
    "dependencies": [
      "http",
      "zeroconf"
    ],
    "requirements": [
      "pycryptodome>=3.6.6"
    ],
    "version": "3.3.1",
    "iot_class": "local_push",
    "is_built_in": false
  },
  "data": {
    "version": "b20e33c",
    "cloud_auth": true,
    "config": null,
    "options": {
      "mode": "auto",
      "debug": false
    },
    "errors": [],
    "device": {
      "uiid": 182,
      "params": {
        "bindInfos": "***",
        "version": 8,
        "demNextFetchTime": 1675634400000,
        "rssi": -34,
        "fwVersion": "1.0.1",
        "switches": [
          {
            "switch": "on",
            "outlet": 0
          },
          {
            "switch": "off",
            "outlet": 1
          },
          {
            "switch": "off",
            "outlet": 2
          },
          {
            "switch": "off",
            "outlet": 3
          }
        ],
        "pulses": [
          {
            "pulse": "off",
            "switch": "off",
            "width": 1000,
            "outlet": 0
          },
          {
            "pulse": "off",
            "switch": "off",
            "width": 1000,
            "outlet": 1
          },
          {
            "pulse": "off",
            "switch": "off",
            "width": 1000,
            "outlet": 2
          },
          {
            "pulse": "off",
            "switch": "off",
            "width": 1000,
            "outlet": 3
          }
        ],
        "sledOnline": "on",
        "configure": [
          {
            "startup": "on",
            "outlet": 0
          },
          {
            "startup": "off",
            "outlet": 1
          },
          {
            "startup": "off",
            "outlet": 2
          },
          {
            "startup": "off",
            "outlet": 3
          }
        ],
        "timeZone": 1,
        "current": "0.13",
        "voltage": "229.71",
        "power": "5.13",
        "alarmVValue": [
          -1,
          -1
        ],
        "alarmCValue": [
          -1,
          -1
        ],
        "alarmPValue": [
          -1,
          -1
        ],
        "alarmType": "pcv",
        "ssid": "***",
        "bssid": "***",
        "staMac": "***",
        "threshold": {
          "current": {
            "min": 0.1,
            "max": 15
          },
          "voltage": {
            "min": 0.1,
            "max": 240
          },
          "minActPow": {
            "min": 0.1,
            "max": 3500
          },
          "maxActPow": {
            "min": 10,
            "max": 3500
          }
        },
        "uiActive": 180,
        "addr": "0080e88c",
        "hundredDaysKwh": "get",
        "oneKwh": "get"
      },
      "model": "CK-BL602-SWP1-01(182)",
      "online": true,
      "localtype": null,
      "deviceid": "1001d45fe1"
    }
  }
}
edu24x commented 1 year ago

Hi, I join the request and provide diagnoses.

Greetings.

sonoff-571557c22c5f766f4793479bab03adf2-PC-1085df52f25f958a2c4077e9c17bde8c.json.txt config_entry-sonoff-571557c22c5f766f4793479bab03adf2.json.txt

nabster82 commented 1 year ago

Hi, Any news/progress on this topic ? Thanks for your help

nabster82 commented 1 year ago

Hi all, Anyone could figure out how to add energy entity to this device ? @AlexxIT could you please help ? You're our master geek :) Thanks again for all you have already provided..you really rock !

edu24x commented 1 year ago

No updates in release v3.5.0 - 2023-03-30?

Greetings.

AlexxIT commented 1 year ago

Can someone share device with my account? sonofflan@gmail.com

edu24x commented 1 year ago

Can someone share device with my account? sonofflan@gmail.com

Shared!.

photo_2023-03-30_13-34-31

AlexxIT commented 1 year ago

Added to latest master version. You can download it or wait next release

edu24x commented 1 year ago

Added to latest master version. You can download it or wait next release

Perfect!!!

Thank you very much Alex.

Sonoff S40

AlexxIT commented 1 year ago

Remember, it works only via cloud. You can setup local energy using this https://www.home-assistant.io/integrations/integration/

edu24x commented 1 year ago

Yes, that's how I had the sensors declared but in this way we avoid the code.

AlexxIT commented 1 year ago

https://github.com/AlexxIT/SonoffLAN/releases/tag/v3.5.1

nabster82 commented 1 year ago

Thank you so much @AlexxIT !! You did an amazing work. So nice to know that people like you are here to give a hand to community. Thank you !

pasqualehun commented 11 months ago
  • platform: integration source: sensor.sonoff_1001d4622f_power name: Manta unit_prefix: k round: 2

Yes, that's how I had the sensors declared but in this way we avoid the code.

Just one more thing with this: I've got false integral when there was idle period. To solve this you should add method: left to the integration