SolarEdge Private API not working anymore?

Hi Community!

I’m using the SolarEdge binding with the Private API for a few years without issues. As of this morning, the polling suddenly stopped, data is not updated anymore.

I already did refresh the SPRING_SECURITY_REMEMBER_ME Token and restarted OH. Doesn’t seem to help. I get a connection error with the message “gone”.

So before I troubleshoot further I wanted to see if anybody else is having this issue right now?

With the official API and token I get the “300 connections exceeded” message.

OH 4.3.4

@GopherCH same here. I’m on OH 5.2.0

Same with OH 5.1.4.

Same here on 5.2

Let’s see if temporary. In the meantime I’m moving to Modus and gather the data directly from the smartmeter and inverter. It’s a bit less comfortable since you have to calculate some of the values and I didn’t manage to access the battery registers just yet.

Hi,

I rebooted OH recently and the SolarEdge binding stopped working. The SolarEdge thing is offline with communication error. I didn’t change anything. I can login into the SolarEdge portal. Site ID and API key are the same.

RPi4b, OH5.1.4, OH5.2

solaredge:generic:se [tokenOrApiKey="xxx", solarId="xxx", usePrivateApi=true, meterInstalled=true]

Enabling >>>

and then >>>

Would be nice if you post a ‘How to’ for that :slight_smile:

sure, I’m not a modbus specialist by any means, but basically you first need to activate modbus on the inverter. Access the inverter with the SolarEdge Setapp App (qr code sticker on the inverter). There’s an option to activate Modbus.

Then you install the Modbus Binding (Modbus - Bindings | openHAB)

You install the “Bridge” Thing at first which connects to your inverter. If you activate “auto discovery” it will discover your inverter and SmartMeter if available as separate things.

You’ll discover the channels in the respective Things which you can map to Items depending on what you are looking for.

Personally I’m mostly interested in import/export because I control the e-charger and boiler by that. That’s the value “Total Real Power” of the inverter. There’s no separate channel for import and export. The values are - or +.

PV production I’m still trying to figure out in detail. Most useful value seems to be AC Power of the inverter but you’ll have to do some calculations probably. At least if you have a battery since the inverter cannot distinguish if the AC power is coming from the panels or the battery. It’s just total AC that goes through the inverter. Working on that though.

For house consumption you definitely need to do some calulations.

Plus if you have a battery, the values are not there by default. Still trying to figure out this one too. There’s a hint in the community: Solaredge (via Sunspec) Modbus Binding is missing battery values - Add-ons / Bindings - openHAB Community

Here’s an AI description of the channels of the SmartMeter:

Channel Meaning Unit
Total Real Power Actual power currently being consumed or exported to the grid. This is the value you use for energy calculations. W (Watts)
Total Apparent Power Combination of real power and reactive power. Represents total electrical load seen by the network. VA (Volt-Amps)
Total Reactive Power Power flowing due to inductive/capacitive loads (motors, transformers, some electronics). Does not perform useful work. var
Power Factor (PF) Efficiency ratio between real and apparent power. PF = 1.0 means no reactive power. -
Voltage L1/L2/L3 Phase voltages. V
Current L1/L2/L3 Current on each phase. A
Frequency Grid frequency. Hz
Imported Energy Total energy purchased from the grid since installation. kWh
Exported Energy Total energy fed into the grid since installation. kWh
Imported Reactive Energy Reactive energy taken from the grid. kvarh
Exported Reactive Energy Reactive energy supplied to the grid. kvarh

Here’s an AI description of the channels of the Inverter:

Channel Meaning Unit
AC Power Current AC power delivered by the inverter W
AC Energy Lifetime energy produced by the inverter Wh / kWh
DC Power Power coming from the PV panels before conversion W
DC Voltage PV string voltage V
DC Current PV current A
AC Voltage L1/L2/L3 Grid voltage per phase V
AC Current L1/L2/L3 Output current per phase A
AC Frequency Grid frequency Hz
Apparant Power Total AC apparent power VA
Reactive Power AC reactive power var
Power Factor Real power / apparent power -
Temperature Inverter internal temperature °C
Status Producing, Sleeping, Fault, etc. -

hope that helps as a quickstart. Maybe we should start another Topic about this Modbus config.

