Home Assistant PVOutput Problem Data Send

Good morning everyone.
I thought I had solved the problem (in part), but instead another very strange one has arisen.
I made several changes to the file and they all reported the same result, so I can’t find the problem…
Situation:

  • if I withdraw from the Grid, HA sends the “data” to PVO
  • if I am producing from the PV and I am also withdrawing from the Grid, HA sends the “data” to PVO
  • if I am producing from the PV and I am putting Energy into the Grid, HA does NOT send the “data” to PVO, giving me the following ERROR " Error. Url: https://pvoutput.org/service/r2/addstatus.jsp. Status code 400. Payload: b’d=20250308 &t=09:05 &v2=2048 &v4=-1937 &v5=5 &v6=236’ "

So as soon as the PV produces in the early morning and in the late afternoon, and I also withdraw from the grid, both data are there… Instead if I produce and insert WITHOUT withdrawing ,data is not sent…

Is it possible that the value of the energy/power of the Photovoltaic must be with a negative sign??? Is there a possibility to “FORCE” the sending of data with a “negative sign” in the script string???

Thanks to all and have a good weekend

This is my configuration file:

  • Immagine 2025-03-08 101909

ok, yesterday fiddling around I managed, in part, to fix the file. Now with the current configuration I can “add status” every 5 minutes.
But there is a but:

  • v4 is net, set parameter n=1, So Import\Export… If I withdraw it shows me the Watts used, if I enter it shows 0 W. But this can be fine.
  • v2 instead is gross, and is found in the same request as v4, unfortunately with parameter n=1 it does not show me anything So it is always 0

How can I send “add Status” with 2 different strings, So:
-v2 gross
-v4 net

how should the file be configured in Home Assistant.

Thanks to everyone and have a good day.

You need to send two requests -

  1. Gross generation with v2
  2. Net consumption with n=1 and v2 = Export / v4 = Import

PVOutput will combine the two to calculation Gross Consumption.