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

POW Elite Energy almost works, just need a slight change #1114

Closed
georgepauna opened this issue Feb 18, 2023 · 16 comments
Closed

POW Elite Energy almost works, just need a slight change #1114

georgepauna opened this issue Feb 18, 2023 · 16 comments
Labels
enhancement New feature or request
Milestone

Comments

@georgepauna
Copy link

georgepauna commented Feb 18, 2023

Hi,

First of all, thanks a lot for this amazing plug-in!
I have a few Sonoff POW Elite POWR320D and one POWR3

I noticed the following:
POWR320D doesn't show energy consumption
POWR3 only shows energy from cloud

But in the debug page, I see those entries that make me believe POWR3xxD energy could work both in local (preferable) and cloud mode:

2023-02-18 23:12:04 [D] 10017faff4 <= Local3 | {'switches': [{'switch': 'on', 'outlet': 0}], 'configure': [{'startup': 'stay', 'outlet': 0}], 'pulses': [{'pulse': 'off', 'switch': 'off', 'outlet': 0, 'width': 500}], 'fwVersion': '1.0.7', 'rssi': -21, 'current': 65, 'voltage': 23183, 'power': 9507, 'dayKwh': 182, 'monthKwh': 4079} | 52891

notice dayKW and monthKwh is received in local mode

Can you please add this info as sensors?

@mrsilva1986
Copy link

Hi, another one here asking if it's possible to add the energy consumption on powr320d. All of the other options and functions work except that. States unknown all the time. 😔 Thanks for your great work.

@AlexxIT AlexxIT added the question Further information is requested label Mar 30, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Mar 30, 2023

Can you attach device diagnostics?

@AlexxIT AlexxIT added the diagnostics Waiting device diagnostics label Mar 30, 2023
@georgepauna
Copy link
Author

georgepauna commented Mar 31, 2023

Here is the relevant part:

      "1001d4ceeb": {
        "uiid": 190,
        "params": {
          "bindInfos": "***",
          "version": 8,
          "demNextFetchTime": 1680213600000,
          "ssid": "***",
          "bssid": "***",
          "fwVersion": "1.0.7",
          "switches": [
            {
              "switch": "on",
              "outlet": 0
            }
          ],
          "configure": [
            {
              "startup": "stay",
              "outlet": 0
            }
          ],
          "pulses": [
            {
              "pulse": "off",
              "switch": "off",
              "outlet": 0,
              "width": 500
            }
          ],
          "rssi": -55,
          "threshold": {
            "actPow": {
              "min": 10,
              "max": 500000
            },
            "voltage": {
              "min": 18500,
              "max": 26400
            },
            "current": {
              "min": 10,
              "max": 2000
            }
          },
          "current": 9,
          "voltage": 22425,
          "power": 1680,
          "uiActive": 60,
          "timeZone": 3,
          "dayKwh": 35,
          "monthKwh": 145,
          "getHoursKwh": {
            "start": 0,
            "end": 743
          }
        },
        "model": "POWR320D",
        "online": true,
        "local": true,
        "localtype": "plug",
        "host": "192.168.1.192:8081"
      },

@georgepauna
Copy link
Author

georgepauna commented Mar 31, 2023

But i noticed the values are weird, they don't match ewelink values for the same device
In diagnostics:
"dayKwh": 35,
"monthKwh": 145,

In ewelink app:
0.16KWh today
1.67KWh current month

I know values are to be divided by 100, but it's not matching at all

Not sure what to believe now

@georgepauna
Copy link
Author

georgepauna commented Mar 31, 2023

Ok, I figured it out. If I reload the integration, in diagnostics I get updated values that match ewelink:

  "1001d4ceeb": {
    "uiid": 190,
    "params": {
      "bindInfos": "***",
      "version": 8,
      "demNextFetchTime": 1680300000000,
      "ssid": "***",
      "bssid": "***",
      "fwVersion": "1.0.7",
      "switches": [
        {
          "switch": "on",
          "outlet": 0
        }
      ],
      "configure": [
        {
          "startup": "stay",
          "outlet": 0
        }
      ],
      "pulses": [
        {
          "pulse": "off",
          "switch": "off",
          "outlet": 0,
          "width": 500
        }
      ],
      "rssi": -55,
      "threshold": {
        "actPow": {
          "min": 10,
          "max": 500000
        },
        "voltage": {
          "min": 18500,
          "max": 26400
        },
        "current": {
          "min": 10,
          "max": 2000
        }
      },
      "current": 9,
      "voltage": 22805,
      "power": 1668,
      "uiActive": 60,
      "timeZone": 3,
      "dayKwh": 16,
      "monthKwh": 167,
      "getHoursKwh": {
        "start": 0,
        "end": 0
      }
    },
    "model": "POWR320D",
    "online": true,
    "local": true,
    "localtype": "plug",
    "host": "192.168.1.192:8081"
  },

@AlexxIT AlexxIT added enhancement New feature or request and removed question Further information is requested diagnostics Waiting device diagnostics labels Mar 31, 2023
@AlexxIT AlexxIT added this to the 3.5.1 milestone Mar 31, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Mar 31, 2023

OK. Thanks. Added to latest master version. Will be in next release

@georgepauna
Copy link
Author

No, no, thank YOU!

@georgepauna
Copy link
Author

I just got master and energy is not showing for my POWR320D, is it only added for POWR316D maybe, or I need to do something?

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 31, 2023

Energy entity is disabled by default. You need to find this entity end enable it.

@georgepauna
Copy link
Author

Wow, it works!
I knew energy was disabled, but the new entities you made are different, so that was not the problem.
Not sure why I couldn't see before, but here is how it looks now:
image
Amazing! Thanks a lot!

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 31, 2023

New entities it's just additional device attributes. So it can be enabled by default.
Power entity it's constant requests to cloud server. So user should enable it manually.

But energy for this device different from all other devices #1129 (comment)

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 31, 2023

@AlexxIT AlexxIT closed this as completed Mar 31, 2023
@georgepauna
Copy link
Author

If possible, looks like there some small change to be made so those can be used in the energy dashboard:

image

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 31, 2023

Do you know where to get it?

@georgepauna
Copy link
Author

To get this error try to add one of the energy entities (day or month) as an individual device when editing the energy dashboard.

I think last_reset should be set to "today at 00:00"... I don't think the device itself provides it... so some code trickery, not just passing info from device. I will confirm tomorrow, when I'll be able to see what time it resets from cloud.

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 31, 2023

I think very important to know exact when device reset this timer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants