node-red-electricity-prices-Austria

NodeRed Flow to retrieve electricity price in Austria and creates input for the Price Receiver node of node-red-contrib-power-saver.

[{"id":"73934bfc731dd8f6","type":"inject","z":"52fcb4c982890ad1","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"59 13 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":120,"wires":[["254641c0262e7975"]]},{"id":"254641c0262e7975","type":"change","z":"52fcb4c982890ad1","name":"","rules":[{"t":"set","p":"heute","pt":"msg","to":"$moment(msg.payload).format(\"YYYY-M-D\")","tot":"jsonata"},{"t":"set","p":"morgen","pt":"msg","to":"$moment(msg.payload).add(1,\"day\").format(\"YYYY-M-D\")","tot":"jsonata"},{"t":"set","p":"heute","pt":"msg","to":"\"https://www.exaa.at/data/trading-results?delivery_day=\" & heute & \"&market=at&auction=market_coupling\"","tot":"jsonata"},{"t":"set","p":"morgen","pt":"msg","to":"\"https://www.exaa.at/data/trading-results?delivery_day=\" & morgen & \"&market=at&auction=market_coupling\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":120,"wires":[["eaf3730a1080fba3","64d8149cf0622366"]]},{"id":"eaf3730a1080fba3","type":"change","z":"52fcb4c982890ad1","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"heute","tot":"msg"},{"t":"set","p":"method","pt":"msg","to":"get","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":80,"wires":[["41f9dac13d0a1b19"]]},{"id":"64d8149cf0622366","type":"change","z":"52fcb4c982890ad1","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"morgen","tot":"msg"},{"t":"set","p":"method","pt":"msg","to":"get","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":160,"wires":[["fae99872c9512948"]]},{"id":"41f9dac13d0a1b19","type":"http request","z":"52fcb4c982890ad1","name":"","method":"use","ret":"obj","paytoqs":"body","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":630,"y":80,"wires":[["8fd5c187c0edb655"]]},{"id":"fae99872c9512948","type":"http request","z":"52fcb4c982890ad1","name":"","method":"use","ret":"obj","paytoqs":"body","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":630,"y":160,"wires":[["8fd5c187c0edb655"]]},{"id":"8fd5c187c0edb655","type":"join","z":"52fcb4c982890ad1","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":790,"y":120,"wires":[["0d22c28e7bc83e6e"]]},{"id":"0d22c28e7bc83e6e","type":"change","z":"52fcb4c982890ad1","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t    \"today\": $map(payload[auction_day=$fromMillis($toMillis($now())-86400000,'[Y0001]-[M01]-[D01]')].data.h, function($v) {\t        {\"value\": $v.Price, \"start\": $moment().startOf(\"day\").add($number($substring($v.Product,1))-1, \"hour\").format()}\t    }),\t\t    \"tomorrow\": $map(payload[auction_day=$fromMillis($toMillis($now()),'[Y0001]-[M01]-[D01]')].data.h,function($v) {\t        {\"value\": $v.Price, \"start\": $moment().add(1, \"day\").startOf(\"day\").add($number($substring($v.Product,1))-1, \"hour\").format()}\t})\t}\t\t","tot":"jsonata"},{"t":"delete","p":"url","pt":"msg"},{"t":"delete","p":"heute","pt":"msg"},{"t":"delete","p":"morgen","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":120,"wires":[["8334d0a87b7a3d96","ded0bb3308a8d98c"]]}]

Flow Info

Created 1 year, 1 month ago
Updated 1 year ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x4)
  • http request (x2)
  • inject (x1)
  • join (x1)

Tags

  • strompreis
  • energyprices
  • marktdaten
  • Austria
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option