How to get separately input and output energy from a Shelly device?

I'm going to buy few Shelly devices to monitor energy production from solar panels and, for other devices, energy input and output from a home battery.

It seems however that the Shelly devices do not account separately for production and consumption, simply put them together and the energy sensor goes up and down.

  1. is this common to all Shelly energy monitoring devices? if not, which ones provide separate entities?
  2. if yes, would it be reliable to integrate each reading semparately into two helper entities, or would the calculation be hopelessly inaccurate due to the short integration period? I guess the accuracy of the internal electronics is higher than reported.

The easiest way would be to use the tariff feature of the utility meter helper/integration.

When the power sensor is negative then record the energy to a power out tariff, when positive to an energy in tariff. See here for more detail: How to use Utility Meter Tariffs to conditionally measure things

First of all, thanks for the quick reply.

To be clear, I'm not interested in the money paid/earned, I only care about accurate energy measurement, especially for the home battery (the other devices only go one way): I want to know how much energy goes into the battery and how much is released.

Ok the battery won't invert the operating mode from a second to the next, but potentially it will switch every few seconds, and I want to measure separately the two flows.
Maybe the only way is to use a derivative sensor for the neergy/kWh sensor, so that it sums only the changes in the direction I care about.

Also, do you know how frequently the Shelly provides readings? it's not clear from the documentation I found so far.

That's good because I did not mention money, only energy. I told you the easiest way to do what you want to. Measure the in and out energy separately.

2 Likes

I found that openenergymonitor.org has an excellent energy monitoring system (I now have two). These guys are really smart and dedicated which results in a product you want. Open source and non-cloud. Not cheap but good value.

Good documentation and support.

And, of course, your data can be fed into HA.