Solplanet / AiSWEI inverter integration

Hey all,
My PV company has just installed a Solplanet inverter at my house. I haven’t found anything about Solplanet (or AiSWEI, what seems to be an alias to Solplanet) here in the Forums though.
The inverter has wifi connection, and a cloud-based platform (aisweicloud.com). There’s even an API key in my profile, possibly for integration purposes.
Does anyone know how this device could be integrated into HA? Is there maybe another integration that could work with this device?
Thanks a lot.

3 Likes

Same question here. My installation came in december, but until now i haven’t found anything. The Solplanet app is worthless and doesn’t work. Connection to the inverter is good, wifi is good, it sees my installation, but all counters stay at 0. :frowning:
So, i was hoping that maybe there was a way for Home Assistant to get the data, but so far no go.

Just got this inverter installed and also have had no luck finding any integrations.

Hoping that one of the coding wizards will be able to grace us with their magic!

I recently got an ASW5000-S invertor, and managed to read this out locally in Home Assistant with a rest sensor and a few template sensors.

Introduction

It looks like there could be multiple ways to integrate the invertor with Home Assistant.

  • Create an integration with the Cloud service. I don’t think this exists already.
  • The dongle is emitting MQTT messages to some cloud service. You could probably setup some DNS spoofing to trick the dongle to send the MQTT messages to your own broker. This will break the mobile app however.
  • It seems that wifi dongle has an open port at 8484 that allows to query the device for some parameters. This looks like the preferred solution, since it’s all local, and the mobile app doesn’t break. Read more to integrate with this solution.

Requirements:

  • You’ll need to know the IP address of the dongle. I recommend to give this a static IP in your DHCP server/router. I’ve configured my pfsense firewall to store this as a asw5000s.lan dns entry. Figuring out the IP address of the dongle might be the hardest part.
  • You’ll also need to know the SN of your device. Mine looks like this: RG500060S9999999. You can find it in the Solplanet app under Device Information.

Notes:

  • During the night, the dongle won’t reply, so the sensors will be unavailable. You could probably modify the template sensor to return 0 instead, but I don’t mind.

Configuration:

sensor:
- platform: rest
  resource: http://asw5000s.lan:8484/getdevdata.cgi?device=2&sn=RG500060S9999999
  scan_interval: "00:00:10"
  name: asw5000s
  value_template: "OK"
  json_attributes:
    - flg # ???
    - tim # date/time
    - tmp # inverter temperature / 10
    - fac # frequency / 100
    - pac # actual power watt
    - sac # apparent power
    - qac # reactive power
    - eto # total produced / 10
    - etd # total producted daily / 10
    - hto # running time
    - pf # ???
    - wan # ???
    - err # ???
    - vac # voltage / 10
    - iac # current / 10
    - vpv # string voltage
    - ipv # string current
    - str
template:
  sensor:
  - name: "asw5000s_current_production"
      unique_id: asw5000s_current_production
      state: "{{ state_attr('sensor.asw5000s', 'pac') | float }}"
      unit_of_measurement: "W"
      device_class: energy
      state_class: measurement

    - name: "asw5000s_daily_production"
      unique_id: asw5000s_daily_production
      state: "{{ state_attr('sensor.asw5000s', 'etd') | float / 10 }}"
      unit_of_measurement: "kWh"
      device_class: energy
      state_class: total_increasing

    - name: "asw5000s_total_production"
      unique_id: asw5000s_total_production
      state: "{{ state_attr('sensor.asw5000s', 'eto') | float / 10 }}"
      unit_of_measurement: "kWh"
      device_class: energy
      state_class: total_increasing

    - name: "asw5000s_temperature"
      unique_id: asw5000s_temperature
      state: "{{ state_attr('sensor.asw5000s', 'tmp') | float / 10 }}"
      unit_of_measurement: "°C"
      device_class: temperature
      state_class: measurement

You can add additional template sensors to extract more information. See the rest sensor above for all available attributes.

Credit (use Google translate if this isn’t your language):

7 Likes

Hi tforjan

did you ever get this integration working. i really want to move away from the solplanet app as its terrible. i have opened up a thread to hopefully gain some traction so i can get some help with getting the api to talk into hassio

1 Like

Hi All,

Unfortunately I gave up to implement the Solplanet API into the HA.
I got some API documentations from the manufacturer, but this is useless.
I have implemented two smart meter (one after the energy provider meter and one after the inverter).
In this way I can get the up to date information. I know, this is not cost saving solution.
I was not so happy about this extra implementation, but this is stable …

For me template part does not work with current HA version does some one knows what the problem could be?

Your indenting is wrong.

Here is the template with the correct indenting:

template:
  - sensor:
      - name: "asw5000s_current_production"
        unique_id: asw5000s_current_production
        state: "{{ state_attr('sensor.asw5000s', 'pac') | float }}"
        unit_of_measurement: "W"
        device_class: energy
        state_class: measurement

      - name: "asw5000s_daily_production"
        unique_id: asw5000s_daily_production
        state: "{{ state_attr('sensor.asw5000s', 'etd') | float / 10 }}"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing

      - name: "asw5000s_total_production"
        unique_id: asw5000s_total_production
        state: "{{ state_attr('sensor.asw5000s', 'eto') | float / 10 }}"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing

      - name: "asw5000s_temperature"
        unique_id: asw5000s_temperature
        state: "{{ state_attr('sensor.asw5000s', 'tmp') | float / 10 }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement
