PV SolaX inverter cloud sensors via API

Hello,

Somebody has a problem with API?
Today, I can’t get information from the API cloud, only for every 1 hour.
Everything was working fine until yesterday.

When I paste the API link to the browser, I got this:

{“exception”:“The overrun has been disabled for 1 hour!”,“success”:false}

Can you confirm that there is a problem on Solax cloud or on my side?
Solax

Ok, it seems like the problem with API.

Now, everything is working again :slight_smile:

OK… I found api strong etc… so far so good.
I have added the modified script to scripts.yaml ? and restarted HA… now what?

just add the newly created sensors to the dashboard

All the numbers of blank and i get

“{“exception”:“The overrun has been disabled for 1 hour!”,“success”:false}”

have disabled HA for a while… see if it it some kind of flood protection

it does work now and then

{“success”:true,“exception”:“Query success!”,“result”:{“inverterSN”:“Hxxxxxxxxxxx”,“sn”:“SVxxxxxxxxxxxxx”,“acpower”:893.0,“yieldtoday”:10.4,“yieldtotal”:132.2,“feedinpower”:0.0,“feedinenergy”:1.8,“consumeenergy”:118.7,“feedinpowerM2”:0.0,“soc”:59.0,“peps1”:0.0,“peps2”:null,“peps3”:null,“inverterType”:“15”,“inverterStatus”:“102”,“uploadTime”:“2023-03-17 15:27:26”,“batPower”:-118.0,“powerdc1”:329.0,“powerdc2”:463.0,“powerdc3”:null,“powerdc4”:null,“batStatus”:“0”}}

I had the same problem with the cloud API not sending data. Mostly it was due to to much requests from my HA and Solax APP (when not at home I use the app more frequent). Seems like sharing the same API.

Thats why I switched over to the API localy, over the wifi stick. It took some configuration and trial by error bot got it working and it is much more stable and with much more frequent data (every 5 to 10 seconds is possible). It is worth the extra trouble to get out of the cloud API from Solax.

1 Like

yes… had to go down this route in the end… but got it working nicely
Solax X1 Hybrid G4 (local & cloud API) - Share your Projects! - Home Assistant Community

Could someone help me please I’m new to this and trying to edit my yaml sensor file and get this message, I must be doing something very simple wrong but I can’t work out what. Thanks

hey
it s the same for me when i put the code in configuration.yaml
the code is ok when it s separated
i have an other problem with the sensor:
anithing in entity to choice the solax or pv_sensor for add carte in dashboard
the code seems good

hey
my problem is whith the add sensor
anithing in entity to choice the solax or pv_sensor for add carte in dashboard
the code seems good
do you know this problem

I’ve found this thread invaluable and, with a little tweaking, I have all of the data I need and fed into the Energy dashboard.

Importantly, the code below grabs everything in a single API call, so you don’t get rate-limited by Solax like I was:

rest:
  - resource: https://www.solaxcloud.com:9443/proxy/api/getRealtimeInfo.do?tokenId=TOKENID&sn=SERIALNUMBER
    sensor:
      - name: "Solax Total"
        value_template: '{{ ( value_json.result.yieldtotal | round(0) ) }}'
        unit_of_measurement: "KWh"
      - name: "Solax now"
        value_template: '{{ ( value_json.result.acpower | round(0) ) }}'
        unit_of_measurement: "W"
      - name: "Solax today"
        value_template: '{{ value_json.result.yieldtoday }}'
        unit_of_measurement: "KWh"
      - name: "Solax feed-in"
        value_template: '{{ value_json.result.feedinpower }}'
        unit_of_measurement: "W"
      - name: "Solax upload time"
        value_template: "{{ value_json.result.uploadTime }}"
      - name: "Solax status"
        value_template: >
          {% if value_json.result.inverterStatus == '100' %}Wait
          {% elif value_json.result.inverterStatus == '101' %}Check
          {% elif value_json.result.inverterStatus == '102' %}Normal
          {% elif value_json.result.inverterStatus == '103' %}Fault
          {% elif value_json.result.inverterStatus == '104' %}Permanent Fault
          {% elif value_json.result.inverterStatus == '105' %}Update
          {% elif value_json.result.inverterStatus == '106' %}EPS Check
          {% elif value_json.result.inverterStatus == '107' %}EPS
          {% elif value_json.result.inverterStatus == '108' %}Self-test
          {% elif value_json.result.inverterStatus == '109' %}Idle
          {% elif value_json.result.inverterStatus == '110' %}Standby
          {% elif value_json.result.inverterStatus == '111' %}Pv Wake Up Bat
          {% elif value_json.result.inverterStatus == '112' %}Gen Check
          {% elif value_json.result.inverterStatus == '113' %}Gen Run
          {% else %}I dont know{% endif %}

template:
  - sensor:
    - name: PV Energy
      state: "{{ states('sensor.solax_total') }}"
      unit_of_measurement: 'kWh'
      state_class: total_increasing
      device_class: energy
      attributes:
          last_reset: '1970-01-01T00:00:00+00:00'


1 Like

is it still working?
I’m getting “HTTP Status 500 – Internal Server Error” when opening my API url in any browser :frowning:

2 days ago had the same problem, then they recover. From yesterday afternoon I get the same error.
It’s on their side, not sure what they are doing.

Just as an update, I reviewed the API again.
The API documentation is now at 6.1 and the only API still available is getRealtimeInfo.
The script from @andmcg is still working, but more advanced things can be reviewed here:

Witam. U mnie wszystko działa. Czy istnieje możliwość pokazania wykresów w inny sposób. Jakaś ładniejsza grafika.

pozdr.

Thank you for this useful post, this worked straight away for me and I now have these values feeding into one of my dashboards.

Is it also possible to get a consumption from the grid value via this API, I’ve noticed this data is available from the native App.

Further, could you please tell me the next step to integrate this into the Energy dashboard? It doesn’t look like HA recognises these values.

Cześć, chciałbyś z tym pomóc? Nie mogę tego uruchomić

Just to get it out there:

I don’t seem to get this to work in any way.

I have the api access, if i check the resource link in a browser i get a response.

I’m using this code: PV SolaX inverter cloud sensors via API - #138 by andmcg

I put it in a seperate solaxgarage.yaml in the /rest directory (later on want to add 2 other inverters, same tokenid different serialnumber. I want them in a yaml of their own to keep it easy)

In the configuration.yaml i have this line: rest: !include_dir_merge_list rest/

Somehow i don’t see what i’m doing wrong here. Disclaimer: i’m very new to Home Assistant and the yaml code.

I hope someone can shed some light on my errors.