Solax inverter is connected to internet by wire, also worked when you have Wifi dongle. Tested on Solax X3.
Thank you for inspiration:
- pdvbee (link later)
- doublet
ToDo:
- upload time timestamp
- icons
- device_states
https://github.com/lowprize/homeassistant-solax-api
- platform: rest
name: Solax API
resource: https://www.eu.solaxcloud.com:9443/proxy/api/getRealtimeInfo.do?tokenId=XXXXXXXXXXXXXXXXXXXXXXXXXX&sn=XXXXXXXX
method: GET
scan_interval: 15
value_template: 'OK'
json_attributes:
- success
- exception
- result
- platform: template
sensors:
solax_api_sn:
friendly_name: "Unique identifier of communication module"
value_template: '{{ states.sensor.solax_api.attributes["result"]["sn"] }}'
solax_api_acpower:
friendly_name: "Inverter AC power total"
value_template: '{{ states.sensor.solax_api.attributes["result"]["acpower"] }}'
unit_of_measurement: "kW"
solax_api_yieldtoday:
friendly_name: "Inverter AC energy out daily"
value_template: '{{ states.sensor.solax_api.attributes["result"]["yieldtoday"] }}'
unit_of_measurement: "kW"
solax_api_yieldtotal:
friendly_name: "Inverter AC energy out total"
value_template: '{{ states.sensor.solax_api.attributes["result"]["yieldtotal"] }}'
unit_of_measurement: "kW"
solax_api_feedinpower:
friendly_name: "Grid power total"
value_template: '{{ states.sensor.solax_api.attributes["result"]["feedinpower"] }}'
unit_of_measurement: "W"
solax_api_feedinenergy:
friendly_name: "Grid energy to Grid total"
value_template: '{{ states.sensor.solax_api.attributes["result"]["feedinenergy"] }}'
unit_of_measurement: "kW"
solax_api_consumeenergy:
friendly_name: "Grid energy from Grid total "
value_template: '{{ states.sensor.solax_api.attributes["result"]["consumeenergy"] }}'
unit_of_measurement: "kW"
solax_api_feedinpowerm2:
friendly_name: "Inverter Meter2 AC power total"
value_template: '{{ states.sensor.solax_api.attributes["result"]["feedinpowerM2"] }}'
unit_of_measurement: "W"
solax_api_soc:
friendly_name: "BMS energy SOC"
value_template: '{{ states.sensor.solax_api.attributes["result"]["soc"] }}'
unit_of_measurement: "%"
solax_api_peps1:
friendly_name: "Inverter AC EPS power R"
value_template: '{{ states.sensor.solax_api.attributes["result"]["peps1"] }}'
unit_of_measurement: "W"
solax_api_peps2:
friendly_name: "Inverter AC EPS power S"
value_template: '{{ states.sensor.solax_api.attributes["result"]["peps2"] }}'
unit_of_measurement: "W"
solax_api_peps3:
friendly_name: "Inverter AC EPS power T"
value_template: '{{ states.sensor.solax_api.attributes["result"]["peps3"] }}'
unit_of_measurement: "W"
# Ivertor type
solax_api_invertertype:
friendly_name: "Inverter Type"
value_template: >-
{% if states.sensor.solax_api.attributes["result"]["inverterType"] == "1" %}
X1-LX
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "2" %}
X-Hybrid
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "3" %}
X1-Hybiyd/Fit
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "4" %}
X1-Boost/Air/Mini
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "5" %}
X3-Hybiyd/Fit
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "6" %}
X3-20K/30K
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "7" %}
X3-MIC/PRO
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "8" %}
X1-Smart
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "9" %}
X1-AC
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "10" %}
A1-Hybrid
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "11" %}
A1-Fit
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "12" %}
A1-Grid
{% elif states.sensor.solax_api.attributes["result"]["inverterType"] == "13" %}
J1-ESS
{% else %}
Unknown
{% endif %}
# End of Invertor type
# Invertor status
solax_api_inverterstatus:
friendly_name: "Inverter status"
value_template: >-
{% if states.sensor.solax_api.attributes["result"]["inverterStatus"] == "100" %}
Wait Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "101" %}
Check Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "102" %}
Normal Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "103" %}
Fault Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "104" %}
Permanent Fault Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "105" %}
Update Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "106" %}
EPS Check Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "107" %}
EPS Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "108" %}
Self-Test Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "109" %}
Idle Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "110" %}
Standby Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "111" %}
Pv Wake Up Bat Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "112" %}
Gen Check Mode
{% elif states.sensor.solax_api.attributes["result"]["inverterStatus"] == "113" %}
Gen Run Mode
{% else %}
Unknown status
{% endif %}
# End of Invertor status
solax_api_uploadtime:
friendly_name: "Update time"
value_template: '{{ states.sensor.solax_api.attributes["result"]["uploadTime"] }}'
solax_api_batpower:
friendly_name: "Inverter DC Battery power total"
value_template: '{{ states.sensor.solax_api.attributes["result"]["batPower"] }}'
unit_of_measurement: "W"
solax_api_powerdc1 :
friendly_name: "Inverter DC PV power MPPT1"
value_template: '{{ states.sensor.solax_api.attributes["result"]["powerdc1"] }}'
unit_of_measurement: "W"
solax_api_powerdc2:
friendly_name: "Inverter DC PV power MPPT2"
value_template: '{{ states.sensor.solax_api.attributes["result"]["powerdc2"] }}'
unit_of_measurement: "W"
solax_api_powerdc3:
friendly_name: "Inverter DC PV power MPPT3"
value_template: '{{ states.sensor.solax_api.attributes["result"]["powerdc3"] }}'
unit_of_measurement: "W"
solax_api_powerdc4:
friendly_name: "Inverter DC PV power MPPT4"
value_template: '{{ states.sensor.solax_api.attributes["result"]["powerdc4"] }}'
unit_of_measurement: "W"