Powercalc - Virtual power sensors

Hi, is there any way how I can remove all traces of the generated group sensors out of HA? I would like to start from scratch because I think I found a way how I can reset the shellys (maybe).
Only way I found was to rename the groups but than I have still the old group sensors which can’t be deleted.

Thanks!

Hi, I would like to measure the Philips Hue Surimu panel. I have two questions about it.

  1. Which power plug should I use?
    I tried the Gosund EP2 (not Tasmota) and the script stopped right at the beginning with an error message. The plug was not able to measure the standby power - the value was 0.0 all the time.

  2. What color modes should I use in the script?
    Supported_color_modes: color_temp, xy

You could reset the grouped energy sensor with the reset service powercalc provides. See the readme.
If you want to remove a group completely I think you also have to remove entry from config/.storage/core.restore_state

That worked and is what I did before but the problem is that the groups still stay in the history. If I than add the groups back I get the old history data.

I have good experience with the Shelly Plug S. Also a lot of contributions were done with TP-Link Kasa HS110.

You’ll have to provide LUT’s for color_temp and hs.

I think the only way is to clear that in the database using an SQL client. statistics table and states table. When you search the forum you can find more information how to do that.

Thank you. Will have a look into that

I have Powercalc working now for a few days and must say I’m impressed with the integration of the attributes in the light sensors and the ease of use.
For me Powercalc does all the magic without any configuration of lights and such.
I only added the “all lights” option through the domain inclusion.

Now I would like to add the Utility Meter as well but it says all entities will get a Utility Meter.
Just doing this for the “all lights” sensor would be sufficient, can this be done?

You can just create the utility meter with the HA helpers. “Settings” → “Devices & Services” → “Helpers” → “Create Helper”

Hi, I’m a bit confused.
When creating a group from the UI, there is an option to create utility meters, but it doesn’t, only power is created.

I have no problem in adding one myself from helpers, but then maybe the option shouldn’t be in the UI?

thanks for a great integration!

Did you also include energy sensors in your group, because only with power sensors it will not work correctly yet, because the utility meters use energy sensor as a source.

Imagine your have a powercalc virtual sensor setup for your light.bathroom then powercalc will create two sensors sensor.bathroom_power (in Watt) and sensor.bathroom_energy (in kWh). Currently when you setup a group for example “Bathroom” you’ll have to select the power sensor at power sensors, and the energy sensor at energy sensors.

I will see if I can make it possible to automatically include the energy sensor for power sensors created with powercalc, so you don’t have to do any double selection. But currently this is limited.

Ah, no only include power sensors, I guess I thougt it worked the same way as when you create a virtual sensor.

Of course it would be perfect if it was included automatically, but a note in the UI and docs would go a long way.

1 Like

And I might be a bit thick sometimes :slight_smile: but this about running the script for making LUT-files.

What plugs can you use to measure? I have z-wave and zigbee plugs that measure energy, can you use those?

I guess I don’t quite understand how the script will connect to the values coming from the sensors since as I understand you will install the script on another computer than the one running homeassistant.

You could use a z-wave or zigbee smartplug, but you must test if it works correctly. Some smartplugs only report a new value occassionaly, so you have to make sure it is reported as often as possible. Unfortunately there is no way to force the update using the HA rest API.

The measure tool uses the HA API te read your smartplug and control the connected light (brightness, colortemp etc). For shelly, kasa, tuya we also have a native API implementation which you can use for the powermeter for even lower latency.

Yes you have to run this on another computer. Easiest way is to run with docker, as all the needed dependencies are setup already and things should be plug and play.
See Contributing new lights · bramstroker/homeassistant-powercalc Wiki · GitHub and homeassistant-powercalc/utils/measure at master · bramstroker/homeassistant-powercalc · GitHub.

Hope this helps a bit.

Forgive me if this is somewhere in this topic already (it’s really long). I just discovered this and already love it! I wanted to add my Sonos devices (and other devices) and saw a good description on how to add media_players. The one thing I ran into however is, finding out the actual power use of my Sonos devices. I found an article about the idle power-use, but not when playing. I was curious if someone already did this and know them, or if I just am really bad at using google, or don’t understand how to read the spec’s on the Sonos website.

I for example found a website for my LG tv that down to the exact model number gave me the power consumption rate when on. Looking for something similar for Sonos.
I’m not really in the luxury position that I have a lot of devices to measure power with (infact I have none), that’s why I was happy to see this custom component!

I wonder that this fits for every video source, brightness, kind of media, volume of sound, etc.

But here are my own measurements for my Sonos devices, with my preferred average volume:

Play3 = 4,2 idle, 5,4 playing
One = 3,2 idle, 5,7 playing
(old) Amp = 7,5 idle, 15 playing

2 Likes

I have some fibaro z-wave plugs that can report every second (and yes, it does ) and 0,1 W difference.

Ah then I think you could use that one

You are probably right the power consumption differs based on volumne, etc. At least it’s a guideline that’s better then nothing.

Thanks for the Sonos devices you monitored! From your answer I presume that things like volume do matter? In the example of the PowerCalc I even saw the source could matter or that pauzes vs idle could matter (and Sonos used as an example). Do you have any experience with that?

Perhaps I should get something to monitor powerusage and just slowly start monitoring to enter these details. Open to any suggestions/advice.

Hello, anyone doing manual setting for tasmota devices like switches, dimmers, or bulbs? Thanks