This thread was very useful, but when I trigger this via an automation I get this error in the trace: Stopped because an error was encountered at September 5, 2022 at 9:30:37 PM (runtime: 0.02 seconds) ’entity_id’
Any ideas on how to resolve this?
Using the rest_command
rest_command:
pvoutputpro:
url: https://pvoutput.org/service/r2/addoutput.jsp
method: POST
headers:
X-Pvoutput-Ap:ikey: xxxxxxxxxxxxxxxxxxxxxxx" <<<< does this have a typo? should be X-Pvoutput-Apikey:
X-Pvoutput-SystemId: "yyyyy"
accept: "application/json"
user-agent: 'Mozilla/5.0 {{ useragent }}' <<< I don't use this
payload: 'd={{now().strftime("%Y%m%d")}}&t={{now().strftime("%H:%M")}}&v1={{states.sensor.yield_energy_daily_wh.state|float(0)|round(0)}}&v2={{states.sensor.solar_power_c.state|float(0)|round(0)}}v3={{states.sensor.grid_consumption_energy_wh.state|float(0)|round(0)}}&v4={{states.sensor.load_power.state|float(0)|round(0)}}&v6={{states.sensor.solar_voltage_a|float(0)}}&c1=1'
content_type: "application/x-www-form-urlencoded"
Your indents are out compared to mine, I edited yours above. I don’t use the accept line either(although I doubt that matters.)
You also have an extra : in the api key line.
"d={{now().strftime('%Y%m%d&t=%H:%M')}}&
I use that for the datetime
thats my whole payload line, although mine converts from kWh back to Wh
Thanks for the help and pointing out silly typos that must have crept in. Really appreciated.
I reworked my payload and checked the formatting on the developer tools/template page which was super helpful as I found one value with a trailing .state missing!
I had converted values to Wh in a template before the payload
I tried to configure this but I don’t see any data appear on PVOutput.
I also can’t find the logs in HA folks in this thread describe.
I only have the log of the automation:
Upload PV output
Step DetailsTrace TimelineRelated logbook entriesAutomation Config
Triggered by the time pattern at January 16, 2023 at 11:00:00
Shell Command:
Finished at January 16, 2023 at 11:00:00 (runtime: 0.02 seconds)
Where can I find the detailed logs about the shell command?
Sorry for my novice questions.
Any progress on integrating upload capability into core? It would be incredibly useful and powerful to have HA be able to upload its data (since it can come from multiple sources) to pvoutput and emoncms so that we can compare data with other users. I think this would lead to a large number of HA adoption as many in the energy monitoring community are using old antiquated techniques. Thanks!
I have a strange issue. I am not getting the v7 or v8 data depending on where I put it in the YAML. Using my example I get the v8 data, but not the v7. If I swap it around like this, I get the v7 and not the v8.
I have this working but I have phantom power from my solar sensor.
How do i modify the below to say ‘if value less than 15, then set to 0’ ?
Or - do I do that on the sensor config itself somehow ?
Sorry - I am very very new to HA - and have a load of things yet to add, but getting there.
just wanted to say I stumbled upon this after my old process (ginlong scaper) stopped working with the migration of Soliscloud.
Made sense to have this running at the same time as HA and its one less process to run on my NAS…All seems to work smoothly…will make sure tomorrow’s numbers tie up…but thanks to all the tips and comments here that made things pretty simple
interesting topic this is! I also have solar power and meteobridge coming in on HA. Now I wanted to upload these values. Long time ago I did this with domoticz but now want to use HA.
I read al these stiff here but get stuck.
It is not clear where I put all these code.
Do I need the code from Martijn Braam?
And where do I put rest commands and all others? Could anyone make a list of what code where to put in HA?
Thanks in advance.
But be sure to update the apikey, SystemId + check the v1 and v2 values for the correct sensors that you use for your inverter data. If you don’t know what to put there, the API spec: API Specification — PVOutput documentation
Hi! I used this sucessfully for some months.
About 4 weeks ago I started getting error (Logs) and I have no idea what I could change to resolve it?
Could somebody help me what I am doing wrong?