Solax X1 Boost Air Mini : local data

First you need to take a deep dive in your home wifi network, try to understand it. Locate the router, find the DHCP section and look for the IP addresses.

??? I do know my network and I am saying that I have tried to connect to the IP at port 80 but nothing. The issue is not that I do not know my network or devices connected and interfaces, but that there is no response on port 80 or 443 or 8080 on the IP that I perceive is the inverter. So something else needs to be tried and I do not know what - that is what I was asking for, the help to move forward with this.

Good, it is normal that you do not get a response via port 80 443 or 8080.

To read the data you use the instructions and get the data in HA, or do a manual check via the terminal:

curl -d “optType=ReadRealTimeData&pwd=XXXXXX” -X POST http://192.168.1.192

change ip address of course

1 Like

perfect. THANKYOU. I shall try tomorrow and feedback.

Nope, that failed. Just hung, no output, until Ctrl-C

curl -d “optType=ReadRealTimeData&pwd=XXXXXX” -X POST http://192.168.0.123

This is strange.
Because when I connect to my router on its WiFi SSID, client 192.168.0.134 is the device named “dru10001300” which is the inverter??
But
When I connect to the TP-Link’s WiFi SSID and go to its Web GUi, there are no connected clients listed. The TP-link is a TL-MR3020 running in Repeater/Bridge and is connected to the inverter via an eth cable.
Very confusing. What am i doing wrong - any ideas please/

Just checking: did you replace the XXXX with the Serial number ? :wink:
Are you still struggling to find the Solax ip-address? From your first post it looks as if it was 192.168.1.17 ?
Is your HA is on another sub domain 192.168.0.xxx ? Suggest to put both in the same domain.

thanks for striving with me ha
ive no idea what the serial number is is the inverter the dru_XXXXX thats what is on the routers client list , and it disappeared when u turned off the tplink connected to its lan port

?

You can find the serial number on the wifi dongle. You need to repair your wifi/lan to get a stable connection. Difficult to assist you via this medium.

what wifi dongle?it doesn’t have one like i said in OP it has a tp link access pojnt thing connected to the lan port and that connects to my eireless network router. it all works. that’s what the installers did. not me.
i don’t know what this talk about my network is on this thread, my net is fine, i can use the social Energy app on my phone and see real time solar energy import and export and battery. its fine. so that can talk to the solax clearly either on my wlan or on mobile date so its obvs sending data from my network
i just want to have the date in HA too

Use the SN from the LAN-dongle on the inverter

Mate, i do not have a dongle. I can replace the TP-link AP with another Asus AP and that works too in the sense of the data is visible on the social energy app. It doesn’t matter what is connected and the inverter has no idea what the serial numbers are of the access points connected. So long as the inverter has an internet connection (which is does because the AP is binded to my router’s wifi) then the inverter sends data.

I don’t know what this talk is of a WiFi dongle - there is not one - there never has been one.

EDIT:
Ok, I went into the attic - what a farce. Right

There is something called a “Pocket Lan” plugged into the LAN port on the X1. It has a lan cable connected into it but the other end is dangling on the floor. When I connect the other end to my laptop - nothing comes up. No connection or traffic lights on the LAN port of my laptop which there normally is when a LAN device is connected. Further, no link-local addresses and “arp -a” lists nothing.
If I disconnect the LAN from my laptop and plug it into my router, it takes the internet down - no internet. If I reboot the router then same, comes up but no internet connection. How strange.

so no idea how to get it working. So, I spoke to the energy company Social Energy who commissioned the install. It is Social Energy who supply an app for phones, which I use to monitor energy. It all works. Social Energy stated that the LAN dongle should be left unplugged because their ‘smart hub’ does the monitoring and controls the inverter. The Social Energy Smart Hub is connected via LAN to the Inverter. It is this Smart Hub that has the TP link AP connected, and not the Inverter (so my bad above). The Inverter and Batteries and Panels were installed by Solar UK who were an authorised installer for Solax.

So that’s how it all works but I’ve no idea how to access it??

The Solax inverter is not visible in your local domain. The inverter only communicates to the Social Energy Smart Hub. This way the direct connection/reading of the Solax to HA is not possible. :disappointed_relieved:

ah
that will explain everything then.
but whats the pocket lan for? when the installer was here he connected that to his laptopand was pulling data, maybe its OEM software but even so ,when i plugged the cable from the pocket lan to my laptop, the line was dead,no activity. maybe needs enabling in the X1 somehow. what a nightmare.
I’ll ask social energy if they can help.
thanks for all your insight and valued time.