Thanks for taking the time to post that.

I have Modbus running for my SMA/SunGrow hybrid inverter. There are also a couple of SMA Modbus topics in the forum. Maybe also for other inverters. If you need help to get this running, feel free to ask.

same here (error “gone” via private API/cookie method and exceeded limits with token method), but take a look at this documentation:

https://knowledge-center.solaredge.com/sites/kc/files/se_monitoring_api.pdf

Chapter “Site Power Flow”.

If you call this API with your data it still succeeds and the response contains valid data currently shown in the App, too:

https://monitoringapi.solaredge.com/site/YourSideIdHere/currentPowerFlow?api_key=YourApiTokenHere

interesting. Does it allow to query more than once every 10 minutes?

BTW: mine with the official token methods works just fine. It did throw this 300 limit exceed message for the first couple of queries but now is stable and online. Just limited to every 10 min which is too long of a gap for my usecase.

not yet tested, but 300 times per day should be < 5 minutes (24*60/300=4,8 minutes between the calls)

yep you’re obviously right. I didn’t calculate, I basically referred to what it says in the binding, that refreshes should not be less than every 10min. Anyway, if I go lower than every 10min it throws that 300 exceed message. Modbus is now working stable, the only thing I have to work on is to be able to get battery discharge and charge rates. There are some registers for that, I just didn’t figure out how to get to them just yet.

Update, so I got this Modbus to work also for the battery values!

Steps are as follows:

Here are the registers for reference:

57709-57710 Battery1 Temp (hex2float)
57712-57713 Battery1 Voltage (hex2float)
57714-57715 Battery1 Current (hex2float)
57716-57717 Battery1 Power (hex2float)
57730-57731 Battery1 SOH (hex2float)
57732-57733 Battery1 SOC (hex2float)

  1. Create another Modbus thing of type “Regular Poll” and attach it to the already existing Modbus bridge
  2. For every “value” as in Temp, Voltage, Current etc you need to create a poller as I understand. In my example I want Power and SOC. So I created 2 pollers. One for register 57716-57717 and one for 57732-57733
  3. Inside the poller you put the start register like 57716 and put length 2 since it uses to registers (57716 and 57717)
  4. Every poller needs another Modbus thing, this time of type “Modbus Data”.
  5. Attach the thing to the in step 2 created poller, put the start register i.e. 57716 and Read Value Type “float32_swap”.
  6. Create an item under Channels of type number.

et voilà, you get the values!

As written earlier, I’m no Modbus specialist by any means so I gladly take some advice if this is done all wrong but it does work! I did try to create one poller for all the registers at once (start at 57709 and length 25 but that doesn’t work)

Hi everyone,

I’ve fixed the issue. SolarEdge has changed the URL for live data. The URL for aggregated data has remained the same for now, but I assume that will change in the future as well.

You can find the fixed binding here:

https://github.com/rogrun/openhab-addons/releases/download/Release-Solaredge-Binding-5.3.0.202607221919/org.openhab.binding.solaredge-5.3.0.202607221919.jar

After removing the old binding, put the JAR-File into the addons folder.
Please let me know if it works.

Best Ronny

Hi all. For those finding this thread due to running into the same issue, there is also an old issue on GitHub on this particular topic which was recently revived: [SolarEdge] Private API not working · Issue #15867 · openhab/openhab-addons · GitHub

I believe that SolarEdge not just changed the endpoint but the private API more substantially, requiring a bigger update. Glad to discuss.

Hi Ronny

Great work in tracking this issue down and resolving it!

I am assuming this 5.3.x jar will not work with my OpenHAB 4.3.5. Any chance it can be back ported to 4.3.x? Or is there a quick fix I can do to my 4.3 setup?

Thanks

thanks Ronny for your effort in fixing this! Personally, since I’m quite far along now with the modbus solution I’ll keep it for now. Works stable for now with realtime data and no dependencies on the SolarEdge cloud. But I’ll follow the topic, might switch back over based on how stable or not my other solution works in the long term or to grab some data that is not directly available in the modbus without calculating.

Hi @rogrub, I tried your JAR addon on OpenHAB version 5.1.4 but the problem persists. The thing is OFFLINE with Communication_error Gone. Let me know if I can help. Thanks