Home Energy Management in 2021.8

Oh, you speak italian, nice, or it’s just a translation tool? :slight_smile:
Always at the drawing board, more time you spend there, to understand how things work, the better your integrations/automations will be. You never stop going to the drawing board with HA, there’s always room for improvement. :slight_smile:

If you carefully read my last post, I told you how autoconsumtpion (“solar to house” as you call it) is calculated from import/export/production sensors. :slight_smile:

If you see 0 autoconsumption, it means there’s something wrong with those sensors used to calculate it.

buon giorno, Alessandro.
My wife is Italian. But have to confess that my Italian could be much better. I would survive by ordering food and coffee. And btw. i did stop drinking Latte Macchiato in the afternoon … haha.

You are right. Do things right otherwise you do them twice. And here i am.
So let me cleanup my sensors and entities and give them understandable names.
Power (W), calculated Energy (kWh) then i can move them together into the ones which i need for consumption and production.

I copied the e3dc stuff out from another topic here on HA. But i should have renamed them to get a better understanding. My bad. my cleanup…
Keep fingers crossed!
cheers A.

Have to say that this was a challenge… Especially to strike out negative values for the solar return to grid calculation.
Now it does look better. Have to monitor it the next days.

1 Like

it’s a “strange” thing to do during meals…we often see tourists doing that in Italy and we joke a little about it. your wife gave you a good advice. :slight_smile:

if you don’t focus a little on the theory behind things, you risk redoing it 20 times…when I started with HA I immediately noticed the trial&error approach was not the proper way to do things. :slight_smile:

Good approach. Scratch everything, and concentrate on one sensor at a time…if every sensor give you proper values (double check the values with something else, the meter, etc.) the end result in the energy integration will be ok.

don’t worry, it’s common practice, but never expect that copying and everything automagically works is always effective. every installation is different, you can copy and adapt things when you fully understand the theory behind it. :slight_smile:

aaahhhhh… what tha …
Where does this now come from?


Energy from the Grid should go into the House.
But here it does look like it went into the Battery…

Grid Tab should be OK with Positive (import) and Solar back to Grip (export).
Solar Panel is single value.
Battery has two entries. Charge and DIscharge.

The E3DC Box does not charge from Grid. Would not make sense.

I cannot explain this. Do you have me tip?

Hello, I’ve read all the thread posts, and for what I’ve read my ShellyEm power meter should work out of the box with the official Shelly integration in the new Energy panel, but, apart for the Lovelace UI where it show up and work without problem, and all the measurement are ok (power, energy in Kwh, current and so on) I’ve no luck in add the Shelly Em in the Energy panel, with the same response: no source in the dropbox menu!
All the entity sensors are ok, as usual for the Shelly Em, don’t have modified or add nothing in configuration, nor sensors template, but NOTHING show up as source in the dropbox menu of Energy panel. What was wrong?
Max

I don’t see the flow diagram, so don’t know if that 11.68 value comes from Solar production or what…you cut the screenshot.

Ciao Massimo,

Shelly official integration provides all the necessary attributes needed for the Energy Integration. I have several of them.

First thing: did you check the attributes of the Shelly EM entity? Use dev tools to check, here’s one of my EMs:

As you can see, that sensor appears in the listbox of energy integration because it has state_class, device_class and unit_of_measurement properly configured.

So post a screenshot of dev tools for the sensor, so we can check what are its attributes.

Many thanks Alex for your reply, as show my sensor’s state are equal to your, but don’t show up in Energy panel dropbox as you show:

Any hints?

It’s impossible. What version of HA are you using? Is there something in the log? Errors, warnings, etc.

Go in dev tools-> statistics, tell me what you see there.

image

@Max1963
Not sure if this might help. I had to enable the last reset. device class should be set to energy which you have done.
I did set this general setting into the customize_glob entry.

# Home Assistant customization for Energy Sensors
homeassistant:
  customize_glob: !include customize_global.yaml
# General customization for energy sensors
# Set class to energy and enable statistic
"sensor.*_energy":
   last_reset: '1970-01-01T00:00:00+00:00'
   device_class: energy
   state_class: measurement

# General customization for power sensors
# Set class to power and enable statistic
"sensor.*_power":
   last_reset: '1970-01-01T00:00:00+00:00'
   device_class: power
   state_class: measurement

Salve @alexdelprete
mea maxima culpa! the Peak shows the battery positive power which is usually the action when the solar charges the battery. Totally weird and i do have no explanation for it. Kind of curious as well.

Here is the flow:

And here is the sensor… it suddenly peaked up.
2021-11-15_19-20-22

This is how it should happen. From the solar to the battery.
2021-11-15_19-21-24

HA core-2021.10.6; no error or warnings; no problem related to ShellyEM sensors also in statistic.

Many thanks ArminF, but as Alex wrote seem that ShellyEm doesn’t need modify to custon configuration… but I’ll try anyway your tip.

last_reset is generally not used anymore since HA 2021.9, unless you have a specific requirement. what state_class are you using? if it’s a sensor that can increase and decrase then it has to be used, together with state_class: total. He uses a Shelly EM, the energy sensor always increases, so he doesn’t need last_reset.

No need for last_reset, the Shelly EM energy sensor is always increasing, it doesn’t reset to zero:

Do you have a specific configuration for recorder? Did you filter out something?

The pink line in the energy flow goes from solar to battery, so it looks ok. I don’t understand why you say it comes from grid…

Max, open the sensor and show me the history, like this:

image

Good advice Alex, no history there, I’ve exclude sensors in the recorder as they broken my last two SD card for too much records written… so this could be the problem! Is there a method to select what sensor data collect and what don’t record?

yes, from the color the line looks like it does come from the solar panels to the battery.
But we did not had much sun here in Switzerland the last few days and my SoC on the battery shows 0%.

This peak where it suddenly raised up this morning 9 am . Could it be a maintenance and then the server found data for the sensor? A restart?

But still should it show more than the solar production shows?
am i able to reset these values?