Hanwha Q CELLS

Is there any outstanding requests to integrate Q CELLS solar and battery systems into HA ?
Used to have a Fronius system but had to change over to a Q.Cell

Do you have any pics of your Inverter and battery?

The systems I have seen look like rebranded SolaX hardware.
So there is potential to add support to my SolaX Integration.

SolaX Inverter by Modbus (No Pocket WiFi) ( now a custom_component ) / https://github.com/wills106/homeassistant-solax-modbus

thanks gave your Solax ago , but it fails due to USB port ! , QCell (qcommand) uses http…
gave the other solax integration ago , this required ip address with is ok , but also requires a password … no password set for my invertor … therefore was unable to complete integration.

BUT found a live JSON file sitting on the invertor’s IP address call alldata. using the multiple REST sensors , I’m able to extra live data from the invertor.

- platform: rest
  name: PWgrid_total_purchased_1day
  resource: http://10.0.0.50/alldata
  value_template: '{{ value_json.power_accum_data_response.grid_total_purchased_1day }}'
  unit_of_measurement: "W"
  scan_interval: 60
  state_class: total_increasing
  device_class: power
  icon: mdi:power

Thanks for your suggestion :slight_smile:

Your Inverter will either have built in ethernet (not an external dongle) or you will connect with a RS485 - USB adaptor.

What data can you get from that rest API? Maybe it would be nice to make an integration for that.

@klaasnicolaas This is what I get when I use curl to address the inverter in my home network:

curl -X POST http://192.168.111.42 --data "optType=ReadRealTimeData&pwd=SNofWIFIdongle"
{"sn":"SNofWIFIdongle","ver":"3.003.02","type":14,"Data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,1,64788,65535,0,0,0,0,0,0,3010,0,0,1,0,748,256,10268,786,5643,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11869,0,69,29,0,0,4127,0,4784,0,22,28,12917,0,80,0,0,0,22024,0,41817,0,0,0,750,0,0,0,0,0,0,0,0,0,1,10,1,27,9,0,3504,2400,276,180,243,228,32,31,48,1620,779,14135,14135,14135,0,0,0,3150,3137,57429,13,20564,12339,18753,12597,18737,12356,13618,20564,12339,18754,13105,18736,12612,12342,20564,12339,18754,12850,18740,12612,12338,20564,12339,18754,12850,18740,12612,14641,0,0,0,0,0,0,0,4097,6657,1283,770,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Information":[8.000,14,"H34B08I2412345",8,1.23,0.00,1.24,1.08,0.00,1]}[~] #

It would be great to have HA integration to read out the data an present it in an easy to use dashboard.
Maybe someone has done it already and I just have not found it yet.

1 Like

Do you also get information back when you visit http://IP_ADDRESS/alldata? For example when you do this in Postman.

Hi,

@klaasnicolaas - here is the alldata output: JSON Blob | 1073464536463589376 :slight_smile: We just completed the installation, so these very low values are correct. It hasn’t even seen a full day.

André

1 Like

So that’s a lot of data!

Not too difficult to make an integration for that. I just don’t know anything about Q CELLS myself, so when I make something, I do depend on remote testing to see if code works properly.

No worries, I will help!
I also have a PAC2200 to verify some values.

It’s nice it also lists the current Hz, cannot see that in the user UI.

1 Like

I’m slowly writing some code to read out the data from Q Cells. Which information would we initially like to read out, which I could process in the entities.

this is what I had before they change the JSON format on me…
I was able to use these within HA Energy Panel.

So these would be nice :slight_smile:


- platform: rest
  name: PWload_total_power_1day
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.load_total_power_1day}}'
  unit_of_measurement: "W"
  scan_interval: 300 
  state_class: total_increasing
  device_class: energy
  icon: mdi:power

- platform: rest
  name: PWgrid_total_purchased_1day
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.grid_total_purchased_1day / 1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 500
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:power
  #last_reset: '1970-01-01T00:00:00+00:00'

- platform: rest
  name: PWgrid_sent
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.inverter_total_feedin_1day / 1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 600
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:power
  #last_reset: '1970-01-01T00:00:00+00:00'


- platform: rest
  name: PWConsume
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.load_total_power_1day / 1000 }}'
  unit_of_measurement: 'kW'
  scan_interval: 500
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:power

- platform: rest
  name: PWGenerated
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.pv_total_power_1day / 1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 300
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:power


- platform: rest
  name: PWBatteryTotalCharge
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.battery_total_charge_1day /1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 220
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:battery

- platform: rest
  name: PWBatteryChargeRate
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.payload.control_info.bat_target_power /1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 200
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:battery

- platform: rest
  name: PWBatteryactivepower
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.payload.inverter_info.inv.active_power /1000 }}'
  unit_of_measurement: 'kW'
  scan_interval: 500
  #state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:battery


- platform: rest
  name: PWBatteryTotalChargePerc
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.battery_info_response.bat_rack_info[0].soc  | round (1)}}'
  unit_of_measurement: "%"
  scan_interval: 400
  icon: mdi:battery


- platform: rest
  name: PWBatteryTotalDisCharge
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.battery_total_discharge_1day /1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 250
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:battery

