Looks good, could you share with us your setup? i would also like to create it in this way.
Hi,
I can share a view things of the setup, sure - but most is straight ahead with the available integrations:
- SolarEdge (API)
- SolarEdge Modbus (GitHub - binsentsu/home-assistant-solaredge-modbus: Home assistant Component for reading data locally from Solaredge inverter through modbus TCP) available via HACS
- NodeRed
For NodeRed I am using a slightly modified node-red contribution (GitHub - ChristophCaina/node-red-contrib-solaredge-2: SolarEdge node for Node-RED)
So, you would need to install NodeRed throught Supervisor + NodeRed Companion (HACS)
How to Install the contribution in NodeRED:
Add the following information to the NodeRed Configuration in Supervisor:
npm_packages:
- christophcaina/node-red-contrib-solaredge-2
In NodeRed, You need to create your Sensors and flow for accessing the SolarEdge API, you can use the following JSON which is a 1:1 copy of my flow… I have only removed the SiteID and API Key…
[{"id":"4d45645a2643ba26","type":"tab","label":"SolarEdge","disabled":false,"info":""},{"id":"0e655839d02d5fc9","type":"change","z":"4d45645a2643ba26","name":"Overview.LifeTimeData.Revenue","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.overview.lifeTimeData.revenue","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":40,"wires":[["5803c57ce796a8e7"]]},{"id":"ecf5c878995a7511","type":"change","z":"4d45645a2643ba26","name":"envBenefits.GasEmissionsSaved","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.envBenefits.gasEmissionSaved","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":100,"wires":[["61510dd97197918c","425593de52254a5e","bd73612f32f8cdf7"]]},{"id":"c6d6c2db9bd1442e","type":"ha-entity","z":"4d45645a2643ba26","name":"SE_Web_lifeTimeRevenue_eur","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_Web_lifeTimeRevenue_eur"},{"property":"device_class","value":"sensor"},{"property":"icon","value":"mdi:currency-eur"},{"property":"unit_of_measurement","value":"€"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"msg","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1010,"y":40,"wires":[[]]},{"id":"e6b0c791a393aecf","type":"change","z":"4d45645a2643ba26","name":"envBenefits.TreesPlanted","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.envBenefits.treesPlanted","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":160,"wires":[["d6ba12821c19ca03"]]},{"id":"8af8073932ddf3dc","type":"ha-entity","z":"4d45645a2643ba26","name":"SE_Web_saved_co2_t","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_Web_saved_co2_t"},{"property":"device_class","value":"sensor"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"t"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"msg","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1250,"y":100,"wires":[[]]},{"id":"abca26c4b54bca87","type":"ha-entity","z":"4d45645a2643ba26","name":"SE_Web_saved_so2_t","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_Web_saved_so2_t"},{"property":"device_class","value":"sensor"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"t"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"msg","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1250,"y":160,"wires":[[]]},{"id":"47dcabfaec7e171f","type":"ha-entity","z":"4d45645a2643ba26","name":"SE_Web_saved_nox_t","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_Web_saved_nox_t"},{"property":"device_class","value":"sensor"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"t"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"msg","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":1240,"y":220,"wires":[[]]},{"id":"61510dd97197918c","type":"change","z":"4d45645a2643ba26","name":"CO2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.co2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":100,"wires":[["2e90555fa08481ec"]]},{"id":"425593de52254a5e","type":"change","z":"4d45645a2643ba26","name":"SO2","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.so2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":160,"wires":[["01b7d90dea1742ff"]]},{"id":"bd73612f32f8cdf7","type":"change","z":"4d45645a2643ba26","name":"NOX","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.nox","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":220,"wires":[["ac2beb88b2394070"]]},{"id":"2e90555fa08481ec","type":"function","z":"4d45645a2643ba26","name":"","func":"msg.payload = (msg.payload/1000).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":100,"wires":[["8af8073932ddf3dc"]]},{"id":"01b7d90dea1742ff","type":"function","z":"4d45645a2643ba26","name":"","func":"msg.payload = (msg.payload/1000).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":160,"wires":[["abca26c4b54bca87"]]},{"id":"ac2beb88b2394070","type":"function","z":"4d45645a2643ba26","name":"","func":"msg.payload = (msg.payload/1000).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":220,"wires":[["47dcabfaec7e171f"]]},{"id":"a99d32624fa7fbf1","type":"ha-entity","z":"4d45645a2643ba26","name":"SE_Web_treeplanted","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_Web_treeplanted"},{"property":"device_class","value":"sensor"},{"property":"icon","value":"mdi:forest"},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"msg","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":980,"y":280,"wires":[[]]},{"id":"d6ba12821c19ca03","type":"function","z":"4d45645a2643ba26","name":"","func":"msg.payload = msg.payload.toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":280,"wires":[["a99d32624fa7fbf1"]]},{"id":"5803c57ce796a8e7","type":"function","z":"4d45645a2643ba26","name":"","func":"msg.payload = msg.payload.toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":40,"wires":[["c6d6c2db9bd1442e"]]},{"id":"fff50b84934baf75","type":"change","z":"4d45645a2643ba26","name":"meters","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Inventory.meters","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":480,"wires":[["c0baa6ac35156319","6455a476424f263a","f39f75e1e445e670","578cde59428a676c"]]},{"id":"c52c28d578c59349","type":"change","z":"4d45645a2643ba26","name":"sensors","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Inventory.sensors","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":600,"wires":[[]]},{"id":"ffb7bb3a4c21e979","type":"change","z":"4d45645a2643ba26","name":"gateways","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Inventory.gateways","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":640,"wires":[[]]},{"id":"54ebeb33c39cca9d","type":"change","z":"4d45645a2643ba26","name":"batteries","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Inventory.batteries","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":680,"wires":[[]]},{"id":"296119cd70b4b957","type":"change","z":"4d45645a2643ba26","name":"inverters","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Inventory.inverters","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":720,"wires":[["d010c7eab6815d9f"]]},{"id":"c0baa6ac35156319","type":"change","z":"4d45645a2643ba26","name":"0 - export meter","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":400,"wires":[["6abd57ac1f280cc0"]]},{"id":"6455a476424f263a","type":"change","z":"4d45645a2643ba26","name":"1 - import meter","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.1","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":440,"wires":[["abcb6110fe9e9429"]]},{"id":"f39f75e1e445e670","type":"change","z":"4d45645a2643ba26","name":"2 - consumtion meter","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":500,"wires":[["9b19f045380fa3d1"]]},{"id":"578cde59428a676c","type":"change","z":"4d45645a2643ba26","name":"3 - self consumtion meter","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.3","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":540,"wires":[["9a898b3cd07baa4b"]]},{"id":"6abd57ac1f280cc0","type":"ha-entity","z":"4d45645a2643ba26","name":"ExportMeter.Name","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_ExportMeter_Name"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload.name","stateType":"msg","attributes":[{"property":"Manufacturer","value":"payload.manufacturer","valueType":"msg"},{"property":"Model","value":"payload.model","valueType":"msg"},{"property":"FirmwareVersion","value":"payload.firmwareVersion","valueType":"msg"},{"property":"SerialNo","value":"payload.SN","valueType":"msg"},{"property":"ConnectedTo","value":"payload.connectedTo","valueType":"msg"},{"property":"connectedSolaredgeDeviceSN","value":"payload.connectedSolaredgeDeviceSN","valueType":"msg"},{"property":"MeterType","value":"payload.type","valueType":"msg"},{"property":"MeterForm","value":"payload.form","valueType":"msg"}],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":790,"y":380,"wires":[[]]},{"id":"abcb6110fe9e9429","type":"ha-entity","z":"4d45645a2643ba26","name":"ImportMeter.Name","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_ImportMeter_Name"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload.name","stateType":"msg","attributes":[{"property":"Manufacturer","value":"payload.manufacturer","valueType":"msg"},{"property":"Model","value":"payload.model","valueType":"msg"},{"property":"FirmwareVersion","value":"payload.firmwareVersion","valueType":"msg"},{"property":"SerialNo","value":"payload.SN","valueType":"msg"},{"property":"ConnectedTo","value":"payload.connectedTo","valueType":"msg"},{"property":"connectedSolaredgeDeviceSN","value":"payload.connectedSolaredgeDeviceSN","valueType":"msg"},{"property":"MeterType","value":"payload.type","valueType":"msg"},{"property":"MeterForm","value":"payload.form","valueType":"msg"}],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":790,"y":440,"wires":[[]]},{"id":"9b19f045380fa3d1","type":"ha-entity","z":"4d45645a2643ba26","name":"ConsumtionMeter.Name","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_ConsumptionMeter_Name"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload.name","stateType":"msg","attributes":[{"property":"Manufacturer","value":"payload.manufacturer","valueType":"msg"},{"property":"Model","value":"payload.model","valueType":"msg"},{"property":"FirmwareVersion","value":"payload.firmwareVersion","valueType":"msg"},{"property":"SerialNo","value":"payload.SN","valueType":"msg"},{"property":"ConnectedTo","value":"payload.connectedTo","valueType":"msg"},{"property":"connectedSolaredgeDeviceSN","value":"payload.connectedSolaredgeDeviceSN","valueType":"msg"},{"property":"MeterType","value":"payload.type","valueType":"msg"},{"property":"MeterForm","value":"payload.form","valueType":"msg"}],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":850,"y":500,"wires":[[]]},{"id":"9a898b3cd07baa4b","type":"ha-entity","z":"4d45645a2643ba26","name":"SelfConsumtionMeter.Name","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_SelfConsumptionMeter_Name"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload.name","stateType":"msg","attributes":[{"property":"Manufacturer","value":"payload.manufacturer","valueType":"msg"},{"property":"Model","value":"payload.model","valueType":"msg"},{"property":"FirmwareVersion","value":"payload.firmwareVersion","valueType":"msg"},{"property":"SerialNo","value":"payload.SN","valueType":"msg"},{"property":"ConnectedTo","value":"payload.connectedTo","valueType":"msg"},{"property":"connectedSolaredgeDeviceSN","value":"payload.connectedSolaredgeDeviceSN","valueType":"msg"},{"property":"MeterType","value":"payload.type","valueType":"msg"},{"property":"MeterForm","value":"payload.form","valueType":"msg"}],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":860,"y":560,"wires":[[]]},{"id":"99fc5aa640a2be24","type":"ha-entity","z":"4d45645a2643ba26","name":"Inverter.Name","server":"893f8903.f63a38","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"SE_Inverter_Name"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload.name","stateType":"msg","attributes":[{"property":"Manufacturer","value":"payload.manufacturer","valueType":"msg"},{"property":"Model","value":"payload.model","valueType":"msg"},{"property":"Communication Method","value":"payload.communicationMethod","valueType":"msg"},{"property":"SerialNo","value":"payload.SN","valueType":"msg"},{"property":"dsp1-Version","value":"payload.dsp1Version","valueType":"msg"},{"property":"dsp2-Version","value":"payload.dsp2Version","valueType":"msg"},{"property":"CPUVersion","value":"payload.cpuVersion","valueType":"msg"},{"property":"Optimizers","value":"payload.connectedOptimizers","valueType":"msg"}],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":840,"y":720,"wires":[[]]},{"id":"d010c7eab6815d9f","type":"change","z":"4d45645a2643ba26","name":"0 - Inverter 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.0","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":720,"wires":[["99fc5aa640a2be24"]]},{"id":"795183bd2b5292e0","type":"solaredge","z":"4d45645a2643ba26","site":"f7aecf71f8eb4631","interval":"10800","command":"overview","x":100,"y":40,"wires":[["0e655839d02d5fc9","bc524e863d41b667"]]},{"id":"1e26ac863d541626","type":"solaredge","z":"4d45645a2643ba26","site":"f7aecf71f8eb4631","interval":"10810","command":"envBenefits","x":100,"y":100,"wires":[["ecf5c878995a7511","e6b0c791a393aecf","bc524e863d41b667"]]},{"id":"8540666a798e4675","type":"solaredge","z":"4d45645a2643ba26","site":"f7aecf71f8eb4631","interval":"10820","command":"inventory","x":100,"y":480,"wires":[["fff50b84934baf75","c52c28d578c59349","ffb7bb3a4c21e979","54ebeb33c39cca9d","296119cd70b4b957","bc524e863d41b667"]]},{"id":"bc524e863d41b667","type":"debug","z":"4d45645a2643ba26","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":370,"y":280,"wires":[]},{"id":"893f8903.f63a38","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30},{"id":"f7aecf71f8eb4631","type":"solaredge-site","siteid":"","apikey":""}]
Furthermore, here are some of my configs from the yaml which do:
- calculation of Wh into kWh
- calculation of Revenues
- calculation of total export & import based on previous readings, before the export & import meter were been installed.
- SolarEdge Inverter Status
- calculation of usage, and so on
# SolarEdge Energy Sensors in kWh instead of Wh
# Todays energy in kWh
solaredge_energy_today_kwh:
friendly_name: solaredge (Energy today) [kWh]
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.solaredge_api_energy_today') | float(default=0) / 1000 | round(2) }}"
icon_template: mdi:solar-power
# This months energy in kWh
solaredge_energy_this_month_kwh:
friendly_name: solaredge (Energy this month) [kWh]
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.solaredge_api_energy_this_month') | float(default=0) / 1000 | round(2) }}"
icon_template: mdi:solar-power
# This years energy in kWh
solaredge_energy_this_year_kwh:
friendly_name: solaredge (Energy this year) [kWh]
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.solaredge_api_energy_this_year') | float(default=0) / 1000 | round(2) }}"
icon_template: mdi:solar-power
# Lifetimes energy in kWh
solaredge_lifetime_energy_kwh:
friendly_name: solaredge (Lifetime energy) [kWh]
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.solaredge_api_lifetime_energy') | float(default=0) / 1000 | round(2) }}"
icon_template: mdi:solar-power
# Exported energy in kWh
solaredge_exported_energy_kwh:
friendly_name: solaregde (Einspeisung) [kWh]
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.solaredge_api_exported_energy') | float(default=0) / 1000 | round(2) }}"
icon_template: mdi:home-export-outline
# Imported Energy in kWh
solaredge_imported_energy_kwh:
friendly_name: solaregde (Bezug) [kWh]
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.solaredge_api_imported_energy') | float(default=0) / 1000 | round(2) }}"
icon_template: mdi:home-import-outline
# Selfconsumed Energy in kWh
solaredge_selfconsumption_energy_kwh:
friendly_name: solaregde (Eigenverbrauch) [kWh]
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.solaredge_api_selfconsumption_energy') | float(default=0) / 1000 | round(2) }}"
icon_template: mdi:lightning-bolt
# Consumed total Energy in kWh
solaredge_consumption_energy_kwh:
friendly_name: solaregde (Verbrauch) [kWh]
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.solaredge_api_consumption_energy') | float(default=0) / 1000 | round(2) }}"
icon_template: mdi:lightning-bolt
# Calculate current power into kW
solaredge_current_power_kw:
friendly_name: 'Current Power kW'
unit_of_measurement: "kW"
icon_template: mdi:flash
value_template: >-
{{ states('sensor.solaredge_modbus_ac_power') | float(default=0) / 1000 | round(2) }}
# calculate the Self-sufficiency in percent
solaredge_calculated_self_sufficiency:
friendly_name: 'Autarkie-Grad'
unit_of_measurement: "%"
value_template: >-
{% if is_state('sensor.solaredge_selfconsumption_energy_kwh', '0.0') or is_state('sensor.solaredge_consumption_energy_kwh', '0.0') %}
0.0
{% else %}
{% set selfconsumption = states('sensor.solaredge_selfconsumption_energy_kwh') | float(default=0) %}
{% set consumption = states('sensor.solaredge_consumption_energy_kwh') | float(default=0) %}
{{ ((selfconsumption / consumption) * 100) | round(2) }}
{% endif %}
# calculate the usage of the solar installation in percent
solaredge_calculated_solar_usage:
friendly_name: 'Nutzungsgrad'
unit_of_measurement: "%"
value_template: >-
{% if is_state('sensor.solaredge_energy_today_kwh', '0.0') or is_state('sensor.solaredge_selfconsumption_energy_kwh', '0.0') %}
0.0
{% else %}
{% set production = states('sensor.solaredge_energy_today_kwh') | float(default=0) %}
{% set consumption = states('sensor.solaredge_selfconsumption_energy_kwh') | float(default=0) %}
{{ ((consumption / production) * 100) | round(2) }}
{% endif %}
# calculate the energy export in percent
solaredge_calculated_energy_export:
friendly_name: 'Netzeinspeisung'
unit_of_measurement: "%"
value_template: >-
{% if is_state('sensor.solaredge_energy_today_kwh', '0.0') or is_state('sensor.solaredge_exported_energy_kwh', '0.0') %}
0.0
{% else %}
{% set production = states('sensor.solaredge_energy_today_kwh') | float(default=0) %}
{% set export = states('sensor.solaredge_exported_energy_kwh') | float(default=0) %}
{{ ((export / production) * 100) | round(2) }}
{% endif %}
# kWh / kWp calculation
# calculate monthly kWh per kWp
solaredge_yearly_kwh_kwp:
friendly_name: "Yearly kWh/kWp"
unit_of_measurement: "kWh"
value_template: >-
{{ (states('sensor.solaredge_energy_this_year_kwh') | float / '13.26' | float) | float(default=0.0)|round(2) }}
# 13.26 = max kWp of the installation
# calculate monthly kWh per kWp
solaredge_monthly_kwh_kwp:
friendly_name: "Monthly kWh/kWp"
unit_of_measurement: "kWh"
value_template: >-
{{ (states('sensor.solaredge_energy_this_month_kwh') | float / '13.26' | float) | float(default=0.0)|round(2) }}
# 13.26 = max kWp of the installation
# calculate daily kWh per kWp
solaredge_daily_kwh_kwp:
friendly_name: "Daily kWh/kWp"
unit_of_measurement: "kWh"
value_template: >-
{{ (states('sensor.solaredge_energy_today_kwh') | float / '13.26' | float) | float(default=0.0)|round(2) }}
# 13.26 = max kWp of the installation
# SolarEdge Inverter Status in Readable Text
solaredge_status_text:
friendly_name: "Solaredge status text"
value_template: >-
{% if is_state('sensor.solaredge_modbus_status', '1') %}
Aus
{% elif is_state('sensor.solaredge_modbus_status', '2') %}
Ruhezustand
{% elif is_state('sensor.solaredge_modbus_status', '3') %}
fährt hoch
{% elif is_state('sensor.solaredge_modbus_status', '4') %}
Produzierend
{% elif is_state('sensor.solaredge_modbus_status', '5') %}
Gedrosselt
{% elif is_state('sensor.solaredge_modbus_status', '6') %}
fährt herunter
{% elif is_state('sensor.solaredge_modbus_status', '7') %}
Fehler
{% elif is_state('sensor.solaredge_modbus_status', '8') %}
Wartung
{% else %}
Unbekannt
{% endif %}
# can be taken from integration SolarEdge Modbus Inverter_Status -> Attributes
# SolarEdge Inverter Status_Vendor in Readable Text
# solaredge_status_vendor_text:
# friendly_name: "SolarEdge StatusVendor Text"
# value_template: >-
# {% if is_state('sensor_solaredge_modbus_status_vendo', '79') or is_state('sensor_solaredge_modbus_status_vendo', '80') or if is_state('sensor_solaredge_modbus_status_vendo', '81') %}
# AC Frequenz zu hoch!
# {% if is_state('sensor_solaredge_modbus_status_vendo', '82') or is_state('sensor_solaredge_modbus_status_vendo', '83') or if is_state('sensor_solaredge_modbus_status_vendo', '84') %}
# AC Frequenz zu niedrig!
# {% if is_state('sensor_solaredge_modbus_status_vendo', '104') %}
# Temperatur zu hoch!
# {% else %}
# Unbekannt
# {% endif %}
# Calculate revenue / kWh
solaredge_revenue_kwh:
friendly_name: "Ertrag pro kWh"
unit_of_measurement: "€"
icon_template: mdi:currency-eur
value_template: >-
{% set revenue = states('sensor.SE_Web_LifeTimeRevenue_EUR') | float(default=0) %}
{% set lifetimeenergy = states('sensor.solaredge_modbus_ac_energy_kwh') | float(default=0) %}
{{ (revenue / lifetimeenergy) | round(4) }}
# Calculation of Revenue and Savings based on additional information (Export / Import)
# calculation of total import since installation
solaredge_total_import_kwh:
friendly_name: 'Total Import kWh'
unit_of_measurement: 'kWh'
icon_template: mdi:home-import-outline
value_template: >-
{% set imported_since_meter_installation = states('sensor.solaredge_modbus_m1_imported_kwh') | float(default=0) %}
{% set imported_before_meter_installation = 296 | float(default=0) %}
{{ imported_before_meter_installation + imported_since_meter_installation | round(2) }}
# Installation Modbus-meter: 21.09.2021 start counting = 0
# imported engery till 30.09.2021 : 320 kWh (Import) [needs to substract measurements from 21.09. till 30.09]
# calculation of total export since installation
solaredge_total_export_kwh:
# state_class: measurement
# device_class: energy
friendly_name: 'Total Export kWh'
unit_of_measurement: 'kWh'
icon_template: mdi:home-export-outline
value_template: >-
{% set exported_since_meter_installation = states('sensor.solaredge_modbus_m1_exported_kwh') | float(default=0) %}
{% set exported_before_meter_installation = 7050 | float(default=0) %}
{{ exported_before_meter_installation + exported_since_meter_installation | round(2) }}
# Installation Modbus-meter: 21.09.2021 start counting = 0
# exported energy till 30.09.2021 : 7.470 kWh (Export) [needs to substract measurements from 21.09. till 30.09]
# calculation of self consumption since installation
solaredge_total_selfconsumption_kwh:
friendly_name: 'Total SelfConsumption kWh'
unit_of_measurement: 'kWh'
value_template: >-
{% set produced = states('sensor.solaredge_modbus_ac_energy_kwh') | float(default=0) %}
{% set exported = states('sensor.solaredge_total_export_kwh') | float(default=0) %}
{% set selfconsumed = produced - exported |float(default=0) %}
{{ selfconsumed | round(2) }}
# Calculation of Total Savings in €
solaredge_total_savings:
friendly_name: 'Total Savings €'
unit_of_measurement: '€'
value_template: >-
{{ (states('sensor.solaredge_total_selfconsumption_kwh')|float(default=0) * 28.80 / 100) | round(2) }}
# self consumption * current price per kWh / 100
Thank you very much, i will have a closer look.
But currently i am struggling in the visualization of the binsentsu modbus entity*s. this is giving me wring values. Still investigating.
i opened an issue at github, can not find the failure on my own.
Can you explain what exactly the issue is?
Maybe it is a failure in the database, caused by an update.
Same as discussed here:
I just noticed a new feature in developer tools that shows any issues with the long term statistics database which is what energy dashboard uses
It even offers a “fix issue” button.
Thank i i aready saw it but no issue is shown here fot both entities.
Couldn’t you take a step-by-step guide?
I followed your procedure and where I could not I went to look for further information on Google.
Couldn’t you take a step-by-step guide?
I followed your procedure and where I could not I went to look for further information on Google.
But visually I don’t see anything in the general dashboard or in that energy.
what kind of Guide do you want to have?
For what exact purpose?
Including the SolarEdge system into the Energy dashboard - or into HomeAssistant in general isn’t that complicated, but it depends on the kind of integration you are using and your setup.
For example:
- There is the SolarEdge Integration provided by default with HomeAssistant.
This integration connects to your SolarEdge Webinterface via API - and collect relevant information in certain intervals. - There are additional integrations which you can setup with HACS - such as the SolarEdge Modbus by binsentsu
This integration allows you to connect to the SolarEdge Inverter with a direct Modbus communication over your network, but it has to be setup within your Inverter - which can be a bit difficult in some cases. - My NodeRed Integration:
The integration with NodeRed provides basically the same information than the default HA Integration, because it does poll the SolarEdge API too.
BUT: it does also provide a few more information which the current Integration does not (at least at the time when I created the NodeRed thing)…
I don’t know, if the default HA integration is already capable to get these information, too… I think I’ve created a feature request back then…
So… now the question:
What kind of Guide do you want / need?
Whats your current setup and which integrations do you use?
I have:
- modbus enabled through my inverter.
- Official Solaredge cloud integration.
- Solaredge Modbus integration via HACS.
- Node-red supervisor.
- Node-red Companion
- Node-red in Supervisor configuration I added npm_packages: christophcaina / node-red-contrib-solaredge-2
- I created the JSON file inside config / node-red by adding my ID and API.
- I modified the configuration.yaml file by copying what you wrote here.
I would like to get the same information you have in your photo and with the same graphics.
Hi,
If you have everything set up, you should be able to use most of the values I am showing in this dashboard already - You should get the overall production from your inverter, the daily, weekly and monthly production, and so on.
The charts in the middle of the screen are the default integration from the energy dashboard.
You need to setup the correct sensors within the energy dashboard - and then, you can check this documentation on how to use the cards in another dashboard as well: Energy Cards - Home Assistant
Despite of that, I have already made some changes in my own dashboard, so I am no longer using the version I’ve showed in the screenshot - but a slightly changed one… and I am planning some more changes in the UI…
Maybe you can share your current dashboard, in order to see, where exactly you are - and then, the community and I can give you some assistance how to setup your dashboard?
Saying that:
All relevant information are already available in this forum, since I have also used several topics and discussions with tips and tricks to create this view.
you need to setup your sensors in the energy dashboard configuration:
how this can be done: Understanding Home Energy Management - Home Assistant
Ok, it’s starting to take shape but the data it reports seems exaggerated to me.
I put all the sensors from the modbus and selected the storage battery parameters.
maybe, you better ask in the general “configuration” area for such issues.
Since I don’t know how much energy you are consuming, I cannot provide any furter input on this.
The house costs 0.2kW if we are at home between TV, PC and little other consumption 0.4kW
I node-red should I see something?
For the Energy Dashboard you don’t need to create the NodeRed flow, since all your sensors for export, import, production should receive their data directly either per API integration or Modbus integration.
I really recommend that you start with basic implementation and the documentation from the different integrations that you are using - and then, slowly building up from “where you are”.
Start with one integration, see, how you can use - and integrate it - and then do the next integration.
This forum provides a lot of examples and tipps and tricks within the configuration category which will help you with your project.
I think, one of your problems in the screenshots above might be, that you have used the IMPORT A and EXPORT A sensor.
The Meter does provide several sensors for the import & export - and A, B, C are just the sensors for the different phases - there should be another sensor (without a, b or c) which will sum up all phases and provide the overall import and export energy value
Is anyone else having problems with recent versions of the Solaredge integration, where some sensor values that were working previously have become unavailable. ?
Hi @CChris,
I like your dashboard very much and would like to set it the same way. That said, I am very new to HA still and it’s still really hard for me to work out how everything works.
My basic setup (with modbus-proxy and modbusdata from my SE inverter) works, but I dont like the output, so your dashboard would be much better for me.
I have managed to install node-red, the companion and npm, the json with my site and API key and pasted (and adjusted to my production spoecifications) your config.yaml.
But I fear sth has gone wrong. I copypasted your configuration in my config.yaml file and rebooted, but the entities defined (like Nutzungsgrad etc) won’t show up. Where am I supposed to put them?