Shelly integration sign convention clashes with Home assistant

Hi,

I try to use a shelly 3EM to report the solar production on the AC_IN side of my energy storage system to Venus OS. I had the system automatically find the SHelly’s on our network and set the appropriate ones to the correct AC side and defined them as inverters.

It is good to mention that these Shelly’s are also used in Home Assistant to track and store (for data analysis) the energy consumed and generated.

The Shellys are connected and defined in such a way that energy flowing FROM the inverter TO the net is reported as negative. This works fro home assistant and is the default setting for these devices.

However, in VRM in the viltron energy overview screen, when setting the relevant Shellys up as inverter connected to the AC INOPUT side, the solar yield is reported a being negative.

When I define the same Shelly to be an AC LOAD the energy flow has the correct (-) sign, (also Home Assistant correctly interprets the negative sign as a yield).

When I either rotate the CT 180 degrees or flip the input direction on the Shelly side, th power flow is correct in VRM, but of course wrong in Home Assistant.

I would expect the sign convention in VRM to be the same as the sign convention used throughout other instances and certainly wrt the install requirements of the Shelly device setup guide.

When I add the Shelly as an inverter to VRM I can confirm that the power generated is indeed SUBTRACTED from the power generated by my Victron MPPT’s, indicating the sign is incorrect.

Expected solution (please) I understand a chosen convention change would lead to a lot of people already using this integration facing a huge issue so that would likely not work, so I would like to see the option to negate the reported power.

Sidenote: In home assistant one can define a ‘virtual sensor’ that could correct the sign of a wrongly installed Shelly energy meter BUT the energy dashboard used an integrating counter based on the produced energy blocking this solution unfortunately. From the dashboard in VRM view and on my Cerbo it looks like Victron is using power iso energy from the Shelly, so adding n optional minus sign in the setup page for each Shelly would seem like a feasible solution.

Thanks in advance for looking into a solution or giving guidance.

Can you post some screen shots of what you are referring to?

this is the Shelly defined as ‘load’ on the AC input side, correctly showing negative power.

This is the same shelly defined as inverter, still showing negative power (should be positive in this context)