Pushing Fronius inverter values from Home Assistant OS to PVOutput. PLEASE HELP!

Folks, having initially set up a working automation to upload my Fronius inverter data to HA, comprising energy generation, energy consumption, temperature and mains voltage, I soon realised that I was using the wrong sensor data. Having now fixed that up in my Configuration.yaml file the upload has stopped working.

I am fairly confident that this has something to do with the formatting of the uploaded values to PVOutput, potentially resulting from the (mis)use of the float and round functions.

Am hoping that someone could kindly review the enclosed payload description and tell me where I may be going wrong.

Here is the current payload setting that does not get uploaded.

payload: “d={{now().strftime(‘%Y%m%d’)}}&t={{now().strftime(‘%H:%M’)}}&v1={{(states(‘sensor.fronius_smart_meter_real_energy_produced’))|float(0)}}&v3={{(states(‘sensor.fronius_smart_meter_real_energy_consumed’))|float(0)}}&v5={{(states(‘sensor.openweathermap_temperature’))|round(1)}}&v6={{(states(‘sensor.myenergi_car_charger_voltage_grid’))|float(0)}}”

The HA Log shows the following error message when this automation runs;

2024-12-03 12:34:16.430 INFO (MainThread) [homeassistant.components.automation.upload_to_pvoutput_rest_command] PVOutput Uploader (rest_command): Running automation actions

2024-12-03 12:34:16.431 INFO (MainThread) [homeassistant.components.automation.upload_to_pvoutput_rest_command] PVOutput Uploader (rest_command): Executing step call service

2024-12-03 12:34:17.250 WARNING (MainThread) [homeassistant.components.rest_command] Error. Url: https://pvoutput.org/service/r2/addstatus.jsp. Status code 400. Payload: b’d=20241203&t=12:34&v1=1015245.0&v3=1176226.0&v5=27.7&v6=240.5’

A “400” error code on PVOutput signifies a “Bad Request” which means the server could not process your request due to an issue with the information you provided, likely an error in the data format or missing required details when trying to send data to your PVOutput account; essentially, it’s a problem with the request you sent, not the server itself

I am 100% confident that my PVOutput user ID and API key are good as the previous script went through using these same variables. The only changes have been to the sensors and the inclusion of the round & float commands.

Hi,

Disclaimer - I don’t know anything about Home Assistant.

v1 and v3 should both be in Watt Hours. The values that you are trying to push appear to be quite large → both greater than 1MWh. Are they lifetime values? If they are, are you using the c1 parameter?

v1=1 015 245.0
v3=1 176 226.0

Grannos

The answer is always so obvious eh! THANK YOU for the steer. I added the c1=1 string at the end of my payload string and boom, it all started uploading straight away. I guess PVO saw that level of energy production over a 5 min period as an error, akin to a nuclear reactor spitting out >1M Wh in a 5 min period.
Anyhow, really appreciate all the help on this AND my other thread where I was trying to push the data via a PHP script on my NUC or iPad. This is now working well thanks to your input.
Much appreciated from a fellow Aussie!
My PVO for interest.
https://pvoutput.org/intraday.jsp?id=123928&sid=107047&dt=20241204