I have a Solax X1 Boost Mini and use the REST-sensor and TEMPLATE-sensors to read the date locally as described above.

Everything works perfectly.
Only when I need to restart Home Assistant Core after sunset (when the inverter is offline), then the REST-sensor becomes “unavailable”.

The next day when the sun rises and the REST-sensor is available again and reads the new data, the other template sensors are not updated. They remain unavailable or unknown.

By restarting Home Assistant Core or running “service: template.reload”, everything works again as intended.

My configuration:

REST-sensor:

- platform: rest
  authentication: digest
  scan_interval: 15
  resource: http://192.168.1.14/ 
  payload: "optType=ReadRealTimeData&pwd=XXXXXXXXXX"  # replace XXXXXXXXXX with SN
  method: POST
  headers: 
    X-Forwarded-For: 5.8.8.8
  name: "Solaxloc_Rest_Local"
  json_attributes:
      - type
      - SN
      - ver
      - Data
      - Information
  value_template: 'OK' # dummy value, not used; avoids the "State max length is 255 characters" error

TEMPLATE-sensors:

- sensor:

  - name: Solaxloc_Local
    state: > 
            {% if state_attr('sensor.Solaxloc_Rest_Local', 'SN') == "XXXXXXXXXX"  %}  # replace XXXXXXXXXX with SN
                {{ now().strftime("%H:%M:%S") }} 
            {% else %}
                {{ (states('sensor.Solaxloc_Local')) }}
            {% endif %}
    attributes: 
      Sn: >
            {% if state_attr('sensor.Solaxloc_Rest_Local', 'SN') == "XXXXXXXXXX" %}  # replace XXXXXXXXXX with SN
                {{ (state_attr('sensor.Solaxloc_Rest_Local', 'SN')) }}
            {% else %}
                {{ (state_attr('sensor.Solaxloc_Local', 'Sn')) }}
            {% endif %}
      Ver: >
            {% if state_attr('sensor.Solaxloc_Rest_Local', 'SN') == "XXXXXXXXXX" %}  # replace XXXXXXXXXX with SN
                {{ (state_attr('sensor.Solaxloc_Rest_Local', 'ver')) }}
            {% else %}
                {{ (state_attr('sensor.Solaxloc_Local', 'Ver')) }}
            {% endif %}
      Type: >
            {% if state_attr('sensor.Solaxloc_Rest_Local', 'SN') == "XXXXXXXXXX" %}  # replace XXXXXXXXXX with SN
                {{ (state_attr('sensor.Solaxloc_Rest_Local', 'type')) }}
            {% else %}
                {{ (state_attr('sensor.Solaxloc_Local', 'Type')) }}
            {% endif %}
      Data: >
            {% if state_attr('sensor.Solaxloc_Rest_Local', 'SN') == "XXXXXXXXXX" %}  # replace XXXXXXXXXX with SN
                {{ (state_attr('sensor.Solaxloc_Rest_Local', 'Data')) }}
            {% else %}
                {{ (state_attr('sensor.Solaxloc_Local', 'Data')) }}
            {% endif %}
      Information: > 
            {% if state_attr('sensor.Solaxloc_Rest_Local', 'SN') == "XXXXXXXXXX" %}  # replace XXXXXXXXXX with SN
                {{ (state_attr('sensor.Solaxloc_Rest_Local', 'Information')) }}
            {% else %}
                {{ (state_attr('sensor.Solaxloc_Local', 'Information')) }}
            {% endif %}

  - name: "solaxloc Energy today"
    unit_of_measurement: "kWh"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[8] }}"
    device_class: energy
    state_class: measurement
    icon: mdi:solar-panel

  - name: "solaxloc Energy Total"
    unit_of_measurement: "kWh"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[9] }}" 
    device_class: energy
    state_class: total_increasing
    icon: mdi:chart-line
    
  - name: "solaxloc DC Voltage"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[2] | float  }}" 
    unit_of_measurement: "V"
    device_class: "voltage"
    
  - name: "solaxloc DC Current"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[0] }}" 
    unit_of_measurement: "A"
    device_class: "current"  
    
  - name: "solaxloc DC Power"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[11] }}"
    unit_of_measurement: "W"
    device_class: "power"  
    icon: mdi:power-socket-de    
    
  - name: "solaxloc AC Output Voltage"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[5] }}"
    unit_of_measurement: "V"
    device_class: "voltage"
    
  - name: "solaxloc AC Current"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[4] }}"
    unit_of_measurement: "A"
    device_class: "current"   
    
  - name: "solaxloc AC Power"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[6] }}"
    unit_of_measurement: "W"
    device_class: "power"  
    icon: mdi:power-socket-de

  - name: "solaxloc AC Power kW"
    state: "{{ float(state_attr('sensor.Solaxloc_Rest_Local', 'Data')[6]) / 1000 }}"
    unit_of_measurement: "kW"
    device_class: "power"  
    icon: mdi:power-socket-de
    
  - name: "solaxloc AC Frequency"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data')[50]  | float }}"
    unit_of_measurement: "Hz"
    device_class: "frequency"
    icon: mdi:music-clef-treble
    
  - name: "solaxloc Inverter Operation Mode"
    state: >
      {%   if state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  0 %}Opstart: wachten
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  1 %}Opstart: controle
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  2 %}Normale werking
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  3 %}Off
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  4 %}Permanent Fault
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  5 %}Update
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  6 %}EPS Check
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  7 %}EPS Mode
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  8 %}Zelf-test
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] ==  9 %}Inactief
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] == 10 %}Standby
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] == 11 %}Pv Batterij activeren
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] == 12 %}Algemene controle
      {% elif state_attr('sensor.Solaxloc_Local', 'Data')[68] == 13 %}Gen Run
      {% else %}Ik weet het niet (donker?){% endif %}    

  - name: "solaxloc Inverter Nominal Power"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Information')[0] | float | round(0) }}"
    unit_of_measurement: "kW"

  - name: "solaxloc Module Sn"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Sn') }}"

  - name: "solaxloc module fw version"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'ver') }}"

  - name: "solaxloc Type"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'type') }}"

  - name: "solaxloc Inverter Sn"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'SN') }}"
    
  - name: "solaxloc Inverter Data"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Data') }}" 
    
  - name: "solaxloc Inverter Information"
    state: "{{ state_attr('sensor.Solaxloc_Rest_Local', 'Information') }}"
    
  - name: "solaxloc Inverter Temperature"
    state: "{{ state_attr('sensor.Solaxloc_Local', 'Data')[7] | int(default=0) }}"
    unit_of_measurement: "°C"
    device_class: "temperature"   

