Picnic
(DjR)
October 25, 2019, 3:36am
1
Any tips on getting this shell command out of my config and into nodered?
shell_command:
pvoutputcurl: 'curl -d "d={{now().strftime("%Y%m%d")}}" -d "t={{now().strftime("%H:%M")}}" -d "v1={{states("sensor.daily_solar_energy_wh")}}" -d "v2={{states("sensor.total_solar_power")}}" -d "v3={{states("sensor.daily_consumed_energy_wh")}}" -d "v4={{states("sensor.total_consumed_power")}}" -d "v5={{states("sensor.dark_sky_temperature_0h")}}" -d "v6={{states("sensor.utility_voltage")}}" -H "X-Pvoutput-Apikey: XXXXXXXX" -H "X-Pvoutput-SystemId: XXXXX" https://pvoutput.org/service/r2/addstatus.jsp'
This is all i’ve got so far
You should be able to use the HTTP Request Node for this.
Picnic
(DjR)
October 26, 2019, 4:18am
3
I’m not sure how to move the date and time into the msg.payload. The below example isn’t right.
msg.action = msg.payload;
msg.url = "http://pvoutput.org/service/r2/addstatus.jsp";
msg.payload =
{
"d": 'now().strftime("%Y%m%d")',
"t": 'now().strftime("%H:%M")',
"v1": msg.v1,
"v2": msg.v2,
"v3": msg.v3,
"v4": msg.v4,
"v5": msg.v5,
"v6": msg.v6,
}
return msg;
Picnic
(DjR)
October 26, 2019, 5:28pm
4
I found my solution and posted it to the projects categories.
Here is a flow i put together to upload my sensor data from HA to PVOutput.org .
This started off as a shell command posted by “Greenhouse ” and flow posted by " Paul_F_Prinsloo ".
[32%20AM]
[
{
"id": "24befeed.0cb5f2",
"type": "tab",
"label": "pvoutput",
"disabled": false,
"info": ""
},
{
"id": "ab922e29.c77f7",
"type": "api-current-state",
"z": "24befeed.0cb5f2",
"name": "Daily Solar (Watt hours)",
"se…
Sir, how do you build the flow? I have setup my HA to retrieve the values from the solis cloud as sensor readings. I installed node red, and want this to push to PVOutput (only a few fields like Daily Generated). Thanks