Here’s my flow that gets data from SolCast and pumps selected forecast periods into Influx…
[{"id":"edd53e70.b6e8e8","type":"http request","z":"221c60ff.e6f9c","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://api.solcast.com.au/rooftop_sites/{{{ResourceID}}}/forecasts?format=json","tls":"","persist":false,"proxy":"","authType":"","x":530,"y":240,"wires":[["9fa1dd70.0049a8"]]},{"id":"3179c1cc.338bd6","type":"inject","z":"221c60ff.e6f9c","name":"Every 30m","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"*/30 0-23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":220,"wires":[["dacccca9.4f926"]]},{"id":"34df5155.33794e","type":"function","z":"221c60ff.e6f9c","name":"Parse API result","func":"var colour;\nvar s = msg.statusCode;\nvar pv, pe, i, fc;\nvar amsg = {};\namsg.measurement = \"power_W\";\nvar forecastsToStore = [0,1,2,4,6,12,24,48,72,96,144,192,240,288,335];\n//var forecastsToStore = [0,1,2];\n\nif ((msg.test === true) || (msg.statusCode == 200)) { // don't worry about status if test data\n colour = \"green\";\n for (i = 0; i < forecastsToStore.length; i++) {\n fc = forecastsToStore[i];\n pv = msg.payload.forecasts[fc].pv_estimate;\n pe = msg.payload.forecasts[fc].period_end; \n amsg.payload = [{\n value: pv * 1000,\n time: new Date(pe).getTime() * 1000000\n },\n {\n sensor: \"solcast_fc\" + fc,\n }];\n node.send(amsg);\n }\n} else {\n colour = \"red\";\n node.error(\"Solcast API gave http status \"+msg.statusCode);\n}\nnode.status({fill:colour,shape:\"dot\",text:s});\n\nreturn;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":860,"y":240,"wires":[["6327ff33.ca6fd","2793c91b.828256"]]},{"id":"9fa1dd70.0049a8","type":"json","z":"221c60ff.e6f9c","name":"","property":"payload","action":"obj","pretty":false,"x":690,"y":240,"wires":[["34df5155.33794e"]]},{"id":"5f73b68.ad18b48","type":"comment","z":"221c60ff.e6f9c","name":"Periodically get pv forecast","info":"and store 12 hours as an array in global variable 'pv_estimates'.","x":150,"y":160,"wires":[]},{"id":"305acc68.497bb4","type":"inject","z":"221c60ff.e6f9c","name":"Get now","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":260,"wires":[["dacccca9.4f926"]]},{"id":"dacccca9.4f926","type":"function","z":"221c60ff.e6f9c","name":"Set up request","func":"//msg.headers = {};\nAPIkey = flow.get('APIkey');\nvar auth = APIkey+':';\n//var auth = 'Basic ' + new Buffer(auth).toString('base64');\n//var auth = 'Basic ' + APIkey;\n\nmsg.ResourceID = flow.get('ResourceID');\nmsg.headers = {\n \"Authorization\": 'Basic ' + new Buffer(auth).toString('base64')\n}\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":240,"wires":[["edd53e70.b6e8e8"]]},{"id":"4ab4846a.6e199c","type":"config","z":"221c60ff.e6f9c","name":"Solcast API info","properties":[{"p":"APIkey","pt":"flow","to":"Your API Key","tot":"str"},{"p":"ResourceID","pt":"flow","to":"Your-Resource-ID","tot":"str"}],"active":true,"x":160,"y":80,"wires":[]},{"id":"2793c91b.828256","type":"influxdb out","z":"221c60ff.e6f9c","influxdb":"5f1dea8b.6c9264","name":"Influx Insert","measurement":"","precision":"","retentionPolicy":"","database":"","retentionPolicyV18Flux":"","org":"","bucket":"","x":1050,"y":240,"wires":[]},{"id":"6327ff33.ca6fd","type":"debug","z":"221c60ff.e6f9c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1030,"y":180,"wires":[]},{"id":"bfd82188.0dc48","type":"comment","z":"221c60ff.e6f9c","name":"Get solar irradiance forecasts from Solcast.com","info":"Set your API info (from https://toolkit.solcast.com.au/account) and rooftop resource ID (from https://toolkit.solcast.com.au/live-forecast) in the config node below. (If you don't already have it, you'll need node-red-contrib-config) These will be used in the http request nodes.\n\nOriginally based on NR flows from https://flows.nodered.org/flow/86c0050397ce3a1342a40d80a559637b\n\nAltered to pump forecasts into Influx, and get tuning data to be sent to Solcast from Influx\n\nSee also https://discourse.nodered.org/t/power-forecasts-and-data-tuning-for-solar-installations-node-red-solcast-api-influxdb-grafana/28037","x":220,"y":40,"wires":[]},{"id":"5f1dea8b.6c9264","type":"influxdb","hostname":"a0d7b954-influxdb","port":"8086","protocol":"http","database":"6gd","name":"hassio influx","usetls":false,"tls":"","influxdbVersion":"1.x"}]
I also have a flow that’s pumping actual data back to them - shout if you want that too. Despite the announcement that they’re not doing tuning any more, the POST still works, and the measured actuals still show up in their UI. Unfortunately I’m a latecomer to solcast, and I don’t have enough uploaded data yet to tell if their “Tuning not yet attempted” message in the UI is ever going to change or if it should actually read “We’ll never tune for anyone any more - see the announcement buried in our blog”. 