1 Like

Thanks @minde. I modified it to a multi string configuration.

template:

    - name: "SolPlanet_current_production"
      unique_id: SolPlanetASW10K_current_production
      state: "{{ state_attr('sensor.solplanetasw10k', 'pac') | float }}"
      unit_of_measurement: "W"
      device_class: energy
      state_class: measurement

    - name: "Solplanet_daily_production"
      unique_id: SolPlanetASW10K_daily_production
      state: "{{ state_attr('sensor.solplanetasw10k', 'etd') | float / 10 }}"
      unit_of_measurement: "kWh"
      device_class: energy
      state_class: total_increasing

    - name: "Solplanet_total_production"
      unique_id: SolPlanetASW10K_total_production
      state: "{{ state_attr('sensor.solplanetasw10k', 'eto') | float / 10 }}"
      unit_of_measurement: "kWh"
      device_class: energy
      state_class: total_increasing

    - name: "Solplanet_temperature"
      unique_id: SolPlanetASW10K_temperature
      state: "{{ state_attr('sensor.solplanetasw10k', 'tmp') | float / 10 }}"
      unit_of_measurement: "°C"
      device_class: temperature
      state_class: measurement  

    - name: "Solplanet_String1_Voltage"
      unique_id: SolPlanetASW10K_String1_Voltage
      state: "{{ state_attr('sensor.solplanetasw10k', 'vpv')[0] | float /10 }}"
      unit_of_measurement: "V"
      device_class: voltage
      state_class: measurement    
   
    - name: "Solplanet_String2_Voltage"
      unique_id: SolPlanetASW10K_String2_Voltage
      state: "{{ state_attr('sensor.solplanetasw10k', 'vpv')[1] | float /10 }}"
      unit_of_measurement: "V"
      device_class: voltage
      state_class: measurement  

    - name: "Solplanet_String1_Current"
      unique_id: SolPlanetASW10K_String1_Current
      state: "{{ state_attr('sensor.solplanetasw10k', 'ipv')[0] | float /10 }}"
      unit_of_measurement: "A"
      device_class: current
      state_class: measurement    
   
    - name: "Solplanet_String2_Current"
      unique_id: SolPlanetASW10K_String2_Current
      state: "{{ state_attr('sensor.solplanetasw10k', 'ipv')[1] | float /10 }}"
      unit_of_measurement: "A"
      device_class: current
      state_class: measurement  

    - name: "Solplanet_String1_Wattage"
      unique_id: SolPlanetASW10K_String1_Wattage
      state: "{{ ((state_attr('sensor.solplanetasw10k', 'vpv')[0] | float /10) | round(0) ) * ( (state_attr('sensor.solplanetasw10k', 'ipv')[0] | float /10) )| round (0) }}"
      unit_of_measurement: "W"
      device_class: energy
      state_class: measurement    
   
    - name: "Solplanet_String2_Wattage"
      unique_id: SolPlanetASW10K_String2_Wattage
      state: "{{ ((state_attr('sensor.solplanetasw10k', 'vpv')[1] | float /10) | round(0) ) * ( (state_attr('sensor.solplanetasw10k', 'ipv')[1] | float /10) )| round (0) }}"
      unit_of_measurement: "W"
      device_class: energy
      state_class: measurement 

Hello
I have a battery connected to my inverter, does anyone know how I can get the data regarding charging and discharging. I can see it in the app but haven’t figured out how to write code in Home Assistant.

There is a bit of reverse engineered documentation here: API Reference · Fufs/pysolplanet Wiki · GitHub

I have a feeling that trying some other vales for the device number (4 looks like a good candidate) might yield some more information. Maybe try all of them between 1 and 16 or so…

The actual json parsing can be similar as above.

Of course, you will need to see what each attribute in the JSON corresponds to.

the app requires user/password authetication. These are also valid on
https://internation-cloud.solplanet.net/
and there you’ll find all the data your inverters send there with description. This can be an intersting comparisson to the raw JSON data and their meanings and required calculations.

Did you dive deeper with device=4?

I did some further researches. 1st I did try all the devices between 1 and 16 and 2 is the only one that brings reusable values.

So I rethought about it all and found that
*pv means input side of the inverter (what the photo voltaic panels produce) and
*ac means output of the inverter (what is converted into alternative current).

This conversion isn’t lossless, though it comes near to perfect. pf is power factor in percents, in my case mostly 99% so 100 DC Watt from the panels will give 99VA on the AC side.

My inverter outputs 3 AC phases, not only 1 => I had to fiddle around with the template anyways. Here with what I ended up. This states voltage and current for all 3 phases and also adds total operation hours and power factor (check unique_ids for meanings).

