Monitor your solar PV system in Home Assistant

some video tutorials about this topic
Monitor your solar pv system in Home Assistant
How do add a 3 phase energy meter into the Energy management of Home Assistant

1 Like

Great topic!!! @iammeter thank you!!!

1 Like

love it, any thanks

1 Like

Is it possible to achieve something similar with 3 Shelly EM instread of the iammeter solution, right?

Although I work for IAMMETER ,as the words described in this topic
Please note: the solution has nothing to do with a specific brand energy meter, any meter that can report such parameters to HA will be OK.

No matter which brand of the energy meter,
The key to this solution is to get these five parameters
inverter output power(w)
inverter yield energy(kwh)
feed in power(w)
import energy from grid(kwh)
export energy to grid(kwh)

Each energy meter can report power and energy
But if you have solar inverter output, the grid power will be bi-directional,it may export energy to the grid (yield energy) or import energy from the grid(consumption energy).
So you need a bi-directional energy meter to be installed in grid side.
I think this is the only special requirement for the energy meter.

yes the shelly em3 works perfectly for this use case.
it reports both with different sensors.
used and returned

1 Like

Yes, besides using of a bi-directional energy meter,use two energy meters is also OK(one for import energy while another for export energy)

1 Like

IAMMETE energy meter begins to support Modbus/TCP from the latest firmware upgrading. You can integrate them into Home assistant with a third-party component(Modbus/TCP)
Video tutorial: Integrate a three-phase energy meter into Home assistant by Modbus TCP (over Wi-Fi) - YouTube

Register map of the Modbus
https://www.iammeter.com/newsshow/news-modbus-tcp-energy-meter

By the way, I know that the IAMMETER energy meter had been integrated into Home Assistant, you can use it directly and do not need to consider the third party component when you use it in Home Assitant.
We just use the Home Assistant to show the Modbus/TCP feature of the IAMEMTER energy meter.

Use the 3 phase Wi-Fi energy meter the way you liked(Home assistant,Openhab,NodeRed,Private server etc…)

I have also a brand new solar system and would like to monitor the power coming from the grid or sold to the grid. I have Frient pulse energy monitoring system. It worked perfectly previously. But now it reports the power/energy passed through without the direction.

I have been looking e.g. at Shelly EM3, but its operating temperature is 0…40 C and I am living in North. And the cabinet is a metallic one making wifi connections problematic.

As a cheap solution I started to think about detecting the direction from the changes. Before I start to learn how to do it and test it, I would like to ask whether anyone sees any major problems.

I’ve two reliable real time sensors:

  • Solar power: power that my panels are producing
  • Grid power: power coming to my house or going out, direction is unknown

I want to calculate two sensors:

  • Power to grid: power delivered/sold to the grid
  • Power from grid: power bought from the grid
  • One is always zero and the other one is non-zero, which one is depending on the direction
  • Bought/sold energy is calculated from these using Riemann method

Since solar power is constantly changing and used power is more static, the idea is to check how these are changing from the previous values as follows:

  • If Grid power > Solar power then
    • Power to grid = 0
    • Power from grid = Grid power
  • Else if previous Solar power < Solar power and previous Grid power > Grid power then
    • Power to grid = 0
    • Power from grid = Grid power
  • Else if previous Solar power > Solar power and previous Grid power < Grid power then
    • Power to grid = 0
    • Power from grid = Grid power
  • Else
    • Power to grid = Grid power
    • Power from grid = 0

That is, if the sensors are changing to opposite directions, I am still using energy from the grid.
I realize that this logic does not work when both Solar power and used power in the house change much, but I feel that this would work e.g. 95 % time, which would be perfectly ok for me.

I started to analyze this by implementing statistics sensors (sampling size: 2). The main problem is that the values changes do not happen in sync perhaps due to different delays in the value updates.

1 Like

Nice dashboards and visualizations :sunglasses:
Now the next step is to optimize your home energy flow >> EMHASS !!!

New updates:

Summary: How to use IAMMETER`s energy meter in Home assistant

After IAMMETER supports modbus/tcp, you can use the Modbus/TCP sensor in Home Assistant to read the data from the Wi-Fi energy meter of IAMMETER.
It means the data can be requested more faster than the IAMMETER integration.
When you want to use the energy meter`s data as a feedback value in a control loop(Ex: control the battery charge or discharge), this fast response option will be a better choice.

The most advantage of Modbus/tcp sensor in Home Assistant is it supports requesting the data every 1 second, which can be used as a real-time sensor feedback value in a control loop. The 1-second sample interval makes it can be used in many interesting things.

Request the data of energy meter in Home Assistant(modbus/tcp), trigger the Sonoff in realtime

A better solution is to use a meter that pushes an update to Home Assistant only when there is a significant change (local push). This way you are not flooding your network with unnecessary traffic.

1 Like

Now, there are three ways to integrate the Wi-Fi energy meter of IAMMETER into Home Assistant.

1 IAMMETER@Home Assistant integration
2 Use the modebus/tcp sensor in Home Assistant
3 USE the MQTT sensor

Can you advise the process for Modbus - and provide the Modbus map for the unit ?

Can i use Node Red to query this every second through modbus and then feed to Home Assistant

Craig

Hi
Do you mean you want to request the data by modbus/rtu from RS485?

I recommend to use the modbus/tcp ,not modbus/rtu
This is the register map of the modbus/tcp
https://www.iammeter.com/newsshow/news-modbus-tcp-energy-meter
This is about how to integrate the energy meter by modbus/tcp sensor

Thanks for the quick response.

No i am happy with modbus/TCP thanks - i just wanted to see what a query would look like to your unit i.e. could i make a single query to return all registers every second and then parse them on my end - or do i need to request each individual register ?

I like the unit - just gets a little expensive to replace my main IOTAWATT for my Solar monitoring as i will need two of the units - however i may look at a single unit to help me with my batteries Zero out the grid

Craig

Hi:

Of course, you can query all registers (just need to change the register length in the polling command) every second, no need to query the registers one by one.
There is a total tutorial about how to use the modbus/tcp sensor in the home assistant to read the data of the Wi-Fi energy meter in the above post.