Does anyone know a solution for this?

Hi, im am new to HA and it took me a few hours to kind of get the things going I want to use regarding my Solax Inverter. I have a X3-Pro G2.
I have successfully established the API connection via Wifi and implemented everything to get the data. The hardest part was to find out which values are on what position, since this is different for this inverter type. I found some information about it online and it worked.
Now I’m just missing one more thing: I want to see the feed-in / consumption to establish some automatisation.
I know that the corrosponding data is found at places 72 and 73. My problem is that these are 32-bit Modbus values and I have no idea what I need to do add to the configuration.yaml to get this value.
It has to be the HA equivalent of:
"Feed-in Power “: (pack_u16(72, 73), Units.W, to_signed32)”
or
“feedInPower: read32BitSigned(Data[72], Data[73])”

I guess it would be a good start to understand the basic functions and structure of HA but I got quite far by just using common sense and copy-pasting the correct things.
Please forgive me for using the lazy-way and asking instead of deep-diving into HA, I will do this in the near future, for now I just want to get this godda** value :sweat_smile:

Hello,

I have almost the same inverter as you, but I can’t integrate my Solax X1 Boost 3 KW inverter into my energy dashboard.
I made ChrisSoft’s FreePocket, which allows you to retrieve all the inverter’s data in real time. Here’s what I get :

I don’t know what to write in the “configuration.yaml” file. I always get errors when I check the yaml configuration.
I can’t just copy the code you’ve put in, because I don’t get the values the same way you do, I don’t need 5.8.8.8.

Here’s how my “configuration.yaml” file looks at the moment :


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

I would appreciate it if some kind soul could spare me some time.

Hello
I have a Solax x1 mini and I just can’t get a connection to the device. Use the Solax Modbus integration. I entered the command and got this answer.

So I have a connection? What do I have to enter in the config, sensor and secret so that I can see something. Thanks

I have a Solax X mini too, and I finally connected it to HA.
just use this: (note the question mark at the start of payload), this is what was missing)

sensor:
  - platform: rest
    authentication: digest
    scan_interval: 10
    resource: http://192.168.1.32/ #adresse ip de l'onduleur
    payload: "?optType=ReadRealTimeData&pwd= XXX" #XXX est le password de la clé
    method: POST
    headers:
      X-Forwarded-For: 5.8.8.8
    name: "solax_rest_local"
    json_attributes:
      - type
      - sn
      - ver
      - Data
      - Information
    value_template: "OK" 

And then you can add a template and sensors.

The devil is in the yaml-details :slight_smile: