QCells Q.Home energy dashboard questions

I don’t have a WiFi dongle, it’s connected via Ethernet to my network switch.

I recently had QCELLS solar/battery installed and i’m just starting to go down the HA route, would you be able to give me some time and help me get this setup on my home assistant server :frowning: :smiling_face_with_tear:

After years of successful request, today the REST integration started to fail because of a certificate mismatch: a request to https://qhome-ess-g3.q-cells.eu is returning a cert *.solaxcloud.com

Error fetching data: https://qhome-ess-g3.q-cells.eu/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=<removed>&sn=<removed>failed with Cannot connect to host qhome-ess-g3.q-cells.eu:443 ssl:True [SSLCertVerificationError: (1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'qhome-ess-g3.q-cells.eu'. (_ssl.c:1032)")]

Is the https://qhome-ess-g3.q-cells.eu/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=<removed>&sn=<removed> url still valid? Anyone experiencing issues with the integration?

Answering my own Q: switching to the SolaX Power - Home Assistant integration, using the local address of the dongle connected to the inverter, the serial number as password it works perfectly for a QCell inverter of type Q.VOLT_HYB-G3-1P.

Had the same thing happen indeed. Yesterday stopped receiving days from the API. Although i don’t get the certificate error, i get a ‘It works (https)’ result.
Still trying to figure out how to get the data as i haven’t yet figured out what the local ip address would be to see if it can work with the solax integration.

I’m having the same problem. Mine hasn’t been connecting for 5 days. It seems the server https://qhome-ess-g3.q-cells.eu/ is down. I’m trying to set up my HA as @republic1815 suggested, but besides having dozens of devices in my house, it’s already hard to identify the right IP. Is the port 80? Is the password the wireless device name in all caps?

I correct, I connected, using the solution of @republic1815 via SolaX Power.
Was only hard to fine the correct IP address, I’check one by one.
Port is 80, password wireless device name (all caps).

Great, i managed to connect it in HA as well now. I was wondering for a while what the Espressif device connected to my WiFi was…
Interesting to know that the wifi dongle is using an ESP32 chip :grin:

The problem is: reconfiguring all sensors already used in HA… long job

Yes, seems so. With the website itself you are not able to get a login screen. Only the app on smartphone is working. So I think the main problem is the website itself…
Is the SolaX Power - Home Assistant integration a good alternative?

Considering I have it linked to an influx database with a Grafana interface, it is rather annoying for sure :persevere:
Another afternoon refactoring, sigh

After a couple of days I am resorting to running a container locally with the squishykid/solax: :sun_with_face: Solax Inverter API Wrapper library, which I suppose is used in the Solax integration, to get raw data from the inverter (dongle) into an excel file.
I noticed no consumption in the energy dashboard in HA for extended period of time, as shown here via the integration, and I am also getting the same flat (always same number for hours) reporting of On-grid total yield, On-grid daily yield, Total feed-in energy, Total consumption from the raw data, while power & voltage etc. are fine.


My current hypothesis is that QCell is messing up greatly: first the cloud API stopped working, now this Solax integration might not seem to be the solution as the inverter Q.VOLT_HYB-G3-1P is not returning good data.

For those who invested time into the QCell REST based integration, carefully tailored by @welcomeha to the benefit of all of us, the QCell server have been fixed: the certificates are now (2025-01-12 afternoon in Europe) compliant to the URI and the data is coming through!
The url qhome-ess-g3.q-cells.eu/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=token&sn=123 is now returning data with the proper cert!

I have to add ‘inverterSN’ first line in jason_attributes.

True, now the QCell server is back. Has anyone seen the new web page displayed on the site https:qhome-ess-g3.q-cells.eu? It’s very nice. It would be nice to integrate it into the Home Assistant dashboard.

Does anyone else in EU having issues with the data from the QCell REST APIs? From March 30th I am getting data into HA that is underreporting the home consumption: I noticed it because the untracked consumption dropped from around 30% to even negative.

The analysis from my Claude + HA-MCP, after comparing the data retrieved over the last 30 days from QCell REST with the data exported from QCell portal, which is aligned with the data from locally retrieved Solax integration:

The “home consumption drop” was never real. Your house was consuming the same as always. The QCells cloud API silently started delivering wrong solar data after the DST change, making the available energy appear ~6 kWh/day lower, dragging the Home figure down with it and turning the untracked from +30% to negative.

To clarify, the rest integration gets errors very very often which result in unavailable data.

I just changed the configuration.yaml from the first post to the new template/sensor syntax. Nothing else new, just new syntax:

sensor:
  - platform: rest
    name: QCells Cloud
    resource: !secret solax_cloud
#    resource: !secret qcells_cloud
    method: GET
    scan_interval: 300
    timeout: 60
    value_template: 'OK'
    json_attributes_path: "$.result"
    json_attributes:
      - sn
      - acpower
      - yieldtoday
      - yieldtotal
      - feedinpower
      - feedinenergy
      - consumeenergy
      - feedinpowerM2
      - soc
      - peps1
      - peps2
      - peps3
      - inverterType
      - inverterStatus
      - uploadTime
      - batPower
      - powerdc1
      - powerdc2
      - powerdc3
      - powerdc4
      - batStatus

template:

  - sensor:
    - default_entity_id: sensor.qcells_cloud_sn
      name: "QCells Unique identifier of communication module"  
      state: "{{ state_attr('sensor.qcells_cloud', 'sn') }}"

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_acpower
      name: QCells Inverter AC power total
      state: '{{ state_attr(''sensor.qcells_cloud'', ''acpower'') }}'

  - sensor:
    - unit_of_measurement: kWh
      device_class: energy
      default_entity_id: sensor.qcells_cloud_yieldtoday
      name: QCells Inverter AC energy out daily
      state: '{{ state_attr(''sensor.qcells_cloud'', ''yieldtoday'') }}'

  - sensor:
    - unit_of_measurement: kWh
      device_class: energy
      default_entity_id: sensor.qcells_cloud_yieldtotal
      name: QCells Inverter AC energy out total
      state: '{{ state_attr(''sensor.qcells_cloud'', ''yieldtotal'') }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_feedinpower
      name: QCells Grid power total
      state: '{{ state_attr(''sensor.qcells_cloud'', ''feedinpower'') | int(default=0) }}'

  - sensor:
    - unit_of_measurement: kWh
      device_class: energy
      default_entity_id: sensor.qcells_cloud_feedinenergy
      name: QCells Grid energy to Grid total
      state: '{{ state_attr(''sensor.qcells_cloud'', ''feedinenergy'') }}'

  - sensor:
    - unit_of_measurement: kWh
      device_class: energy
      default_entity_id: sensor.qcells_cloud_consumeenergy
      name: QCells Grid energy from Grid total
      state: '{{ state_attr(''sensor.qcells_cloud'', ''consumeenergy'') }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_feedinpowerm2
      name: QCells Inverter Meter2 AC power total
      state: '{{ state_attr(''sensor.qcells_cloud'', ''feedinpowerM2'') }}'      

  - sensor:
    - unit_of_measurement: '%'
      default_entity_id: sensor.qcells_cloud_soc
      name: QCells BMS energy SOC
      state: '{{ state_attr(''sensor.qcells_cloud'', ''soc'') | int(default=0) | round(0) }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_peps1
      name: QCells Inverter AC EPS power 1
      state: '{{ state_attr(''sensor.qcells_cloud'', ''peps1'') }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_peps2
      name: QCells Inverter AC EPS power 2
      state: '{{ state_attr(''sensor.qcells_cloud'', ''peps2'') }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_peps3
      name: QCells Inverter AC EPS power 3
      state: '{{ state_attr(''sensor.qcells_cloud'', ''peps3'') }}'

  - sensor:
    - default_entity_id: sensor.qcells_cloud_invertertype
      name: QCells Inverter Type
      state: >
        {% if state_attr('sensor.qcells_cloud', 'inverterType') == "1" %}
          X1-LX
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "2" %}
          X-Hybrid
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "3" %}
          X1-Hybiyd/Fit
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "4" %}
          X1-Boost/Air/Mini
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "5" %}
          X3-Hybiyd/Fit
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "6" %}
          X3-20K/30K           
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "7" %}
          X3-MIC/PRO           
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "8" %}
          X1-Smart
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "9" %}
          X1-AC
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "10" %}
          A1-Hybrid
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "11" %}
          A1-Fit
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "12" %}
          A1-Grid
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "13" %}
          J1-ESS           
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "14" %}
          X3-Hybrid-G4
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "15" %}
          X1-Hybrid-G4 
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "16" %}
          X3-MIC/PRO-G2 
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "17" %}
          X1-SPT 
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "18" %}
          X1-Boost/Mini-G4 
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "19" %}
          A1-HYB-G2 
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "20" %}
          A1-AC-G2
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "21" %}
          A1-SMT-G2 
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "22" %}
          X3-FTH 
        {% elif state_attr('sensor.qcells_cloud', 'inverterType') == "23" %}
          X3-MGA-G2 
        {% else %}
          Unknown
        {% endif %}

  - sensor:
    - default_entity_id: sensor.qcells_cloud_inverterstatus
      name: QCells Inverter status
      state: >
        {% if state_attr('sensor.qcells_cloud', 'inverterStatus') == "100" %}
          Wait Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "101" %}
          Check Mode            
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "102" %}
          Normal Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "103" %}
          Fault Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "104" %}
          Permanent Fault Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "105" %}
          Update Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "106" %}
          EPS Check Mode           
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "107" %}
          EPS Mode           
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "108" %}
          Self-Test Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "109" %}
          Idle Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "110" %}
          Standby Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "111" %}
          Pv Wake Up Bat Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "112" %}
          Gen Check Mode
        {% elif state_attr('sensor.qcells_cloud', 'inverterStatus') == "113" %}
          Gen Run Mode           
        {% else %}
          Unknown status
        {% endif %}

  - sensor:
    - device_class: timestamp
      default_entity_id: sensor.qcells_cloud_uploadtime
      name: QCells Update time
      state: '{{ as_timestamp(state_attr(''sensor.qcells_cloud'', ''uploadTime'')) | timestamp_local }}'

  - sensor:
    - unit_of_measurement: W
      device_class: battery
      default_entity_id: sensor.qcells_cloud_batpower
      name: QCells Inverter DC Battery power total
      state: '{{ state_attr(''sensor.qcells_cloud'', ''batPower'') | int(default=0) }}'

  - sensor:
    - device_class: power
      unit_of_measurement: W
      default_entity_id: sensor.qcells_cloud_powerdc1
      name: QCells Inverter DC PV power MPPT1
      state: '{{ state_attr(''sensor.qcells_cloud'', ''powerdc1'') }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_powerdc2
      name: QCells Inverter DC PV power MPPT2
      state: '{{ state_attr(''sensor.qcells_cloud'', ''powerdc2'') }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_powerdc3
      name: QCells Inverter DC PV power MPPT3
      state: '{{ state_attr(''sensor.qcells_cloud'', ''powerdc3'') }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_powerdc4
      name: QCells Inverter DC PV power MPPT4
      state: '{{ state_attr(''sensor.qcells_cloud'', ''powerdc4'') }}'
    
  - sensor:
    - default_entity_id: sensor.qcells_cloud_batstatus
      name: QCells BMS Status        
      state: >
        {% if state_attr('sensor.qcells_cloud', 'batStatus') == "0" %}
          Self Use Mode 
        {% elif state_attr('sensor.qcells_cloud', 'batStatus') == "1" %}
          Force Time Use 
        {% elif state_attr('sensor.qcells_cloud', 'batStatus') == "2" %}
          Back Up Mode 
        {% elif state_attr('sensor.qcells_cloud', 'batStatus') == "3" %}
          Feed-in Priority 
        {% else %}
          Unknown status
        {% endif %}
    
  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_powerdc_sum
      name: QCells Cloud Inverter DC PV power sum
      state: '{{ states(''sensor.qcells_cloud_powerdc1'') | float(default=0) + states(''sensor.qcells_cloud_powerdc2'') | float(default=0) + states(''sensor.qcells_cloud_powerdc3'') | float(default=0) + states(''sensor.qcells_cloud_powerdc4'') | float(default=0) }}'    

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_house_load
      name: QCells Cloud House Load
      state: '{{ states(''sensor.qcells_cloud_feedinpowerm2'') | float(default=0) + states(''sensor.qcells_cloud_acpower'') | float(default=0) - states(''sensor.qcells_cloud_feedinpower'') | float(default=0) }}'

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_battery_charge
      name: QCells Cloud Battery Charge
      state: >
        {% if states('sensor.qcells_cloud_batpower') | float(default=0) > 0 %}
          {{ states('sensor.qcells_cloud_batpower') | float(default=0) }}
        {% else %}
          0
        {% endif %}
    
  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_battery_discharge
      name: QCells Cloud Battery Discharge    
      state: >
        {% if states('sensor.qcells_cloud_batpower') | float(default=0) < 0 %}
          {{ states('sensor.qcells_cloud_batpower') | float(default=0) | abs }}
        {% else %}
          0
        {% endif %}

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_grid_feed
      name: QCells Cloud Grid Feed
      state: >
        {% if states('sensor.qcells_cloud_feedinpower') | float(default=0) > 0 %}
          {{ states('sensor.qcells_cloud_feedinpower') | float(default=0) }}
        {% else %}
          0
        {% endif %}

  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_grid_load
      name: QCells Cloud Grid Load
      state: >
        {% if states('sensor.qcells_cloud_feedinpower') | float(default=0) < 0 %}
          {{ states('sensor.qcells_cloud_feedinpower') | float(default=0) | abs }}
        {% else %}
          0
        {% endif %}

# Q-Save 9.1 --> 8300W usable minus 10% minimum load multiplied by soc 
# E.g. 35% soc --> 2614.5 W 
  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_battery_usable
      name: QCells Cloud Battery usable
      state: '{{ states(''input_number.batteriegrosse_nutzbar'') | float * (max(states(''sensor.qcells_cloud_soc'') | float(default=0) - 10.0, 0) / 100) }}'

# Solar plus usable battery added
  - sensor:
    - unit_of_measurement: W
      device_class: power
      default_entity_id: sensor.qcells_cloud_solar_plus_battery_total
      name: QCells Cloud Solar plus Battery total
      state: '{{ states(''sensor.qcells_cloud_powerdc_sum'') | float + states(''sensor.qcells_cloud_battery_usable'') | float }}'

  - sensor:
    - name: "Strompreis"
      unit_of_measurement: "EUR/kWh"
      icon: mdi:currency-eur
      state: >
        {% if now().strftime("%Y%m%d") >= "20250401" %}
          {{ 0.3437 }}
        {% elif now().strftime("%Y%m%d") >= "20231013" %}
          {{ 0.2887 }}
        {% elif now().strftime("%Y%m%d") >= "20230101" %}
          {{ 0.4 }}
        {% elif now().strftime("%Y%m%d") >= "20220801" %}
          {{ 0.305 }}
        {% elif now().strftime("%Y%m%d") >= "20220701" %}
          {{ 0.2371 }}
        {% elif now().strftime("%Y%m%d") >= "20200401" %}
          {{ 0.2814 }}
        {% elif now().strftime("%Y%m%d") >= "20190401" %}
          {{ 0.2582 }}
        {% else %}
          {{ 0 }}
        {% endif %}

  - sensor:
    - name: "Einspeisevergütung Strom"
      unit_of_measurement: "EUR/kWh"
      icon: mdi:currency-eur
      state: >
        {% if now().strftime("%Y%m%d") >= "20190604" %}
          {{ 0.1095 }}
        {% else %}
          {{ 0 }}
        {% endif %}

Someone already tried to add a Modbus to TCP/IP Adaptor and used the SolaX Inverter Modbus HACS Integration which supports the QCells system?!