API integration for Solplanet inverter (AISWEI)

I have the ASW008K-SH inverter connected to my system via WiFi, through the dongle, with a fixed IP, but I cannot add it to Home Assistant because the IP connection is rejected every time.

How can I fix this?

Thank you!

I’m in the same situation as you. Hopefully we’ll be lucky and they’ll be able to help us. Best regards.

Hello friend did you manage to integrate your inverter?i have the same as you and i cannot figure out what iam missing

Hi, I spent a few hours figuring this out, the 8484 port didn’t work I think since the sol planet stuff has updated, try this in your browser and see if you get data

https://<dongle.ip.address>/getdevdata.cgi?device=2&sn=<inverter.serial.number>

Dont forget to remove the <>. I’m sure that will work as I’ve just set mine up. Device=2 is solar and change to device=3 for the smart meter if you have a smart meter. Then use restful sensors to integrate into home assistant. If that pulls data let me know and I’ll send you config.yaml

This is the reply you hope for for the browser…

{“flg”:1,“tim”:“20251226084758”,“tmp”:131,“fac”:5001,“pac”:149,“sac”:149,“qac”:4294967294,“eto”:1230,“etd”:0,“hto”:126,“pf”:99,“wan”:0,“err”:0,“vac”:[2264],“iac”:[15],“vpv”:[2998,22],“ipv”:[35,0],“str”:}

This is all the data from the inverter and the holy grail to intergrate into HA

I’ve been working on this for my ASW010K-SH

Using the Rest API, you can build something to query against the Dongle, which is pretty much what the HACS integration does in the background.

However, note that despite being able to query the data, it seems like there are still some things which don’t get directly exposed.
Example rest request

rest:
  - resource: "https://<dongle IP>/getdevdata.cgi?device=2&sn=<INVERTER SERIAL>"
    verify_ssl: false
    scan_interval: 5
    sensor:
      - name: "Solplanet Inverter AC Power"
        unique_id: "sp_inv_ac_p"
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
        value_template: "{{ value_json.pac | float(0) }}"

In this example, device 2 has the values for the AC side of the inverter.
Device 4 is the hybrid controller, and Device 3 appears to be the smart meter

However, when I query against device 3, all the meters shows 0.
Device 4 has pesp but this appears to be static and isnt a reflection of the actual grid import/export.

Also played around with plugging the ethernet directly into the Inverter’s LAN port. However, while i can confirm that the Modbus port is open on port 502, I seem to be able to establish a basic TCP socket connection, but not able to get anything from it.
Also tried RTU TCP.
Note I did also try connecting while the Dongle is disconnected incase the inverter was locked to just sending modbus to the dongle.

Unfortunately, without getting the meter data, it seems to be quite limiting.

Anyone else have any ideas? TCP Modbus should actually be present, but not sure if its locked down and requires unlocking - I’ve had a quick check on the installer version of the app when they were commissioning, but couldn’t find any related settings.
I’ve also tried emailing Solplanet support, but haven’t heard back yet.

same model inverter with exactly same results with the internal lan TCP, I gave up and installed a shelly em for reading the Grid export/import and inverter production. pretty happy with the result:
https: //imgur.com/a/ChGmL7P

Looks like the updated integration from calvinbui has worked some magic using modbus over HTTPs injection (CGI Modbus Tunneling) to access the meter data.

curl -k -X POST https://<INVERTER_IP>/fdbg.cgi \
-H "Content-Type: application/json" \
-d '{"data":"0104003400023005"}'

Return output
{"dat":"ok","data":"010404c56192a67b8c"}#

Which is the hex output of the Meter Grid power
01: Slave ID
04: Function Code (Input Register)
04: Byte Count (4 bytes of data follow)
c56192a6: This is the raw data (IEEE 754 Floating Point).
7b8c: The Modbus CRC checksum.

So this makes working out total house load somewhat more accurate without needing to deploy more meters.

Updated rest query

rest:
  - resource: "https://<dongle IP>/fdbg.cgi"
    method: POST
    verify_ssl: false
    scan_interval: 5
    headers:
      Content-Type: "application/json"
    # The payload we verified with Slave ID 1 and Total System Power (0x0034)
    payload: '{"data":"0104003400023005"}'
    sensor:
      - name: "Solplanet Net Grid Power"
        unique_id: "sp_net_grid_p_w"
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
        icon: mdi:transmission-tower
        # Decodes Hex IEEE 754: 010404[c56192a6]7b8c
        # 1. Grabs the 8 characters of data. 2. Packs as Big Endian. 3. Unpacks as Float.
        value_template: >
          {% if value_json is defined and value_json.data %}
            {# 1. Extract the 8 chars of hex data (e.g., c56192a6) #}
            {% set hex_val = value_json.data[6:14] %}
            {# 2. Convert hex to a 32-bit integer, then pack to binary, then unpack as float #}
            {% set val = unpack(pack(hex_val | int(base=16), ">I"), ">f") %}
            {# 3. Round to 1 decimal place #}
            {{ val | round(1) }}
          {% else %}
            {{ states('sensor.solplanet_grid_power') }}
          {% endif %}