Advertisement
pmfernandes

Solax - NodeRed

Sep 7th, 2023 (edited)
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 13.06 KB | None | 0 0
  1. [{"id":"a1525f221dd3b252","type":"http request","z":"98b906d4b3340b11","name":"Get Solax Details","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":370,"y":720,"wires":[["24f6fb853f8418fa"]]},{"id":"24f6fb853f8418fa","type":"switch","z":"98b906d4b3340b11","name":"Check Status Code","property":"statusCode","propertyType":"msg","rules":[{"t":"eq","v":"200","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":590,"y":720,"wires":[["479992352aa0fa3d","050184986de34ee0","fc25fc8c526cf7c8","60e8892f45c8d58a","56c7e1614270217e","14225fc414242c2b","73cb4f605a6fb492"]]},{"id":"479992352aa0fa3d","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax Total","entityConfig":"ae1089628365eeee","version":0,"state":"payload.result.yieldtotal","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":810,"y":640,"wires":[[]]},{"id":"050184986de34ee0","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax Power","entityConfig":"d55ae07db082c7e0","version":0,"state":"payload.result.acpower","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":810,"y":680,"wires":[["58e0da7c456985e8"]]},{"id":"fc25fc8c526cf7c8","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax Day Energy","entityConfig":"2c4b7ccddfd2f1d7","version":0,"state":"payload.result.yieldtoday","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":830,"y":720,"wires":[[]]},{"id":"60e8892f45c8d58a","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax Last Updated","entityConfig":"a48e602b6d15334a","version":0,"state":"payload.result.uploadTime","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":830,"y":760,"wires":[[]]},{"id":"56c7e1614270217e","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax Status","entityConfig":"84be367fd262db4b","version":0,"state":"payload.result.inverterStatus","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":810,"y":800,"wires":[[]]},{"id":"0ff5e698f15b17e7","type":"inject","z":"98b906d4b3340b11","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":760,"wires":[["a1525f221dd3b252","f029643bb1ecee1f"]]},{"id":"0efa143703509e76","type":"server-state-changed","z":"98b906d4b3340b11","name":"Solax Status","server":"55430927.517ce8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.solax_status","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":210,"y":960,"wires":[["f029643bb1ecee1f"]]},{"id":"f029643bb1ecee1f","type":"api-render-template","z":"98b906d4b3340b11","name":"Solax Status Description","server":"55430927.517ce8","version":0,"template":"{% set sensor_value = states('sensor.solax_status')|int %}\n{% if sensor_value == 100 %}Wait\n{% elif sensor_value == 101 %}Check\n{% elif sensor_value == 102 %}Normal\n{% elif sensor_value == 103 %}Fault\n{% elif sensor_value == 104 %}Permanent Fault\n{% elif sensor_value == 105 %}Update\n{% elif sensor_value == 106 %}EPS Check\n{% elif sensor_value == 107 %}EPS\n{% elif sensor_value == 108 %}Self-test\n{% elif sensor_value == 109 %}Idle\n{% elif sensor_value == 110 %}Standby\n{% elif sensor_value == 111 %}Pv Wake Up Bat\n{% elif sensor_value == 112 %}Gen Check\n{% elif sensor_value == 113 %}Gen Run\n{% else %}Not Available{% endif %}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":510,"y":960,"wires":[["dbfb27cb41f74560"]]},{"id":"dbfb27cb41f74560","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax Status Description","entityConfig":"7e78bcb0dc4a946a","version":0,"state":"payload","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":850,"y":960,"wires":[[]]},{"id":"73cb4f605a6fb492","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax PV1 Power","entityConfig":"fc8a5d8cec96bf6f","version":0,"state":"payload.result.powerdc1","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":830,"y":860,"wires":[["f2de74b8de0f8b29"]]},{"id":"14225fc414242c2b","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax PV2 Power","entityConfig":"4111a29d5f8527ef","version":0,"state":"payload.result.powerdc2","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":830,"y":900,"wires":[["253f997731ae563a"]]},{"id":"58e0da7c456985e8","type":"function","z":"98b906d4b3340b11","name":"Calc Total Efficiency","func":"let real = msg.payload.result.acpower\nlet max = 3500\n\nlet actual = (real * 100) / max\n\nmsg.payload = actual.toFixed(0);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1120,"y":680,"wires":[["9d893b181987dc56"]]},{"id":"9d893b181987dc56","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax Power Efficiency","entityConfig":"24a6eca807e61f66","version":0,"state":"payload","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1360,"y":680,"wires":[[]]},{"id":"f2de74b8de0f8b29","type":"function","z":"98b906d4b3340b11","name":"Calc PV1 Efficiency","func":"let real = msg.payload.result.powerdc1\nlet max = 2500\n\nlet actual = (real * 100) / max\n\nmsg.payload = actual.toFixed(0);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1110,"y":860,"wires":[["7f702f60fb4faea5"]]},{"id":"7f702f60fb4faea5","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax PV1 Efficiency","entityConfig":"be671f0763c37327","version":0,"state":"payload","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1360,"y":860,"wires":[[]]},{"id":"253f997731ae563a","type":"function","z":"98b906d4b3340b11","name":"Calc PV2 Efficiency","func":"let real = msg.payload.result.powerdc2\nlet max = 1000\n\nlet actual = (real * 100) / max\n\nmsg.payload = actual.toFixed(0);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1110,"y":900,"wires":[["fe6caa1bcef248ad"]]},{"id":"fe6caa1bcef248ad","type":"ha-sensor","z":"98b906d4b3340b11","name":"Solax PV2 Efficiency","entityConfig":"22e19257a6374be2","version":0,"state":"payload","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1360,"y":900,"wires":[[]]},{"id":"ae1089628365eeee","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax Total Energy","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax Total Energy"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"energy"},{"property":"unit_of_measurement","value":"kWh"},{"property":"state_class","value":"total_increasing"}],"resend":false,"debugEnabled":false},{"id":"d55ae07db082c7e0","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax Power","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax Power"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"power"},{"property":"unit_of_measurement","value":"W"},{"property":"state_class","value":"measurement"}],"resend":false,"debugEnabled":false},{"id":"2c4b7ccddfd2f1d7","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax Day Energy","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax Day Energy"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"energy"},{"property":"unit_of_measurement","value":"kWh"},{"property":"state_class","value":"total_increasing"}],"resend":false,"debugEnabled":false},{"id":"a48e602b6d15334a","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax Last Updated","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax Last Updated"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"date"},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"84be367fd262db4b","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax Status","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax Status"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"55430927.517ce8","type":"server","name":"Home Assistant - PMFernandes","version":5,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":true,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"7e78bcb0dc4a946a","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax Status Description","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax Status Description"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"fc8a5d8cec96bf6f","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax PV1 Power","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax PV1 Power"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"power"},{"property":"unit_of_measurement","value":"W"},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"4111a29d5f8527ef","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax PV2 Power","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax PV2 Power"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":"power"},{"property":"unit_of_measurement","value":"W"},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"24a6eca807e61f66","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax Power Efficiency","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax Power Efficiency"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":"%"},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"be671f0763c37327","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax PV1 Efficiency","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax PV1 Efficiency"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":"%"},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"22e19257a6374be2","type":"ha-entity-config","server":"55430927.517ce8","deviceConfig":"e9b2a73f7083476d","name":"Solax PV2 Efficiency","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Solax PV2 Efficiency"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":"%"},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"e9b2a73f7083476d","type":"ha-device-config","name":"Solax Power","hwVersion":"SRQDNJZYHC","manufacturer":"Pedro Miguel Fernandes","model":"XB3336IA761340","swVersion":"1.0.0.0"}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement