Powercalc - Virtual power sensors

I measured a lot and saw neither any difference between paused and idle nor big between different sources and not that much between different volume levels. In the end, I took the volume I’m using most of the time.

1 Like

Here I am again :slight_smile:

Have been doing some readings and so far so good…

But when I started to do the reading for hs on one of my bulbs is says estimated time left 279.0h!!!

Using the standard values in .env
Measuring from HASS with z-wave-plug.

That is, hm, quite some time . Is it due to using a meter via HASS or any other ideas on how to speed it up.

Tried the manual mode for the reader and that got it down to 94h. Still a tad more time than I am willing to spend :wink:

That’s not right. hs mode should take approx 1.5h with the default settings.
Could you create an issue on github please? Also include the output of the CLI from the start.

I cant get this to work with my synology server…

I dont have a entity

(only have a switch, device and ping entity)

Did you setup a power sensor yourself using YAML or config flow?
When you have some lights which are on the supported model list and you want to have them automatically added to powercalc as power sensor you’ll need the following in the configuration.yaml which is also in the readme.

powercalc:

Also check the logs for errors and read the readme install instructions thoroughly.

Done, I hope, GitHub was not on my side today…

Or I do something wrong but my yeelight doesn`t pop up as a power sensor. Have a hue and that one works great.
In the config I have the following:

sensor:
  # Sensor voor Powercalc
  - platform: powercalc
    entity_id: light.yeelight_stripe
    #manufacturer: yeelight
    #model: YLDD05YL

Why isnt it pop up after restart? And dont see any errors in the log. have the config:

# Logging activeren
logger:
  default: warning
  logs:
    custom_components.powercalc: debug

These Yeelight lights have multiple sub profiles. Depending on length of the light. You’ll need to select the right one. homeassistant-powercalc/custom_components/powercalc/data/yeelight/YLDD05YL at master · bramstroker/homeassistant-powercalc · GitHub

Also see the last example here https://github.com/bramstroker/homeassistant-powercalc#lut-mode.

So your config must look like:

sensor:
  # Sensor voor Powercalc
  - platform: powercalc
    entity_id: light.yeelight_stripe
    manufacturer: yeelight
    model: YLDD05YL/extension_0

Or you can setup using the GUI flow if you’d like. Settings → Devices & Entities → Add Integration

Have no Idea why but the yeelight power doesn`t come up. I have a vacuum S5 and added that one too succesfull so it works for that matter.

But why not the Yeelight??
What if the modelnumber is not the same, could that be an issue. Just like I said it is a YLDD05YL but in real it`s a YLDD04YL could that be the problem? I assume it only gets a wrong energie?

Could be an issue if the supported_color_modes are not the same.
You should find errors in the logs than. At least there should be multiple log lines for the yeelight entity when you have debug logging enabled.

1 Like

Yes thats the problem found it:

2022-08-19 17:49:05.838 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.yeelight_stripe: Error setting up calculation strategy: No lookup file found for mode: color_temp

So that would be custom by template. Thank you for the help.

Yes, you can use linear mode for now. Or have a look into how to measure and contribute yourself. Contributing new lights · bramstroker/homeassistant-powercalc Wiki · GitHub

1 Like

I installed Powercalc recently and been adding stuff, but it seems for some reason when I reboot it adds up something to the daily sensor. I think I checked all configurations but this is insane and obviously incorrect, nobody uses 600kWh in ~2hrs.

What is the history of the power sensor? What of the energy sensor?

And double-check, if you want to switch to left in energy_integration_method. See documentation on powercalc and HA website.

1 Like

Thanks for your reply, below is the charts for energy, the nearly horizontal line is the current usage as it should, with a slow incline because most of the appliances were off untill my wife started doing the laundry. You cant really see the line going up due to the dips and daily usage messing up the scale but I checked the numbers. It also doesn’t like up with the kWh on reboot as you can see by the different step sizes it makes.

It also doesn’t match the usage from the Energy dashboard, which to me seems correct (Sorry for the Dutch appliance names)

Hm. Can you share, how you use/set-up powercalc for this device?

Had to zoom out a bit to get it in one screenshot, hope you can read. It’s 3 plugs and a virtual power sensor for my fridge. It also doesn’t make sense to me why on reboot.

When you have problems with the utility meters I suggest to first focus on the energy meters (kWh) to see if these show the correct figures.
In your screenshot above you included the power sensor, not the energy sensor.

Because power (W sensors) integrates to energy using the riemann integral sensor. Except for the grouped energy sensors, powercalc just sums all of the individual energy sensors to calculate the group state.

Than this energy sensor is used to calculate daily/hourly consumption using the [Utility Meter - Home Assistant](utility meter) integration. The utility meters do not have to use or know anything about the power sensor, only the energy sensor matters.

These are both core HA integrations. Powercalc has just some logic to create these dynamically from the powercalc integration.

Also, which version of powercalc are you using?

Not sure why you think my screenshots don’t include energy sensors because to my knowledge they do.
I checked all individual energy sensors and they do seem correct in their own, aside from the total from all appliances I’ve been referring to, as shown in below screenshot. There’s no way yesterday I used ~680kWh.

As it is configured now I just added a Powercalc sensor with all plugs and a virtual power sensor. I did the same for my lights. Which do add up correctly it seems. So the only thing different would be the fridge, but that also seems correct to me if I check it.

What would be the ideal solution to adding a total sensor for all appliances and having it work correctly? Also yesterday I was running 0.24.8, today I updated to 0.25.0.

I was interested in the “Alle huishoudelijk energy” graph, which you didn’t share before, only the power graph.

I think you have a similar bug as reported here:

Everytime the energy sensor goes from 150 to apparently 0 and 150 again the utility meter will see this as a change and will add that to the total for this day. The energy sensor should only briefly go to unavailable during startup, which should not cause this issue. But in your case I suspect it is going to 0.

I suggest you to create an issue on github where we can investigate this further. Would help to have insights in the state history of the device. You can get these from the DB, but not sure if you are proficient to retrieve those. It’s in the states table.
Also I will see if I can add some additional debug logging which can help finding the root cause.