New binding available: SolarEdge binding

I will consider setting the max update frequency to once every 15 seconds. But as I am currently quite busy this will most likely take some time. In addition the 3.0 release is out and I need to update my local environment first in order to be able to test my changes.

1 Like

Great, thanks considering this for a future version. Looks like the number of reasons for me to upgrade to OH3 soon has just increase by +1 :slight_smile:

Hi all, I just started using OpenHab on Raspberry and configured it with SolarEdge + modbus meter.
I user private key token and set Polling Interval of 1 minute.
I’m wondering if there’s a way to have shorter interval.
I’m using it to turn off specific devices when live_import become >=0, but actually this happen after 1 minute.

Hi Frederico,

I had the same question like you. Looking at the response of the author of the binding, this might come, once he will find the time.

But nice to see somebody had the same question.

Bert

i just started with openHAB. First thing i wanted to do is get my PV Data.

I tried to set it up as good as possible:
When using the private token i get the following error: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

i guess it needs a password and username? but were do i put it?

kind regards Alex

Hi @Deepdigger, @rori1977, @darkf3d3,

I also have a SolarEdge inverter (SE2200) with a Wattnode modbus meter (WNC-3Y-400-MB) attached.
Starting with openHAB the SolarEdge Binding was one of the first I was using frequently and thus I gained a lot of experience.

If you have access to the settings of the SolarEdge inverter (and if you think you are capable to do this), you can activate the ModbusTCP interface.

I wanted to have my setup to be more accurate and a bit more independent of cloud services.
So I setup the Modbus Binding manually (see Solaredge inverter via Modbus TCP 2 - Tutorials & Examples - openHAB Community).
But in the meantime, the Modbus Binding got improved by the Sunspec Extension. This means a lot cleaner Thing overview and makes the scaling rules obsolete (that makes a plus in performance).

For the actual values like current power feed and power usage I am now using the Modbus Binding with the Sunspec extension having two things - the inverter and the meter. Update rate: 5 seconds.
For the aggregate data I am using the Solaredge Binding via public API. Update rate: 15 minutes.

Note: I am still using OH2.5, but this applies on OH3.0 as well I think.

Maybe this helps :slight_smile:

Jonathan

1 Like

Hello Jonathan,

thanks for the hint. From the documentation I can read that the ModBus feature needs to be switched on via SetAPP (which here Germany, it seems, is not given to end consumers, but only to the installer?).

I will ask my installer if he can switch that on for me, however I am not sure if about his English proficiency…

Does anyone - by change - have a screenshot (in English or maybe even in German?) that would clearly show which place in SetApp has to be switched from “off” to “on” to make the ModBus feature work?

I would love to send this to the installer to get the process accelerated a bit, if possible.

I really wonder, why the default setting of this is “off”, but maybe there are good reasons beyond my knowledge, why only the installer can switch this on.

Seems unneccesary complex for end consumers… :frowning:

This may be a tampering security concern i.e. there is none with Modbus.

Hi Bert (@rori1977),

I have a SolarEdge SE2200 inverter and was able to activate the ModbusTCP with the LCD and the Service button on the bottom of the inverter. No need to use the Set App.
Instructions are described in this document: Technical Note – SunSpec Logging in SolarEdge Inverters (can be found in the Solaredge document library).

If you have issues, you can write me a PM (I am German as well).

@rossko57: you are right. With this solution, there is less security, but having your local network under control and the firewall of the internet connection well set, this risk is acceptable.

Jonathan

1 Like

Had to update this post. Acess directly with my python script works. I can read everything even the detailed meter data without problems. so it seems to be only a OpenHab Bindings issue. i might have an error somewhere.

attached what i have so far in OpenHab

@elektrolubach thanks for the point in the right direction.
i have the MTR-3Y-400V-A Meter installed

The Thing for the Meter does not connect and event though the Inverter seems online i cant receive data. But i reveive API data from the web.

Hi @Deepdigger,

I had to adapt the “start address” and “block length” of the modbus:sunspec things. The default settings are not correct. I took the values from the SolarEdge document linked above.

My settings for the inverter are:
Start address: 40069
Block length: 50

And for the meter they are:
Start address: 40188
Block length: 105

By the way: I have a WNC-3Y-400-MB modbus meter. Maybe yours behaves different.

Jonathan

1 Like

Hello Jonathan,

some progress: After installing the modbus binding on my Raspi2
(brand new OH3.1.0.M3 using OpenHABian 1.6.4)

UID: modbus:tcp:3b4da561fd
label: Modbus TCP Slave
thingTypeUID: modbus:tcp
configuration:
  rtuEncoded: false
  reconnectAfterMillis: 600000
  connectMaxTries: 3
  timeBetweenTransactionsMillis: 60
  port: 1502
  timeBetweenReconnectMillis: 200
  host: 192.168.1.183
  connectTimeoutMillis: 10000
  id: 1
  enableDiscovery: true

I can successfully detect and see both the inverter

UID: modbus:inverter-single-phase:3b4da561fd:40069
label: SolarEdge  SE5000H-DE000BNN4
thingTypeUID: modbus:inverter-single-phase
configuration:
  length: 50
  refresh: 5
  maxTries: 3
  address: 40069
bridgeUID: modbus:tcp:3b4da561fd

and the meter

UID: modbus:meter-wye-phase:3b4da561fd:40188
label: WattNode WND-3Y-400-MB
thingTypeUID: modbus:meter-wye-phase
configuration:
  length: 105
  refresh: 5
  maxTries: 3
  address: 40188
