bramstroker / homeassistant-powercalc

Custom component to calculate estimated power consumption of lights and other appliances
MIT License
899 stars 251 forks source link

Recommended smartplugs for measurements #2001

Closed martin-majlis closed 3 months ago

martin-majlis commented 5 months ago

Checklist

Is your feature request related to a problem? Please describe.

I would like to contribute with my measurement of bulbs that I own. However none of the smartplugs that I own is mentioned among recommended ones - https://homeassistant-powercalc.readthedocs.io/en/latest/contributing/measure.html.

Describe the solution you'd like

It would be great if the instructions could contain information how to figure out, whether that smartplug produces reasonable numbers.

Describe alternatives you've considered

This is just suggestion for improving documentation.

Additional context

When I check which plugs have been used, I can see that majority of measurements have been done by the recommended plugs:

find custom_components/powercalc/data -name model.json -exec jq .measure_device {} \; | sort | uniq -c | sort -nr
     92 "Shelly Plug S"
     41 "Shelly 1PM"
     31 null
     25 "TP-Link Tapo P110"
     20 "Zhurui PR10-D"
     20 "TP-Link Kasa HS110"
     15 "TP-Link Kasa KP115"
     10 "Shelly Plug"
     10 "Gosund SP111 on Tasmota 9.5.0"
      9 "Shelly Plus Plug S"
      9 "Shelly Plus 1PM"
      7 "TP-Link Kasa KP115(US)"
      7 "Shelly, Plus1PM"
      6 "Tapo P110"
      5 "Sonoff S31"
      4 "Shelly Plus Plug S / AVM FRITZ!DECT 200"
      4 "Nous A1T"
      4 "Fibaro FGW102"
      3 "ZOOZ Z-WAVE PLUS S2 POWER STRIP ZEN20 VER. 3.0"
      3 "TP-Link Smart Wi-Fi Plug Mini"
      3 "TP-Link Kasa KP125"
      3 "Sonoff S31 running Tasmota"
      3 "SONOFF S31"
      3 "Shelly Plug US"
      3 "PeakTech P 4250 (1 mV/10 mA) with VOLTCRAFT VC270"
      3 "Nous A1 with TASMOTA 9.5.0"
      3 "Kasa KP115"
      3 "Gosuna Smart Plug UP111 (via tuya)"
      3 "AVM FRITZ!DECT 200"
      2 "Zhurui PR10"
      2 "unknown"
      2 "TP-Link Tapo P115"
      2 "Shelly Plus 1 PM"
      2 "Shelly 2 PM"
      2 "Shelly, 1PM"
      2 "See linked profile"
      2 "RRPM02 (Model); 4897037690801 (Barcode); Reduction Revolution Plug-in Power Meter"
      2 "Meross mss315"
      2 "Kasa EP25"
      2 "HOPI HP-9800"
      2 "Gosund, UP111 (ESPHome)"
      2 "Gosund, UP111"
      2 "Fibaro FGWP102"
      2 "Athom Smart Plug v2"
      1 "Zooz Z-Wave Plus Power Switch ZEN15"
      1 "Wemo Insight F7C029uk"
      1 "Tuya"
      1 "TP-Link, P110"
      1 "TP-Link HS110"
      1 "Sonoff DualR3"
      1 "Shelly, PlusPlugS"
      1 "Shelly PlusPlugS"
      1 "Shelly, Plug E (gen1)"
      1 "Shelly Plug E"
      1 "Shelly 3EM"
      1 "Shelly 2.5"
      1 "PZEM-004T"
      1 "Power-Mate Lite"
      1 "P3 P4400 Kill A Watt Usage Monitor"
      1 "NOUS A1Z"
      1 "NOUS A1T with ESPHome 2023.12.5"
      1 "NOUS A1T with ESPHome 2023.11.6"
      1 "NOUS A1T with ESPHome 2023.10.3"
      1 "GreenWave - GWPN1"
      1 "Gosund SP1 Tasmota"
      1 "Gosund SP111 with Tasmota"
      1 "Centralite 3200-Sgb"
      1 "Brennenstuhl PM 231 E"
      1 "Aqara Smart Plug EU (SP-EUC01)"
bramstroker commented 5 months ago

I would suggest to try measurements for some light and see if it outputs reasonable figures. I think most smart plugs use similar circuits and components anyway.

Look if the are not much strange outliers, and the power has an ascending pattern. Also the W measured on full brightness should be close to the reported W rating of the light by the manufacturer. Lowest W reading on standby and lowest brightness level should be ~0.2-0.3W for zigbee/zwave lights. ~0.5-1W for Wifi lights. You can visualize the resulting CSV in www.csvplot.com

martin-majlis commented 5 months ago

@bramstroker : Thanks for your response. :)

I have bought Tapo P110. When I compare it with IMMAX NEO LITE Smart Plug, I can see that:

But when I try to add Tapo P100 to the home assistant, it's not among the supported devices in the tplink integration - https://www.home-assistant.io/integrations/tplink/ and therefore it's not found.

When I try the kasa library:

kasa discover --show-unsupported
Discovering devices on 255.255.255.255 for 3 seconds
Found unsupported device (tapo/unknown encryption): {'result': {'device_id': 'd144f079f57cb17f2f807520668ab391', 'owner': 'FBC1518C3B7094D6151EF74A45078FE3', 'device_type': 'SMART.TAPOPLUG', 'device_model': 'P110(FR)', 'ip': '192.168.1.76', 'mac': '50-91-E3-BE-0C-F8', 'is_support_iot_cloud': True, 'obd_src': 'tplink', 'factory_default': False, 'mgt_encrypt_schm': {'is_support_https': False, 'encrypt_type': 'KLAP', 'http_port': 80, 'lv': 2}}, 'error_code': 0}

Found 0 devices
Found 1 unsupported devices

I can indeed see, that it's not supported. So to be able to use it, I should first capture the network traffic and add it among the supported devices - https://github.com/python-kasa/python-kasa?tab=readme-ov-file#analyzing-network-captures.

It's not clear to me, how that plug could be used for providing measurements.

bramstroker commented 5 months ago

I don't know the TP-Link firmware / ecosystem exactly and don't have plug myself.

When it's not supported by HA there would be a good reason.

The Kasa option for the measure tool has been provided by another user, and probably only works for plugs with Kasa firmware, which would be different protocol than the Tapo.

Did you see this custom integration: https://github.com/petretiandrea/home-assistant-tapo-p100

martin-majlis commented 5 months ago

I had finally some time to install the https://github.com/petretiandrea/home-assistant-tapo-p100.

image

In the applications, that are provided by those plugs, it's not possible to tell, which one is more precise. However in the HA, I can see, that the IMMAX plug is not showing any change even when the red light is on.

So the instruction, how to recognize supported plug, should mention, that the smart plug should not report power as a flat line in the home assistant.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 3 months ago

This issue was closed because it has been stalled for 5 days with no activity.