Fronius (solar inverter) simple dash

Simple dashboard to show generation and load. Need a fronius inverter, and a fronius smart meter.

https://imgur.com/a/m3TtOkr

You need to change the "make request" node to repeat, and modify the "http request" block to the IP of your inverter. "price" block etc

[{"id":"f9ef072c.f452d8","type":"inject","z":"15c671c3.e7f07e","name":"make request","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":301.01737213134766,"y":206.01043510437012,"wires":[["e1e859b0.bc7688"]]},{"id":"e1e859b0.bc7688","type":"http request","z":"15c671c3.e7f07e","name":"","method":"GET","ret":"obj","url":"http://10.1.1.96/solar_api/v1/GetPowerFlowRealtimeData.fcgi","tls":"","x":586.5173530578613,"y":202.0103874206543,"wires":[["ff1b1e8a.331f8","d9be67f6.c94c18","a7643181.55505"]]},{"id":"54c1b697.aa6358","type":"debug","z":"15c671c3.e7f07e","name":"","active":false,"console":"false","complete":"true","x":987.0173301696777,"y":139.01039123535156,"wires":[]},{"id":"ff1b1e8a.331f8","type":"function","z":"15c671c3.e7f07e","name":"decode-swap","func":"\n//msg.payload.Head.TimeStamp;\n//node.warn(msg.payload.Head.Timestamp)\n\n var msg1 = {};\n var msg2 = {};\n var msg3 = {};\n \n msg1.payload = msg.payload.Body.Data.Site.P_Grid.toFixed(0);\n msg2.payload = msg.payload.Body.Data.Site.P_Load.toFixed(0);\n \n msg1.payload = -msg1.payload;\n msg2.payload = -msg2.payload;\n msg3.payload = msg1.payload + msg2.payload;\n \n msg1.topic = 'Avail';\n msg2.topic = 'Load';\n msg3.topic = 'Solar';\n\n return [msg1,msg2,msg3]; ","outputs":"3","noerr":0,"x":787.0173110961914,"y":314.01038551330566,"wires":[["17f1eebc.f47ef1","c9e14530.a7c568"],["cba16d6f.93064"],["cba16d6f.93064"]]},{"id":"d9be67f6.c94c18","type":"debug","z":"15c671c3.e7f07e","name":"","active":false,"console":"false","complete":"true","x":527.717342376709,"y":375.610387802124,"wires":[]},{"id":"a7643181.55505","type":"switch","z":"15c671c3.e7f07e","name":"errorCheck","property":"payload.Head.Timestamp","propertyType":"msg","rules":[{"t":"eq","v":"\"undefined\"","vt":"str"},{"t":"neq","v":"\"undefined\"","vt":"str"}],"checkall":"true","outputs":2,"x":805.9173240661621,"y":152.81042861938477,"wires":[[],["54c1b697.aa6358"]]},{"id":"122154d4.dcc84b","type":"inject","z":"15c671c3.e7f07e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":682.0173187255859,"y":483.01040840148926,"wires":[["a891f07b.8e44d"]]},{"id":"a891f07b.8e44d","type":"function","z":"15c671c3.e7f07e","name":"blank-data","func":"msg.payload =[];\nreturn msg;","outputs":1,"noerr":0,"x":883.017333984375,"y":480.01040840148926,"wires":[["cba16d6f.93064"]]},{"id":"a069ae09.cad52","type":"comment","z":"15c671c3.e7f07e","name":"to clear a chart","info":"","x":485.0173873901367,"y":489.01035499572754,"wires":[]},{"id":"17f1eebc.f47ef1","type":"function","z":"15c671c3.e7f07e","name":"price","func":"var grid = 0.23;\nvar feed = 0.11;\n\nif (msg.payload > 0){ // positive number\n msg.payload = (msg.payload/1000) * feed;\n msg.color = \"lime\";\n}\nelse //negative number\n{\n msg.payload = (msg.payload/1000) * grid;\n msg.color = \"red\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":962.917350769043,"y":246.41042709350586,"wires":[["601edbb.c1c0124"]]},{"id":"c9e14530.a7c568","type":"ui_gauge","z":"15c671c3.e7f07e","name":"","group":"650e1439.22cd1c","order":0,"width":0,"height":0,"gtype":"gage","title":"Solar Available","label":"W","format":"{{value}}","min":0,"max":10,"colors":["#ff0000","#e6e600","#00ff00"],"seg1":"","seg2":"","x":1160.0729751586914,"y":296.76043128967285,"wires":[]},{"id":"cba16d6f.93064","type":"ui_chart","z":"15c671c3.e7f07e","name":"","group":"650e1439.22cd1c","order":0,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#ff0000","#00ff00","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":1138.079849243164,"y":346.72570991516113,"wires":[[],[]]},{"id":"601edbb.c1c0124","type":"ui_text","z":"15c671c3.e7f07e","group":"650e1439.22cd1c","order":0,"width":0,"height":0,"name":"","label":"$/hour","format":"<font color='{{msg.color}}'>{{msg.payload | currency:\"$\"}}</font>","layout":"row-spread","x":1126.0799713134766,"y":246.24657440185547,"wires":[]},{"id":"650e1439.22cd1c","type":"ui_group","z":"","name":"Solar-WP","tab":"2acc391d.2f8ae6","disp":true,"width":"6","collapse":false},{"id":"2acc391d.2f8ae6","type":"ui_tab","name":"Tab 4","icon":"dashboard","order":4}]

Flow Info

Created 6 years, 11 months ago
Updated 5 years, 10 months ago
Rating: 4.5 4

Owner

Actions

Rate:

Node Types

Core
  • comment (x1)
  • debug (x2)
  • function (x3)
  • http request (x1)
  • inject (x2)
  • switch (x1)
Other
  • ui_chart (x1)
  • ui_gauge (x1)
  • ui_group (x1)
  • ui_tab (x1)
  • ui_text (x1)

Tags

  • fronius
  • dashboard
  • inverter
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option