- platform: rest
  name: PWgridactivepower
  resource: http://10.0.0.199/alldata
  value_template: '{{ (value_json.meter_info_response.grid_active_power /1000) | round (2) }}'
  unit_of_measurement: "kW"
  scan_interval: 60
  icon: mdi:transmission-tower

1 Like

I would be happy to assist though my knowledge is limited I have just had qcell q.store and q.volt installed and would like to be able to see the battery on the energy dash board.

Perhaps you can give me some insight into which primay components (inverter, battary etc.) the QCells system contains, because I eventually want to group the entities based on what it belongs to.

  • Meter
  • Battery
  • Inverter

My system primary componets are an Invertor, My system has 2No 6.8 kw batteries , the max is 3No batteries,
the break down Leeb98 had is exactly the elements i would be looking to useimage

Just a quick update on the sensors … Had to included “verify_ssl: false” to all sensors
refer below … Just swap the IP address for yours

- platform: rest
  name: PWload_total_power_1day
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.load_total_power_1day}}'
  unit_of_measurement: "W"
  scan_interval: 300 
  state_class: total_increasing
  device_class: energy
  icon: mdi:power
  verify_ssl: false

- platform: rest
  name: PWgrid_total_purchased_1day
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.grid_total_purchased_1day / 1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 500
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:power
  verify_ssl: false

- platform: rest
  name: PWgrid_sent
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.inverter_total_feedin_1day / 1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 600
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:power
  verify_ssl: false


- platform: rest
  name: PWConsume
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.load_total_power_1day / 1000 }}'
  unit_of_measurement: 'kW'
  scan_interval: 500
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:power
  verify_ssl: false

- platform: rest
  name: PWGenerated
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.pv_total_power_1day / 1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 300
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:power
  verify_ssl: false


- platform: rest
  name: PWBatteryTotalChargeOLD
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.battery_total_charge_1day /1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 220
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:battery
  verify_ssl: false

- platform: rest
  name: PWBatteryChargeRate
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.payload.control_info.bat_target_power /1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 200
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:battery
  verify_ssl: false

- platform: rest
  name: "PWBatteryactivepower"
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.payload.inverter_info.inv.active_power /1000 }}'
  unit_of_measurement: 'kW'
  scan_interval: 500
  device_class: 'energy'
  icon: mdi:battery
  verify_ssl: false


- platform: rest
  name: PWBatteryTotalChargePerc
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.battery_info_response.bat_rack_info[0].soc  | round (1)}}'
  unit_of_measurement: "%"
  scan_interval: 400
  icon: mdi:battery
  verify_ssl: false


- platform: rest
  name: PWBatteryTotalDisCharge
  resource: http://10.0.0.199/alldata
  value_template: '{{ value_json.power_accum_data_response.battery_total_discharge_1day /1000 }}'
  unit_of_measurement: 'kWh'
  scan_interval: 250
  state_class: 'total_increasing'
  device_class: 'energy'
  icon: mdi:battery
  verify_ssl: false

- platform: rest
  name: PWgridactivepower
  resource: http://10.0.0.199/alldata
  value_template: '{{ (value_json.meter_info_response.grid_active_power /1000) | round (2) }}'
  unit_of_measurement: "kW"
  scan_interval: 60
  icon: mdi:transmission-tower
  verify_ssl: false

- platform: template
  sensors:
     
      pwtotalgenerated:
          value_template: '{{ states("sensor.pwgenerated")}}'
          unit_of_measurement: kWh
          device_class: energy
      pwtotalconsume:
          value_template: '{{ states("sensor.pwconsume")}}'
          unit_of_measurement: kWh
          friendly_name: Total Consumed
          device_class: energy
      pwtotalfromgrid:
          value_template: '{{ states("sensor.pwgrid_total_purchased_1day")}}'
          unit_of_measurement: kWh
          friendly_name: Total From Grid
          device_class: energy
      pwtotalsentgrid:
          value_template: '{{ states("sensor.pwgrid_sent")}}'
          unit_of_measurement: kWh
          friendly_name: Total Sent To Grid
          device_class: energy
      pwbatterytotal:
          value_template: '{{ states("sensor.pwbatterytotalcharge")}}'
          unit_of_measurement: kWh
          device_class: energy
      pwbatterystored:
          value_template: '{{ states("sensor.pwbatterytotalcharge")}}'
          unit_of_measurement: kWh
          friendly_name: Total Saved to Battery
          device_class: energy
      pwbatterydischarged:
          value_template: '{{ states("sensor.pwbatteryTotaldischarge")}}'
          unit_of_measurement: kWh
          friendly_name: Total From Battery
          device_class: energy



thanks for this appears to be working for me to but would be good to have formal integration

Has this stopped working for anyone else .my invertor not producing the JSOn any more. ONline service working ok from qcell

Does the JSON file just show an error code ?

Have you tried a COMPLETE reboot of your QCELLS system ?
Note: When rebooting , POWER the invertor (first) and then batteries and power back on in reserve order , BUT leave powered off for about 10 mins … Was instructed by QCELL to do this , but they left out the leave for 10 mins … and clarified this later on

yes json just shows error code. i can give the power off a try