bridgeUID: modbus:tcp:3b4da561fd

I have adapted the autodetected values to your recommended settings.
I can see incomming data both with autodetected setting AND with the manual overrides you provided, however I somehow fail to see the (to me) most important channels such as “Production, Import, Export, Consumption” (actual name of these channels might differ, ).

I can see channels that go into a similar direction, but I feel these are not the one I should use.

Can you share the names of the channels that you are using?

I can see the following channel list, which - I believe - might be incomplete:

Any hints appreciated!

Hi @rori1977,

you’re on the right path.

With the ModBus Binding you can only get the measurement data the inverter or/and the meter provide. These are actual values like the AC/DC voltage, current and power (among all the other values).

I can see the following channel list, which - I believe - might be incomplete:
<>

I think, for the inverter this list is complete (check with the binding docu if in doubt).

[…] however I somehow fail to see the (to me) most important channels such as “Production, Import, Export, Consumption” (actual name of these channels might differ, ).

I think you like to see the actual power value - this is what I am using the ModBus Binding for - then these values are as follows:

  • Production = Inverter → AC Power Value (channel: modbus:inverter-<inverter-type>:<inverter-id>:40069:acGeneral#ac-power)
  • Import/Export = Meter → AC Total Real Power (channel: modbus:meter-<meter-type>:<meter-id>:40188:acGeneral#ac-total-real-power) → importing when >0, exporting when <0
  • Consumption = calculated, see next paragraph

In contrast to the SolarEdge Binding (which fetches data from the SolarEdge Monitoring portal) you will have to calculate some values on your own, e.g. the actual self-consumption power value.

You can have a look into this post: Solaredge inverter via Modbus TCP 2 - #21 by elektrolubach. At the end of the file solaredge.rules, there are four rules for the calculation of these values:

  • SE2KM_EigenverbrauchGesamt → Self consumption (Energy [Wh]);
    formula: self consumption = production - export
  • SE2KM_GesamtverbrauchGesamt → Total consumption (Energy [Wh]);
    formula: total consumption = import + production - export
  • SE2KM_SolarerDeckungsgradGesamt → Percentage usage of PV (dimensionless);
    formula: self consumption / total consumption * 100%
  • SE2KM_VerbraeucheMomentan
    → Actual power at the grid connection point (Power [W]);
    formula: grid power = meter value AC Total Real Power
    → Actual power consumption of the house (Power [W]);
    formula: actual power consumption = production - grid power
    → Actual power self consumption of the house (Power [W]);
    formula: actual self consumption = production (+ gridpower, if negative)

I hope this helps :slight_smile:

Jonathan

3 Likes

Hi,

since 2 or 3 weeks, just got an “UNDEF” for current production.

SE api access seems to working fine (based on OH3 UI). Am I the only one, or is there something general with the SE API?

Thanks in advance.

Rgds
Andre

Hi,

I have been using the SolarEdge binding for a few years now. I think back in the days when I set up my items, the unit for the aggregate_day#production channel was set to “Tagesproduktion [%.2f kWh]”.

At least for the past few months I noticed that whenever the aggregate daily production was below 1 kWh, the item would always show something like “600 kWh” when instead only 600 Wh were produced. As soon as 1 kWh is reached, the unit is correct.

I would have suspected the binding to return 0.6 for 600 (Wh), and not 600 when afterwards 1 kWh is returned as “1”? What am I missing here?

For me the daily aggregate works fine also if production is less than 1kWh. Today in the morning it showed me 0.1 kWh. So this is either an individual configuration error. Another reason could be that due to different APIs or existence of a meter the data is retrieved slightly different.

In my setup I use this configuration:

meterInstalled=true
usePrivateApi=true

BR
Alex

Works fine for me, but I defined it this way in the items file:

Number:Energy PV_Aggregate_Day_Production "Produktion (Tag) [%.2f %unit%]"

Maybe the %unit% and Number:Energy helps at your side, too?

Number:Energy SE_DAY_PRODUCTION “Ges. Produktion [%.1f kWh]”

It is possible (and also recommend when using persistence) to enforce a specific unit. This triggers conversion. But this only works when the correct type is used (Number:Energy). If you just use the raw type it will not work. It will then use whatever the binding returns and just append “kWh” to it.

2 Likes

I now added Number:Energy and am using [%.2f kWh], see Screenshot below.

I am still not seeing 0.457 kWh though, I am now getting 457 Wh (which is technically correct of course, but I would much rather have it show 0.457 kWh, especially as I am showing that value in Grafana and also would like to use those numbers for calculation, which might be hard when it’s not always the same unit (Wh vs. kWh).

Edit: I forgot to mention, my SolarEdge thing is also setup with meterInstalled=true and usePrivateApi=true.

Unfortunately, the state presentation ‘pattern’ (the bit, or ‘pattern’ in
Item metadata) was hijacked years ago to also provide a quantity type Item’s default unit.
It is dual purpose, and so it is difficult to assign a default unit, and then display in a different unit.

This could be done in BasicUI + sitemap by giving an overriding “label [unit]” to the sitemap widget, and auto-conversion will happen.

In MainUI I think you would have to build a custom widget to do your own conversion. Clearly the auto-conversion to arbitrary units is somewhere in the framework for BasicUI, but I don’t think anyone has found how to access it in MainUI.

1 Like