- sensor:
  - name: "Inversor 2 temperatura"
    unique_id: inverter_2_temperature
    state: "{{ state_attr('sensor.inverter_2', 'tmp') | float / 10 }}"
    unit_of_measurement: "°C"
    device_class: temperature
    state_class: measurement

  - name: "Inversor 2 frequência CA"
    unique_id: inverter_2_ac_frequency
    state: "{{ state_attr('sensor.inverter_2', 'fac') | float / 100}}"
    unit_of_measurement: "Hz"
    device_class: frequency
    state_class: measurement

  - name: "Inversor 2 potência CA"
    unique_id: inverter_2_ac_power
    state: "{{ state_attr('sensor.inverter_2', 'pac') | float }}"
    unit_of_measurement: "W"
    device_class: power
    state_class: measurement

  - name: "Inversor 2 energia total"
    unique_id: inverter_2_total_energy
    state: "{{ state_attr('sensor.inverter_2', 'eto') | float / 10 }}"
    unit_of_measurement: "kWh"
    device_class: energy
    state_class: total_increasing

  - name: "Inversor 2 energia diária"
    unique_id: inverter_2_daily_energy
    state: "{{ state_attr('sensor.inverter_2', 'etd') | float / 10 }}"
    unit_of_measurement: "kWh"
    device_class: energy
    state_class: total_increasing

  - name: "Inversor 2 tempo de operação"
    unique_id: inverter_2_operating_time
    state: "{{ state_attr('sensor.inverter_2', 'hto') | float }}"
    unit_of_measurement: "h"
    state_class: measurement

  - name: "Inversor 2 fator potência"
    unique_id: inverter_2_power_factor
    state: "{{ state_attr('sensor.inverter_2', 'pf') | float }}"
    unit_of_measurement: "%"
    device_class: power_factor
    state_class: measurement

  - name: "Inversor 2 voltagem CA 1"
    unique_id: inverter_2_ac_voltage_1
    state: "{{ state_attr('sensor.inverter_2', 'vac')[0] | float / 10 }}"
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement    

  - name: "Inversor 2 voltagem CA 2"
    unique_id: inverter_2_ac_voltage_2
    state: "{{ state_attr('sensor.inverter_2', 'vac')[1] | float / 10 }}"
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement    

  - name: "Inversor 2 voltagem CA 3"
    unique_id: inverter_2_ac_voltage_3
    state: "{{ state_attr('sensor.inverter_2', 'vac')[2] | float / 10 }}"
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement    

  - name: "Inversor 2 corrente CA 1"
    unique_id: inverter_2_ac_current_1
    state: "{{ state_attr('sensor.inverter_2', 'iac')[0] | float / 10 }}"
    unit_of_measurement: "A"
    device_class: current
    state_class: measurement 

  - name: "Inversor 2 corrente CA 2"
    unique_id: inverter_2_ac_current_2
    state: "{{ state_attr('sensor.inverter_2', 'iac')[1] | float / 10 }}"
    unit_of_measurement: "A"
    device_class: current
    state_class: measurement 

  - name: "Inversor 2 corrente CA 3"
    unique_id: inverter_2_ac_current_3
    state: "{{ state_attr('sensor.inverter_2', 'iac')[2] | float / 10 }}"
    unit_of_measurement: "A"
    device_class: current
    state_class: measurement 

  - name: "Inversor 2 voltagem paineis 1"
    unique_id: inverter_2_dc_voltage_1
    state: "{{ state_attr('sensor.inverter_2', 'vpv')[0] | float / 10 }}"
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement
   
  - name: "Inversor 2 voltagem paineis 2"
    unique_id: inverter_2_dc_voltage_2
    state: "{{ state_attr('sensor.inverter_2', 'vpv')[1] | float /10 }}"
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement

  - name: "Inversor 2 corrente paineis 1"
    unique_id: inverter_2_dc_current_1
    state: "{{ state_attr('sensor.inverter_2', 'ipv')[0] | float /10 }}"
    unit_of_measurement: "A"
    device_class: current
    state_class: measurement    
   
  - name: "Inversor 2 corrente paineis 2"
    unique_id: inverter_2_dc_current_2
    state: "{{ state_attr('sensor.inverter_2', 'ipv')[1] | float /10 }}"
    unit_of_measurement: "A"
    device_class: current
    state_class: measurement

Hello, can somebody help me to add Solplanet inverter to HA. I’m new at HA, but read all your coments, but can not add Solplanet to HA. At first I made sensor_platform_rest please see 1 picture:
1 sensor
then made template_sensor .yaml (please see 2 picture):


Then saved at file editor 2 separate .yaml files (please see 3 picture):

but nothing happens. Maybe I have to add some thing more?

URL is wrong, must be ipaddress colon 8484
http://192.168.8.118:8080/getdevdata.cgi?device=2&sn=

did you include the new yaml files on configuration.yaml?

Hello, yes, I add 2 .yaml files to configuration.yaml.

or You mean I have open configuration.yaml and add to this folder 2 more forlders: sensor_solar.yaml and template_solar.yaml?