bramstroker / homeassistant-powercalc

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

WLED Power #1660

Closed milandzuris closed 1 year ago

milandzuris commented 1 year ago

System Health details

*

Checklist

Describe the issue

Hi, for 160mA is not ok 180watts how fix this?

Settings: 5V 0.9Power Factor

image image

Reproduction steps

*

Debug logs

*

Diagnostics dump or YAML config

No response

bramstroker commented 1 year ago

That's strange. Could you please share you YAML configuration or when you use the GUI click the three dots and download diagnostics?

Also please enabled debug logging and share logs after startup.

milandzuris commented 1 year ago

That's strange. Could you please share you YAML configuration or when you use the GUI click the three dots and download diagnostics?

Also please enabled debug logging and share logs after startup.

config_entry-powercalc-83f27abab59cc7c15d8d1e403976a615.json.txt

bramstroker commented 1 year ago

Looking at the supplied JSON seems you have set standby power to 180 yourself for this light. When the light is off powercalc will use that value.

Screenshot 2023-05-06 at 18 40 59
milandzuris commented 1 year ago

I change to 0 and 0.72w i think is same too big or no? image

bramstroker commented 1 year ago

What is too big? Power is shown as 0.72 W now, which is correct 160 mA 5v 0.9 = 0.72 W

kWh will still be high as this only increases. You must reset this sensor. https://homeassistant-powercalc.readthedocs.io/en/latest/energy-sensor.html#resetting-energy-sensor

milandzuris commented 1 year ago

What is too big? Power is shown as 0.72 W now, which is correct 160 mA 5v 0.9 = 0.72 W

kWh will still be high as this only increases. You must reset this sensor. https://homeassistant-powercalc.readthedocs.io/en/latest/energy-sensor.html#resetting-energy-sensor

but this Power and kWh in 5V i need change when im want in 230V?

bramstroker commented 1 year ago

You'll need to input the voltage of your led strip, NOT 230 volt. Your led strips are not connected to 230 volt directly but uses low voltage which is transformed and supplied by your LED power supply. Would typically be 5, 12 or 24 volt.

nepozs commented 1 year ago

In this case correction factor should be used - typical impulse LED power supply has efficiency about 85%, so power multiply factor should be about 1.176 (only if current/voltage/power was measured at low voltage side).

bramstroker commented 1 year ago

@nepozs There is already a setting on WLED for the power factor. It is at 90% by default. No need to hassle with the multiply factor setting.

Screenshot 2023-05-07 at 21 21 11
nepozs commented 1 year ago

Maybe this "power factor" is in reality efficiency (I can't check it now, because my WLED devices use ESP-01 modules and I'm not able to upgrade firmware to more current version having this option, without hardware upgrade to modules with bigger flash…), but in fact efficiency and power factor are completely separate concepts.

So if in WLED "power factor" means efficiency it is worth issue in that project (because it is misleading).

In real life there are NO devices with efficiency 100% (especially the power supplies), but lots of devices with power factor=1 (incandescent bulbs, heaters, generally resistive load).

https://en.wikipedia.org/wiki/Power_factor https://en.wikipedia.org/wiki/Energy_conversion_efficiency

bramstroker commented 1 year ago

@nepozs Maybe good idea to create a discussion post to further discuss this. This configuration is from powercalc not WLED firmware. WLED only provides an "estimated current" sensor. To create a powercalc sensor with that information I introduced the power factor setting. Real power = current * (power_factor / 100)

Think I will do some real world testing to see how close the power estimation is. When this is a little of we might hardcode the loss of power supply efficiency in the formula.