First, big thank you to saintmatt81. His post and the link to his GitHub repository was a massive help and I would not have managed without it.
I finally managed to set up everything in Home Assistant
Iām sure it is not the most beautiful or elegant solution - but it works for now. Iām grateful for any kind of feedback or improvementsā¦
Here is what I did:
- To get the data with CURL I added in the configuration.yaml:
shell_command:
run_curl: curl -X POST "https://<local_ip>:7000/login" -d "name=Login" -d 'pswd=<password>' -k -v -c /config/cookiejar.txt && curl -k -v -s -b /config/cookiejar.txt https://<local_ip>:7000/system/status/pcssystem -H "Accept:application/json" -o /config/qcells.json
This writes the data to a file called qcells.json in the /config/ folder.
- Also in the configuration.yaml I added an automation to trigger the CURL every second:
automation:
- alias: 'Run curl every 1 seconds'
trigger:
platform: time_pattern
seconds: '/1' # This runs every 1 seconds
action:
service: shell_command.run_curl
- To make the file accessible for the file integration I also added this to the configuration.yaml:
homeassistant:
allowlist_external_dirs:
- /config
- I used the file integration to set up a bunch of sensors that read the json file:
Here are the value templates I used:
- Qcells Battery Power:
{{ value_json.ess_all.inverter_info.bdc.power }} - Qcells Battery Power Charging:
{{ [value_json.ess_all.inverter_info.bdc.power, 0] | min | abs }} - Qcells Battery Power Discharging:
{{ [value_json.ess_all.inverter_info.bdc.power, 0] | max }} - Qcells Current Load:
{{ value_json.ess_all.inverter_info.bdc.power + value_json.meter_info.grid_active_power + value_json.ess_all.pv_info.power.0 + value_json.ess_all.pv_info.power.1 }} - Qcells Grid Active Power
{{ value_json.meter_info.grid_active_power }} - Qcells PV Power 1
{{ value_json.ess_all.pv_info.power.0 }} - Qcells PV Power 2
{{ value_json.ess_all.pv_info.power.1 }} - Qcells State of Charge
{{ value_json.current_avg_soc }}
For all the sensors I turned off the āpolling for changesā because it would update the sensor only every minute and I wanted a shorter interval (1 second). You can do that by clicking on the 3 dots next to the sensor name and then select āsystem optionsā.
- To have the sensors updated every second I added another automation to the configuration.yaml:
trigger:
platform: time_pattern
seconds: '/1'
action:
- service: homeassistant.update_entity
target:
entity_id: sensor.qcells_grid_active_power
- service: homeassistant.update_entity
target:
entity_id: sensor.qcells_pv_power_1
- service: homeassistant.update_entity
target:
entity_id: sensor.qcells_pv_power_2
- service: homeassistant.update_entity
target:
entity_id: sensor.qcells_state_of_charge
- service: homeassistant.update_entity
target:
entity_id: sensor.qcells_battery_power
- service: homeassistant.update_entity
target:
entity_id: sensor.qcells_battery_power_charging
- service: homeassistant.update_entity
target:
entity_id: sensor.qcells_battery_power_discharging
- service: homeassistant.update_entity
target:
entity_id: sensor.qcells_current_load


