bramstroker / homeassistant-powercalc

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

WLED Voltage #1210

Closed milandzuris closed 1 year ago

milandzuris commented 1 year ago

Im updated powercalc and once again same problem with current

image

bramstroker commented 1 year ago

Hmm, unfortunate it's still not solved for you.

Did you also check in the error logs if it's still the same error about estimated current entity? Because I also see you have put in voltage 0, which is obviously not correct. Should be 5v, 12v or whatever your LED is rated.

When it is indeed still complaining about the estimated current entity please provide the following information. Could you have a look into config/.storage/core.entity_registry and share the json data of both the light entity and the current entity of the WLED device in question?

milandzuris commented 1 year ago

Log:

This error originated from a custom integration.

Logger: custom_components.powercalc.config_flow Source: custom_components/powercalc/config_flow.py:364 Integration: Powercalc (documentation, issues) First occurred: 21:55:56 (3 occurrences) Last logged: 21:57:46

{No estimated current entity found

  {
    "area_id": null,
    "capabilities": {
      "state_class": "measurement"
    },
    "config_entry_id": "011d8edfdeedc52ca90035879ca3febe",
    "device_class": null,
    "device_id": "81b0d929d95055e78e6c5b8db95bafba",
    "disabled_by": null,
    "entity_category": "diagnostic",
    "entity_id": "sensor.kitchen_lightstrip_current",
    "hidden_by": null,
    "icon": "mdi:current-ac",
    "id": "4a20d9844cd524d7e19548c3120e5879",
    "has_entity_name": true,
    "name": "Kitchen Lightstrip Current",
    "options": {},
    "original_device_class": "current",
    "original_icon": null,
    "original_name": "Estimated current",
    "platform": "wled",
    "supported_features": 0,
    "unique_id": "8caab57b2097_estimated_current",
    "unit_of_measurement": "mA"
  },
bramstroker commented 1 year ago

I see device_class is empty for your entity, but original_device_class has the correct value. I only check for device_class currently, will also add original_device_class to that.

bramstroker commented 1 year ago

Fixed with #1211 Are you able to test by installing the latest master branch version?

milandzuris commented 1 year ago

say me how install, and im make it.

bramstroker commented 1 year ago

You can just click "redownload" in HACS and select the master branch from the dropdown. You may have to check "beta versions"

milandzuris commented 1 year ago

image Working, i think 15W is many Watts when lightstrip is turned off

bramstroker commented 1 year ago

Yes that's far too much, should be < 1 W What did you set as "Voltage" and what value does the current sensor have?

milandzuris commented 1 year ago

5V and 0.9

bramstroker commented 1 year ago

5V and 0.9

With the current sensor I mean the estimated current sensor which WLED integration exposes.

milandzuris commented 1 year ago

160mA

bramstroker commented 1 year ago

The power meter should read 160 / 1000 5 0.9 = 0.72W

Please enable debug logging for powercalc and than play around with the WLED device. toggle it on, set another color, turn it off. You should see log lines starting with "Estimated current" and that should give you some more clues hopefully.

And you did not set a standby_power during setup, right?

milandzuris commented 1 year ago

standby power i did not set maybe here is this problem?

bramstroker commented 1 year ago

No you don't have to set that. It should calculate the value by looking at the estimated current entity. Please enable debug logging than you'll quickly notice what the problem is.

bramstroker commented 1 year ago

@milandzuris were you able to find something in the debug logs?

SandDeath commented 1 year ago

I checked on my installation, everything works correctly with the master version, can I expect this fix? Or is it already included in version 1.1.2?

bramstroker commented 1 year ago

@SandDeath Thanks. This was already released in recent version, so it's also in 1.1.2

SandDeath commented 1 year ago

May I ask a question? if 2 strips 100 diodes long are connected in parallel to my wled platform, does wled count them as one strip? if so is it possible to add the ability to multiply the number of tapes?

bramstroker commented 1 year ago

I don't know exactly how WLED calculates the current (which I use). But I assume it just has a lookup table with current per individual LED depending on type (i.e. SMD5050) and it multiplies this by the amount of LED's you specified in WLED configuration. But when you want to know exactly you can better ask this at WLED discord or check the source code.

SandDeath commented 1 year ago

I understand you, I will ask this in the WLED thread, and if this is true, will it be possible for Powercalc to add the ability to specify the number of tape segments? this would be useful if the tapes are not connected in series one after another, but in parallel, and in the wled settings there is a length of 1 segment

bramstroker commented 1 year ago

You already have the multiple_factor option in powercalc. Both in the GUI and YAML which allows you to define a multiplication factor.

manuel-rw commented 1 year ago

I had the same issue. The mentioned property in the config file was null. I noticed, that one working instance had 24 entities, while the not working ones had 22. For me, the following was the fix:

  1. Delete the WLED instance in Home Assistant
  2. Go to the WLED setting, open LED settings
  3. Enable current limitation and set limit to power supply amps
  4. Turn light on and wait for a few seconds
  5. A Go back to Home Assistant, open the WLED integration
  6. Add the device again and enter the IP
  7. Add the device for powercalc.

The cause might be, if you set up your devices up in HASS, when you didn't had current estimation on.