Hi there, I am an enthusiastic newbie to Home Assistant and try to get some information from my SF-WR-3600 inverter. I got the info from the measurements.xml to work, but also found a custom library: PySolarFrontier (pysolarfrontier · PyPI). I would like to try that one as well. I did an install of the library, but I can’t figure out what to do next and where to put the files.
Can anyone can share their experience with this library and how you set this up? Very much appreciated!
Hello Peter, what script are using for reading measurements.xml?
This is what i am using right now. Still got some errors because at night some fields do not exist.
sensor:
- platform: systemmonitor
resources:
- type: processor_use
- type: processor_temperature
- type: memory_use_percent
- type: memory_use
- type: memory_free
- type: disk_use_percent
- type: swap_use_percent
- type: swap_use
- type: swap_free
- type: last_boot
- platform: rest # Uitlezen van Solar Frontier Inverter
resource: http://aaa.bbb.ccc.ddd/measurements.xml
json_attributes:
- root
- Measurements
name: Solar_Frontier
scan_interval: 60
timeout: 20
value_template: 'OK'
- platform: template
sensors:
solar_live_output:
value_template: >
{% set root = state_attr('sensor.solar_frontier', 'root') %}
{% if root.Device.Measurements.Measurement is defined and root.Device.Measurements.Measurement | length > 0 %}
{{ (root.Device.Measurements.Measurement | selectattr('@Type', 'eq', 'AC_Power') | list | first)['@Value'] | default }}
{% else %}
0
{% endif %}
device_class: power
unit_of_measurement: 'W'
friendly_name: Solar Frontier Live power
solar_live_temp:
value_template: >
{% set root = state_attr('sensor.solar_frontier', 'root') %}
{% if root.Device.Measurements.Measurement is defined and root.Device.Measurements.Measurement | length > 0 %}
{{ (root.Device.Measurements.Measurement | selectattr('@Type', 'eq', 'Temp') | list | first)['@Value'] | default }}
{% else %}
0
{% endif %}
device_class: temperature
unit_of_measurement: '°C'
friendly_name: Solar Frontier temperature
- platform: integration # Omzetten Solar Frontier Watt naar kWh
source: sensor.solar_live_output
name: Solar Frontier Energy Created
unit_prefix: k
round: 3
# Solar Frontier bereken dagelijks/maandelijks prodcutie
utility_meter:
daily_energy:
source: sensor.solar_frontier_energy_created
name: Solar Frontier Daily Energy
cycle: daily
monthly_energy:
source: sensor.solar_frontier_energy_created
name: Solar Frontier Monthly Energy
cycle: monthly
yearly_energy:
source: sensor.solar_frontier_energy_created
name: Solar Frontier Yearly Energy
cycle: yearly