Solcast, tuning discontinued, using two sites with summed forecasts?

Yea, I found out that the mock node will be empty once I deploy everything. I switched to deploying only what changed, but that didn't seem to help.

With your flow example I was able to get the three arrays, but the mock nodes still seem to be having an empty payload. The node itself is not empty, it says "Object", but payload is empty?

Here is what I have so far. Maybe someone can point me to what I am doing wrong with the mock nodes.

The function to add the values to the third array is not ready yet. :slight_smile:

[{"id":"a5cb0f26a080725b","type":"http request","z":"457f9988695be7c4","name":"Solcast API - get Live+Forecast JSON EAST","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.solcast.com.au/rooftop_sites/eb16","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":630,"y":440,"wires":[["786e5f423ffa7593"]]},{"id":"c0e0319e8b59c5ca","type":"debug","z":"457f9988695be7c4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":740,"wires":[]},{"id":"786e5f423ffa7593","type":"switch","z":"457f9988695be7c4","name":"StatusCode","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":930,"y":440,"wires":[["265829a5ea960730"],["c0e0319e8b59c5ca","43c89b64564876f0"]]},{"id":"43c89b64564876f0","type":"change","z":"457f9988695be7c4","name":"timestamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"},{"t":"delete","p":"statusCode","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":440,"wires":[["e132cc1dd6f953de"]]},{"id":"e132cc1dd6f953de","type":"delay","z":"457f9988695be7c4","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1400,"y":440,"wires":[[]]},{"id":"5783efa521601e69","type":"inject","z":"457f9988695be7c4","name":"forecasts","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"forecasts","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"forecasts","payload":"","payloadType":"date","x":106,"y":1015,"wires":[["cbda7ba3f1b5dd8c"]]},{"id":"6fba0be572ad1fcc","type":"change","z":"457f9988695be7c4","name":"reset counter","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"topic.reset","pt":"msg","to":"reset","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":899,"wires":[["cbda7ba3f1b5dd8c"]]},{"id":"647d5a3b47463e70","type":"switch","z":"457f9988695be7c4","name":"counter","property":"count","propertyType":"msg","rules":[{"t":"btwn","v":"1","vt":"num","v2":"50","v2t":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":880,"y":740,"wires":[["2dc5dceec8bc5fe5"],["c0e0319e8b59c5ca"]]},{"id":"c8a0bcb16c3e26a7","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"delete","p":"reset","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":907,"y":899,"wires":[["647d5a3b47463e70"]]},{"id":"6c397fa8917f9a86","type":"inject","z":"457f9988695be7c4","name":"tĂ€gl. 02:00Uhr","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"Counter_Reset","vt":"str"}],"repeat":"","crontab":"00 02 * * *","once":false,"onceDelay":0.1,"topic":"Counter_Reset","payload":"","payloadType":"date","x":127,"y":861,"wires":[["ec6877f94fdbf330"]]},{"id":"2dc5dceec8bc5fe5","type":"switch","z":"457f9988695be7c4","name":"topic","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"estimated_actuals","vt":"str"},{"t":"eq","v":"forecasts","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":480,"wires":[[],["a5cb0f26a080725b","62e234f625a2a02a"]]},{"id":"b1f52ecbb1c743c5","type":"inject","z":"457f9988695be7c4","name":"estimated_actuals","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"estimated_actuals","payload":"","payloadType":"date","x":135,"y":1073,"wires":[[]]},{"id":"39febf8dd840c45e","type":"comment","z":"457f9988695be7c4","name":"Manuelle Abfragen","info":"","x":126,"y":975,"wires":[]},{"id":"58231316133afbbb","type":"comment","z":"457f9988695be7c4","name":"Zeitgesteuerte Abfragen","info":"","x":120,"y":300,"wires":[]},{"id":"3e4d03c3c94e9d0d","type":"comment","z":"457f9988695be7c4","name":"API abfragen","info":"","x":630,"y":480,"wires":[]},{"id":"b1a608779bbca9bf","type":"comment","z":"457f9988695be7c4","name":"50 API-Calls pro Tag möglich","info":"","x":865,"y":860,"wires":[]},{"id":"2e79f304435b99b2","type":"comment","z":"457f9988695be7c4","name":"Reset counter","info":"","x":110,"y":820,"wires":[]},{"id":"817124037088499e","type":"inject","z":"457f9988695be7c4","name":"Counter_Reset","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Counter_Reset","payload":"","payloadType":"date","x":126,"y":898,"wires":[["6fba0be572ad1fcc"]]},{"id":"4feaa555ebe704cb","type":"debug","z":"457f9988695be7c4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"count","targetType":"msg","statusVal":"count","statusType":"auto","x":880,"y":960,"wires":[]},{"id":"cbda7ba3f1b5dd8c","type":"counter","z":"457f9988695be7c4","name":"Counter","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":719,"y":899,"wires":[["c8a0bcb16c3e26a7","4feaa555ebe704cb"]]},{"id":"69982da8785adefe","type":"time-inject","z":"457f9988695be7c4","name":"forecasts","nameInt":"Sonnenaufgang Beginn↶ - Sonnenuntergang Ende↷ =... ↻150min","positionConfig":"8c7609ce.dd5798","props":[{"p":"","pt":"msgPayload","v":"","vt":"date","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":true,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false},{"p":"","pt":"msgTopic","v":"forecasts","vt":"str","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":false,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false}],"injectTypeSelect":"interval-time","intervalCount":"150","intervalCountType":"num","intervalCountMultiplier":60000,"time":"sunriseStart","timeType":"pdsTime","offset":"-15","offsetType":"num","offsetMultiplier":60000,"timeEnd":"sunsetEnd","timeEndType":"pdsTime","timeEndOffset":"15","timeEndOffsetType":"num","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":100,"y":380,"wires":[[]]},{"id":"a6859388b3b826d8","type":"time-inject","z":"457f9988695be7c4","name":"estimated_actuals","nameInt":"Sonnenaufgang Beginn↷ - Sonnenuntergang Ende↷ =... ↻4h","positionConfig":"8c7609ce.dd5798","props":[{"p":"","pt":"msgPayload","v":"","vt":"date","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":true,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false},{"p":"","pt":"msgTopic","v":"estimated_actuals","vt":"str","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":false,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false}],"injectTypeSelect":"interval-time","intervalCount":"4","intervalCountType":"num","intervalCountMultiplier":3600000,"time":"sunriseStart","timeType":"pdsTime","offset":"90","offsetType":"num","offsetMultiplier":60000,"timeEnd":"sunsetEnd","timeEndType":"pdsTime","timeEndOffset":"60","timeEndOffsetType":"num","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":130,"y":344,"wires":[[]]},{"id":"ec6877f94fdbf330","type":"within-time-switch","z":"457f9988695be7c4","name":"neuer Tag?","nameInt":"","positionConfig":"8c7609ce.dd5798","startTime":"sunriseStart","startTimeType":"pdsTime","startOffset":"-15","startOffsetType":"num","startOffsetMultiplier":60000,"endTime":"sunsetEnd","endTimeType":"pdsTime","endOffset":"60","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":"","timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":310,"y":760,"wires":[["cbda7ba3f1b5dd8c"],["6fba0be572ad1fcc"]]},{"id":"62e234f625a2a02a","type":"http request","z":"457f9988695be7c4","name":"Solcast API - get Live+Forecast JSON WEST","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.solcast.com.au/rooftop_sites/304b-3a2f-9df3","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":630,"y":520,"wires":[["50f9f1260a2a3cab"]]},{"id":"50f9f1260a2a3cab","type":"switch","z":"457f9988695be7c4","name":"StatusCode","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":930,"y":520,"wires":[["7abdec93c3917d24"],["96fb7138c35bd826","c0e0319e8b59c5ca"]]},{"id":"96fb7138c35bd826","type":"change","z":"457f9988695be7c4","name":"timestamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"},{"t":"delete","p":"statusCode","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":620,"wires":[["5e61daf7a3b261cc"]]},{"id":"5e61daf7a3b261cc","type":"delay","z":"457f9988695be7c4","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1400,"y":620,"wires":[[]]},{"id":"9b87473e30525c73","type":"function","z":"457f9988695be7c4","name":"","func":"var pl = msg.payload;\n\n// check if both east and west forecasts are present, otherwise\n// return null;\n\nif (pl[1].forecasts_east == null) \n    return null;\n\nfor (var i = 0; i < pl[1].forecasts_east.length; i++) {\n    pl[3].forecasts_sum[i].pv_estimate = pl[1].forecasts_east[i].pv_estimate + pl[2].forecasts_west[i].pv_estimate;\n    pl[3].forecasts_sum[i].pv_estimate10 = pl[1].forecasts_east[i].pv_estimate10 + pl[2].forecasts_west[i].pv_estimate10;\n    pl[3].forecasts_sum[i].pv_estimate90 = pl[1].forecasts_east[i].pv_estimate90 + pl[2].forecasts_west[i].pv_estimate90;\n}\n\n\nmsg.payload = pl;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1920,"y":520,"wires":[[]]},{"id":"97018d3b633cf398","type":"change","z":"457f9988695be7c4","name":"move forecasts to east","rules":[{"t":"move","p":"payload.forecasts","pt":"msg","to":"payload.east","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":360,"wires":[["2cfafacddcd55a7a","ce02c767e8a8b238"]]},{"id":"2cfafacddcd55a7a","type":"join","z":"457f9988695be7c4","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1810,"y":440,"wires":[["14907db5abceeee3"]]},{"id":"36bcb8e0090dfe99","type":"change","z":"457f9988695be7c4","name":"move forecasts to west","rules":[{"t":"move","p":"payload.forecasts","pt":"msg","to":"payload.west","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":540,"wires":[["2cfafacddcd55a7a"]]},{"id":"14907db5abceeee3","type":"debug","z":"457f9988695be7c4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":2050,"y":440,"wires":[]},{"id":"ce02c767e8a8b238","type":"change","z":"457f9988695be7c4","name":"copy east to sum","rules":[{"t":"set","p":"payload.sum","pt":"msg","to":"payload.east","tot":"msg"},{"t":"delete","p":"payload.east","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1690,"y":360,"wires":[["2cfafacddcd55a7a"]]},{"id":"265829a5ea960730","type":"mock","z":"457f9988695be7c4","name":"","x":1190,"y":360,"wires":[["97018d3b633cf398"]]},{"id":"7abdec93c3917d24","type":"mock","z":"457f9988695be7c4","name":"","x":1190,"y":540,"wires":[["36bcb8e0090dfe99"]]},{"id":"8c7609ce.dd5798","type":"position-config","name":"DACH-1","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12","contextStore":""}]

What I also tried was moving the mock node between the API call and the Statuscode node. When I then did an API call and afterwards used the mock node, the Statuscall node went into the delay part, because statusCode != 200. So somehow the mock node doesn't store the message correctly.

The sum is now actually working, I think!

Still wondering what's going on with those mock node though. But I guess if it works correctly now, I won't be needing those any time soon :wink:

Here is the flow now, probably a lot of stuff that could be improved.

[{"id":"a5cb0f26a080725b","type":"http request","z":"457f9988695be7c4","name":"Solcast API - get Live+Forecast JSON EAST","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.solcast.com.au/rooftop_sites/eb16-69e2-e","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":630,"y":440,"wires":[["786e5f423ffa7593"]]},{"id":"c0e0319e8b59c5ca","type":"debug","z":"457f9988695be7c4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":740,"wires":[]},{"id":"786e5f423ffa7593","type":"switch","z":"457f9988695be7c4","name":"StatusCode","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":930,"y":440,"wires":[["265829a5ea960730"],["c0e0319e8b59c5ca","43c89b64564876f0"]]},{"id":"43c89b64564876f0","type":"change","z":"457f9988695be7c4","name":"timestamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"},{"t":"delete","p":"statusCode","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":440,"wires":[["e132cc1dd6f953de"]]},{"id":"e132cc1dd6f953de","type":"delay","z":"457f9988695be7c4","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1400,"y":440,"wires":[[]]},{"id":"5783efa521601e69","type":"inject","z":"457f9988695be7c4","name":"forecasts","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"forecasts","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"forecasts","payload":"","payloadType":"date","x":106,"y":1015,"wires":[["cbda7ba3f1b5dd8c"]]},{"id":"6fba0be572ad1fcc","type":"change","z":"457f9988695be7c4","name":"reset counter","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"topic.reset","pt":"msg","to":"reset","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":899,"wires":[["cbda7ba3f1b5dd8c"]]},{"id":"647d5a3b47463e70","type":"switch","z":"457f9988695be7c4","name":"counter","property":"count","propertyType":"msg","rules":[{"t":"btwn","v":"1","vt":"num","v2":"50","v2t":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":880,"y":740,"wires":[["2dc5dceec8bc5fe5"],["c0e0319e8b59c5ca"]]},{"id":"c8a0bcb16c3e26a7","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"delete","p":"reset","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":907,"y":899,"wires":[["647d5a3b47463e70"]]},{"id":"6c397fa8917f9a86","type":"inject","z":"457f9988695be7c4","name":"tĂ€gl. 02:00Uhr","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"Counter_Reset","vt":"str"}],"repeat":"","crontab":"00 02 * * *","once":false,"onceDelay":0.1,"topic":"Counter_Reset","payload":"","payloadType":"date","x":127,"y":861,"wires":[["ec6877f94fdbf330"]]},{"id":"2dc5dceec8bc5fe5","type":"switch","z":"457f9988695be7c4","name":"topic","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"estimated_actuals","vt":"str"},{"t":"eq","v":"forecasts","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":480,"wires":[[],["a5cb0f26a080725b","62e234f625a2a02a"]]},{"id":"b1f52ecbb1c743c5","type":"inject","z":"457f9988695be7c4","name":"estimated_actuals","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"estimated_actuals","payload":"","payloadType":"date","x":135,"y":1073,"wires":[[]]},{"id":"39febf8dd840c45e","type":"comment","z":"457f9988695be7c4","name":"Manuelle Abfragen","info":"","x":126,"y":975,"wires":[]},{"id":"58231316133afbbb","type":"comment","z":"457f9988695be7c4","name":"Zeitgesteuerte Abfragen","info":"","x":120,"y":300,"wires":[]},{"id":"3e4d03c3c94e9d0d","type":"comment","z":"457f9988695be7c4","name":"API abfragen","info":"","x":630,"y":480,"wires":[]},{"id":"b1a608779bbca9bf","type":"comment","z":"457f9988695be7c4","name":"50 API-Calls pro Tag möglich","info":"","x":865,"y":860,"wires":[]},{"id":"2e79f304435b99b2","type":"comment","z":"457f9988695be7c4","name":"Reset counter","info":"","x":110,"y":820,"wires":[]},{"id":"817124037088499e","type":"inject","z":"457f9988695be7c4","name":"Counter_Reset","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Counter_Reset","payload":"","payloadType":"date","x":126,"y":898,"wires":[["6fba0be572ad1fcc"]]},{"id":"4feaa555ebe704cb","type":"debug","z":"457f9988695be7c4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"count","targetType":"msg","statusVal":"count","statusType":"auto","x":880,"y":960,"wires":[]},{"id":"cbda7ba3f1b5dd8c","type":"counter","z":"457f9988695be7c4","name":"Counter","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":719,"y":899,"wires":[["c8a0bcb16c3e26a7","4feaa555ebe704cb"]]},{"id":"69982da8785adefe","type":"time-inject","z":"457f9988695be7c4","name":"forecasts","nameInt":"Sonnenaufgang Beginn↶ - Sonnenuntergang Ende↷ =... ↻150min","positionConfig":"8c7609ce.dd5798","props":[{"p":"","pt":"msgPayload","v":"","vt":"date","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":true,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false},{"p":"","pt":"msgTopic","v":"forecasts","vt":"str","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":false,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false}],"injectTypeSelect":"interval-time","intervalCount":"150","intervalCountType":"num","intervalCountMultiplier":60000,"time":"sunriseStart","timeType":"pdsTime","offset":"-15","offsetType":"num","offsetMultiplier":60000,"timeEnd":"sunsetEnd","timeEndType":"pdsTime","timeEndOffset":"15","timeEndOffsetType":"num","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":100,"y":380,"wires":[["cbda7ba3f1b5dd8c"]]},{"id":"a6859388b3b826d8","type":"time-inject","z":"457f9988695be7c4","name":"estimated_actuals","nameInt":"Sonnenaufgang Beginn↷ - Sonnenuntergang Ende↷ =... ↻4h","positionConfig":"8c7609ce.dd5798","props":[{"p":"","pt":"msgPayload","v":"","vt":"date","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":true,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false},{"p":"","pt":"msgTopic","v":"estimated_actuals","vt":"str","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":false,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false}],"injectTypeSelect":"interval-time","intervalCount":"4","intervalCountType":"num","intervalCountMultiplier":3600000,"time":"sunriseStart","timeType":"pdsTime","offset":"90","offsetType":"num","offsetMultiplier":60000,"timeEnd":"sunsetEnd","timeEndType":"pdsTime","timeEndOffset":"60","timeEndOffsetType":"num","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":130,"y":344,"wires":[[]]},{"id":"ec6877f94fdbf330","type":"within-time-switch","z":"457f9988695be7c4","name":"neuer Tag?","nameInt":"","positionConfig":"8c7609ce.dd5798","startTime":"sunriseStart","startTimeType":"pdsTime","startOffset":"-15","startOffsetType":"num","startOffsetMultiplier":60000,"endTime":"sunsetEnd","endTimeType":"pdsTime","endOffset":"60","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":"","timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":310,"y":760,"wires":[["cbda7ba3f1b5dd8c"],["6fba0be572ad1fcc"]]},{"id":"62e234f625a2a02a","type":"http request","z":"457f9988695be7c4","name":"Solcast API - get Live+Forecast JSON WEST","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.solcast.com.au/rooftop_sites/304b-","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":630,"y":520,"wires":[["50f9f1260a2a3cab"]]},{"id":"50f9f1260a2a3cab","type":"switch","z":"457f9988695be7c4","name":"StatusCode","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":930,"y":520,"wires":[["7abdec93c3917d24"],["96fb7138c35bd826","c0e0319e8b59c5ca"]]},{"id":"96fb7138c35bd826","type":"change","z":"457f9988695be7c4","name":"timestamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"},{"t":"delete","p":"statusCode","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":620,"wires":[["5e61daf7a3b261cc"]]},{"id":"5e61daf7a3b261cc","type":"delay","z":"457f9988695be7c4","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1400,"y":620,"wires":[[]]},{"id":"9b87473e30525c73","type":"function","z":"457f9988695be7c4","name":"","func":"var pl = msg.payload;\n\n// check if both east and west forecasts are present, otherwise\n// return null;\n\nif (pl.east == null || pl.west == null) \n    return null;\n\nfor (var i = 0; i < pl.east.length; i++) {\n    pl.sum[i].pv_estimate = pl.east[i].pv_estimate + pl.west[i].pv_estimate;\n    pl.sum[i].pv_estimate10 = pl.east[i].pv_estimate10 + pl.west[i].pv_estimate10;\n    pl.sum[i].pv_estimate90 = pl.east[i].pv_estimate90 + pl.west[i].pv_estimate90;\n}\n\n\nmsg.payload = pl;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1960,"y":440,"wires":[["14907db5abceeee3","f4cc4bb7ff594492","6160d07dc3b62f71","a1879103d0ee3e5b"]]},{"id":"97018d3b633cf398","type":"change","z":"457f9988695be7c4","name":"move forecasts to east","rules":[{"t":"move","p":"payload.forecasts","pt":"msg","to":"payload.east","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":360,"wires":[["2cfafacddcd55a7a","ce02c767e8a8b238"]]},{"id":"2cfafacddcd55a7a","type":"join","z":"457f9988695be7c4","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1810,"y":440,"wires":[["9b87473e30525c73"]]},{"id":"36bcb8e0090dfe99","type":"change","z":"457f9988695be7c4","name":"move forecasts to west","rules":[{"t":"move","p":"payload.forecasts","pt":"msg","to":"payload.west","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":540,"wires":[["2cfafacddcd55a7a"]]},{"id":"14907db5abceeee3","type":"debug","z":"457f9988695be7c4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":2170,"y":640,"wires":[]},{"id":"ce02c767e8a8b238","type":"change","z":"457f9988695be7c4","name":"copy east to sum","rules":[{"t":"set","p":"payload.sum","pt":"msg","to":"payload.east","tot":"msg"},{"t":"delete","p":"payload.east","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1650,"y":300,"wires":[["2cfafacddcd55a7a"]]},{"id":"265829a5ea960730","type":"mock","z":"457f9988695be7c4","name":"","x":1190,"y":360,"wires":[["97018d3b633cf398"]]},{"id":"7abdec93c3917d24","type":"mock","z":"457f9988695be7c4","name":"","x":1190,"y":540,"wires":[["36bcb8e0090dfe99"]]},{"id":"a74e118239a6be0d","type":"influxdb out","z":"457f9988695be7c4","influxdb":"e07787.cd769878","name":"solcast_west","measurement":"solcast_west","precision":"ms","retentionPolicy":"","database":"openhab_db","retentionPolicyV18Flux":"","org":"","bucket":"","x":2830,"y":440,"wires":[]},{"id":"a5ebb9ac780f7b2d","type":"influxdb out","z":"457f9988695be7c4","influxdb":"e07787.cd769878","name":"solcast_east","measurement":"solcast_east","precision":"ms","retentionPolicy":"","database":"openhab_db","retentionPolicyV18Flux":"","org":"","bucket":"","x":2830,"y":360,"wires":[]},{"id":"5c8eed693f10f415","type":"influxdb out","z":"457f9988695be7c4","influxdb":"e07787.cd769878","name":"solcast_sum","measurement":"solcast_sum","precision":"ms","retentionPolicy":"","database":"openhab_db","retentionPolicyV18Flux":"","org":"","bucket":"","x":2830,"y":520,"wires":[]},{"id":"eed50a70c9e45556","type":"split","z":"457f9988695be7c4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":2450,"y":360,"wires":[["9b84145c54ba3383"]]},{"id":"9b84145c54ba3383","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t{\"value\": $.payload.pv_estimate * 1000,\t\"time\": $toMillis($.payload.period_end)},\t{\"topic\": \"pv_estimate\"}\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":2630,"y":360,"wires":[["a5ebb9ac780f7b2d"]]},{"id":"f4cc4bb7ff594492","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"move","p":"payload.east","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2230,"y":360,"wires":[["eed50a70c9e45556"]]},{"id":"493cf25ececd1fd8","type":"split","z":"457f9988695be7c4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":2450,"y":440,"wires":[["9280a8c7164bd9d3"]]},{"id":"9280a8c7164bd9d3","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t{\"value\": $.payload.pv_estimate * 1000,\t\"time\": $toMillis($.payload.period_end)},\t{\"topic\": \"pv_estimate\"}\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":2630,"y":440,"wires":[["a74e118239a6be0d"]]},{"id":"6160d07dc3b62f71","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"move","p":"payload.west","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2240,"y":440,"wires":[["493cf25ececd1fd8"]]},{"id":"6c3d3ebe364a817e","type":"split","z":"457f9988695be7c4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":2450,"y":520,"wires":[["f0c24ef3bc281486"]]},{"id":"f0c24ef3bc281486","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t{\"value\": $.payload.pv_estimate * 1000,\t\"time\": $toMillis($.payload.period_end)},\t{\"topic\": \"pv_estimate\"}\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":2630,"y":520,"wires":[["5c8eed693f10f415"]]},{"id":"a1879103d0ee3e5b","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"move","p":"payload.sum","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2230,"y":520,"wires":[["6c3d3ebe364a817e"]]},{"id":"8c7609ce.dd5798","type":"position-config","name":"DACH-1","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12","contextStore":""},{"id":"e07787.cd769878","type":"influxdb","hostname":"10.0.50.10","port":"8086","protocol":"http","database":"openhab_db","name":"openhab_db","usetls":false,"tls":"","influxdbVersion":"1.x","url":"http://localhost:8086","rejectUnauthorized":false}]

...use a separate flow for the mock-node, like I gave above Solcast, tuning discontinued, using two sites with summed forecasts? - #12 by hominidae

...then add the link to that flow after der switch-node that separates forecasts and estimated-actuals, here:

...and link your test-flow for playing with the arrays and sums to the mock-store flow.

...works every time

I did not test if the mock-node will work when used multiple times in the same flow.
So maybe then try and use a separate flow for a mockstore for east and west

...numbers look like these are well above real-time PV :face_with_peeking_eye:

When you add east, west, sum and PV to a graph...does it look OK?
Are the stored sum values the same as for a graph you create out of east+west in Grafana?

What do you mean, above real-time PV? Today there is a lot of change between sunny and cloudy, so probably hard to see in the graph.

I only have the sum data for about 11 am and after.

I am actually a little confused about the sum, which looks to be a little higher than east + west. But I will have to look at that later.

Ok, something might not be correct here after all. The orange line is the one calculacted via the flow, and the red one is calculated in Grafana by sum of east and west.

Yes, that was also my impression from the first graph...thanks for confirming...the red one is the one to be also created as the orange one from the flow.

After you created the message with east, west & sum and summed up the values of the .sum payload...how did you process that message further, for storing in influx?
Maybe you are storing not only the .sum values unter the sum topic in influx or are storing the values more than one time, with a different time value?

I posted my flow above, here is the current version again:

[{"id":"457f9988695be7c4","type":"tab","label":"solcast combined","disabled":false,"info":"","env":[]},{"id":"a5cb0f26a080725b","type":"http request","z":"457f9988695be7c4","name":"Solcast API - get Live+Forecast JSON EAST","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.solcast.com.au/rooftop_sites/eb16-69","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":630,"y":440,"wires":[["786e5f423ffa7593"]]},{"id":"c0e0319e8b59c5ca","type":"debug","z":"457f9988695be7c4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":740,"wires":[]},{"id":"786e5f423ffa7593","type":"switch","z":"457f9988695be7c4","name":"StatusCode","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":930,"y":440,"wires":[["265829a5ea960730"],["c0e0319e8b59c5ca","43c89b64564876f0"]]},{"id":"43c89b64564876f0","type":"change","z":"457f9988695be7c4","name":"timestamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"},{"t":"delete","p":"statusCode","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":440,"wires":[["e132cc1dd6f953de"]]},{"id":"e132cc1dd6f953de","type":"delay","z":"457f9988695be7c4","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1400,"y":440,"wires":[[]]},{"id":"5783efa521601e69","type":"inject","z":"457f9988695be7c4","name":"forecasts","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"forecasts","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"forecasts","payload":"","payloadType":"date","x":106,"y":1015,"wires":[["cbda7ba3f1b5dd8c"]]},{"id":"6fba0be572ad1fcc","type":"change","z":"457f9988695be7c4","name":"reset counter","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"topic.reset","pt":"msg","to":"reset","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":899,"wires":[["cbda7ba3f1b5dd8c"]]},{"id":"647d5a3b47463e70","type":"switch","z":"457f9988695be7c4","name":"counter","property":"count","propertyType":"msg","rules":[{"t":"btwn","v":"1","vt":"num","v2":"50","v2t":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":880,"y":740,"wires":[["2dc5dceec8bc5fe5"],["c0e0319e8b59c5ca"]]},{"id":"c8a0bcb16c3e26a7","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"delete","p":"reset","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":907,"y":899,"wires":[["647d5a3b47463e70"]]},{"id":"6c397fa8917f9a86","type":"inject","z":"457f9988695be7c4","name":"tĂ€gl. 02:00Uhr","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"Counter_Reset","vt":"str"}],"repeat":"","crontab":"00 02 * * *","once":false,"onceDelay":0.1,"topic":"Counter_Reset","payload":"","payloadType":"date","x":127,"y":861,"wires":[["ec6877f94fdbf330"]]},{"id":"2dc5dceec8bc5fe5","type":"switch","z":"457f9988695be7c4","name":"topic","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"estimated_actuals","vt":"str"},{"t":"eq","v":"forecasts","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":480,"wires":[[],["a5cb0f26a080725b","62e234f625a2a02a"]]},{"id":"b1f52ecbb1c743c5","type":"inject","z":"457f9988695be7c4","name":"estimated_actuals","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"estimated_actuals","payload":"","payloadType":"date","x":135,"y":1073,"wires":[[]]},{"id":"39febf8dd840c45e","type":"comment","z":"457f9988695be7c4","name":"Manuelle Abfragen","info":"","x":126,"y":975,"wires":[]},{"id":"58231316133afbbb","type":"comment","z":"457f9988695be7c4","name":"Zeitgesteuerte Abfragen","info":"","x":120,"y":300,"wires":[]},{"id":"3e4d03c3c94e9d0d","type":"comment","z":"457f9988695be7c4","name":"API abfragen","info":"","x":630,"y":480,"wires":[]},{"id":"b1a608779bbca9bf","type":"comment","z":"457f9988695be7c4","name":"50 API-Calls pro Tag möglich","info":"","x":865,"y":860,"wires":[]},{"id":"2e79f304435b99b2","type":"comment","z":"457f9988695be7c4","name":"Reset counter","info":"","x":110,"y":820,"wires":[]},{"id":"817124037088499e","type":"inject","z":"457f9988695be7c4","name":"Counter_Reset","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Counter_Reset","payload":"","payloadType":"date","x":126,"y":898,"wires":[["6fba0be572ad1fcc"]]},{"id":"4feaa555ebe704cb","type":"debug","z":"457f9988695be7c4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"count","targetType":"msg","statusVal":"count","statusType":"auto","x":880,"y":960,"wires":[]},{"id":"cbda7ba3f1b5dd8c","type":"counter","z":"457f9988695be7c4","name":"Counter","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":719,"y":899,"wires":[["c8a0bcb16c3e26a7","4feaa555ebe704cb"]]},{"id":"69982da8785adefe","type":"time-inject","z":"457f9988695be7c4","name":"forecasts","nameInt":"Sonnenaufgang Beginn↶ - Sonnenuntergang Ende↷ =... ↻150min","positionConfig":"8c7609ce.dd5798","props":[{"p":"","pt":"msgPayload","v":"","vt":"date","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":true,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false},{"p":"","pt":"msgTopic","v":"forecasts","vt":"str","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":false,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false}],"injectTypeSelect":"interval-time","intervalCount":"150","intervalCountType":"num","intervalCountMultiplier":60000,"time":"sunriseStart","timeType":"pdsTime","offset":"-15","offsetType":"num","offsetMultiplier":60000,"timeEnd":"sunsetEnd","timeEndType":"pdsTime","timeEndOffset":"15","timeEndOffsetType":"num","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":100,"y":380,"wires":[["cbda7ba3f1b5dd8c"]]},{"id":"a6859388b3b826d8","type":"time-inject","z":"457f9988695be7c4","name":"estimated_actuals","nameInt":"Sonnenaufgang Beginn↷ - Sonnenuntergang Ende↷ =... ↻4h","positionConfig":"8c7609ce.dd5798","props":[{"p":"","pt":"msgPayload","v":"","vt":"date","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":true,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false},{"p":"","pt":"msgTopic","v":"estimated_actuals","vt":"str","o":"1","oT":"none","oM":"60000","f":0,"fS":0,"fT":"Millisekunden UNIX-Zeit","fI":"0","next":false,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false}],"injectTypeSelect":"interval-time","intervalCount":"4","intervalCountType":"num","intervalCountMultiplier":3600000,"time":"sunriseStart","timeType":"pdsTime","offset":"90","offsetType":"num","offsetMultiplier":60000,"timeEnd":"sunsetEnd","timeEndType":"pdsTime","timeEndOffset":"60","timeEndOffsetType":"num","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":130,"y":344,"wires":[[]]},{"id":"ec6877f94fdbf330","type":"within-time-switch","z":"457f9988695be7c4","name":"neuer Tag?","nameInt":"","positionConfig":"8c7609ce.dd5798","startTime":"sunriseStart","startTimeType":"pdsTime","startOffset":"-15","startOffsetType":"num","startOffsetMultiplier":60000,"endTime":"sunsetEnd","endTimeType":"pdsTime","endOffset":"60","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":"","timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":310,"y":760,"wires":[["cbda7ba3f1b5dd8c"],["6fba0be572ad1fcc"]]},{"id":"62e234f625a2a02a","type":"http request","z":"457f9988695be7c4","name":"Solcast API - get Live+Forecast JSON WEST","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.solcast.com.au/rooftop_sites/304b","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":630,"y":520,"wires":[["50f9f1260a2a3cab"]]},{"id":"50f9f1260a2a3cab","type":"switch","z":"457f9988695be7c4","name":"StatusCode","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":930,"y":520,"wires":[["7abdec93c3917d24"],["96fb7138c35bd826","c0e0319e8b59c5ca"]]},{"id":"96fb7138c35bd826","type":"change","z":"457f9988695be7c4","name":"timestamp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"},{"t":"delete","p":"statusCode","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":620,"wires":[["5e61daf7a3b261cc"]]},{"id":"5e61daf7a3b261cc","type":"delay","z":"457f9988695be7c4","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1400,"y":620,"wires":[[]]},{"id":"9b87473e30525c73","type":"function","z":"457f9988695be7c4","name":"","func":"var pl = msg.payload;\n\n// check if both east and west forecasts are present, otherwise\n// return null;\n\nif (pl.east == null || pl.west == null) \n    return null;\n\nfor (var i = 0; i < pl.east.length; i++) {\n    pl.sum[i].pv_estimate = pl.east[i].pv_estimate + pl.west[i].pv_estimate;\n    pl.sum[i].pv_estimate10 = pl.east[i].pv_estimate10 + pl.west[i].pv_estimate10;\n    pl.sum[i].pv_estimate90 = pl.east[i].pv_estimate90 + pl.west[i].pv_estimate90;\n}\n\n\nmsg.payload = pl;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1960,"y":440,"wires":[["14907db5abceeee3","f4cc4bb7ff594492","6160d07dc3b62f71","a1879103d0ee3e5b"]]},{"id":"97018d3b633cf398","type":"change","z":"457f9988695be7c4","name":"move forecasts to east","rules":[{"t":"move","p":"payload.forecasts","pt":"msg","to":"payload.east","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":360,"wires":[["2cfafacddcd55a7a","ce02c767e8a8b238"]]},{"id":"2cfafacddcd55a7a","type":"join","z":"457f9988695be7c4","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1810,"y":440,"wires":[["9b87473e30525c73"]]},{"id":"36bcb8e0090dfe99","type":"change","z":"457f9988695be7c4","name":"move forecasts to west","rules":[{"t":"move","p":"payload.forecasts","pt":"msg","to":"payload.west","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":540,"wires":[["2cfafacddcd55a7a"]]},{"id":"14907db5abceeee3","type":"debug","z":"457f9988695be7c4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":2170,"y":640,"wires":[]},{"id":"ce02c767e8a8b238","type":"change","z":"457f9988695be7c4","name":"copy east to sum","rules":[{"t":"set","p":"payload.sum","pt":"msg","to":"payload.east","tot":"msg"},{"t":"delete","p":"payload.east","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1650,"y":300,"wires":[["2cfafacddcd55a7a"]]},{"id":"265829a5ea960730","type":"mock","z":"457f9988695be7c4","name":"","x":1190,"y":360,"wires":[["97018d3b633cf398"]]},{"id":"7abdec93c3917d24","type":"mock","z":"457f9988695be7c4","name":"","x":1190,"y":540,"wires":[["36bcb8e0090dfe99"]]},{"id":"a74e118239a6be0d","type":"influxdb out","z":"457f9988695be7c4","influxdb":"e07787.cd769878","name":"solcast_west","measurement":"solcast_west","precision":"ms","retentionPolicy":"","database":"openhab_db","retentionPolicyV18Flux":"","org":"","bucket":"","x":2830,"y":440,"wires":[]},{"id":"a5ebb9ac780f7b2d","type":"influxdb out","z":"457f9988695be7c4","influxdb":"e07787.cd769878","name":"solcast_east","measurement":"solcast_east","precision":"ms","retentionPolicy":"","database":"openhab_db","retentionPolicyV18Flux":"","org":"","bucket":"","x":2830,"y":360,"wires":[]},{"id":"5c8eed693f10f415","type":"influxdb out","z":"457f9988695be7c4","influxdb":"e07787.cd769878","name":"solcast_sum","measurement":"solcast_sum","precision":"ms","retentionPolicy":"","database":"openhab_db","retentionPolicyV18Flux":"","org":"","bucket":"","x":2830,"y":520,"wires":[]},{"id":"eed50a70c9e45556","type":"split","z":"457f9988695be7c4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":2450,"y":360,"wires":[["9b84145c54ba3383"]]},{"id":"9b84145c54ba3383","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t{\"value\": $.payload.pv_estimate * 1000,\t\"time\": $toMillis($.payload.period_end)},\t{\"topic\": \"pv_estimate\"}\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":2630,"y":360,"wires":[["a5ebb9ac780f7b2d"]]},{"id":"f4cc4bb7ff594492","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"move","p":"payload.east","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2230,"y":360,"wires":[["eed50a70c9e45556"]]},{"id":"493cf25ececd1fd8","type":"split","z":"457f9988695be7c4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":2450,"y":440,"wires":[["9280a8c7164bd9d3"]]},{"id":"9280a8c7164bd9d3","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t{\"value\": $.payload.pv_estimate * 1000,\t\"time\": $toMillis($.payload.period_end)},\t{\"topic\": \"pv_estimate\"}\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":2630,"y":440,"wires":[["a74e118239a6be0d"]]},{"id":"6160d07dc3b62f71","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"move","p":"payload.west","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2240,"y":440,"wires":[["493cf25ececd1fd8"]]},{"id":"6c3d3ebe364a817e","type":"split","z":"457f9988695be7c4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":2450,"y":520,"wires":[["f0c24ef3bc281486"]]},{"id":"f0c24ef3bc281486","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t{\"value\": $.payload.pv_estimate * 1000,\t\"time\": $toMillis($.payload.period_end)},\t{\"topic\": \"pv_estimate\"}\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":2630,"y":520,"wires":[["5c8eed693f10f415"]]},{"id":"a1879103d0ee3e5b","type":"change","z":"457f9988695be7c4","name":"","rules":[{"t":"move","p":"payload.sum","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2230,"y":520,"wires":[["6c3d3ebe364a817e"]]},{"id":"8c7609ce.dd5798","type":"position-config","name":"DACH-1","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12","contextStore":""},{"id":"e07787.cd769878","type":"influxdb","hostname":"10.0.50.10","port":"8086","protocol":"http","database":"openhab_db","name":"openhab_db","usetls":false,"tls":"","influxdbVersion":"1.x","url":"http://localhost:8086","rejectUnauthorized":false}]

Also, here is a screenshot of the relevant part:

Somehow, something is off, yea. Here is a screenshot for the forecasts for the next few days. Notice where yellow & green (east & west) meet, from there on out they are the same values. Which doesn't make much sense.

In the screenshot one post earlier I was using mean() values in Grafana, maybe that's why it wasn't like that in that view.

I think I might have fixed it. I deleted all of the old values from the database and then triggered the flow manually. This is what it looks like now. sum by flow and sum by Grafana are the same line. :slight_smile:

Maybe there were duplicates in the database? Not sure.

1 Like

No, that shouldn't be the problem, as the values would have the exact same time-stamps and hence would have been overwritten.
Maybe you are not creating the graphs correctly?
Note that the forecasts are already mean values for the right side of a 30mins interval.
This is why they should look like a step-pyramid, not like a smooth graph.
Here are my quieries for PV (real, smooth) and forecasts/estimates (30min steps):

Yea, I saw your step-pyramid somewhere else already, I think. I compared both, and smoothing it out looks good enough and to me a little more "eye pleasing" instead of those steps.

1 Like

...maybe you did have values with different time-slots in the database, from earlier tests.
This looks good...glad you solved it....thanks for sharing.

Sure. And thank you for your help!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.