UPDATED! SolarEdge Modbus full setup guide with Energy Dashboard integration for Installations with Battery connected

Greetings,

regarding the difference between App and own tracking:

I have a setup with grafana (for dashboard), postgres (as db) and a node application for accumulating energy values between data points and storing the data.
My modbus update interval is 5s but I have had a difference of roughly 7%. Now I added some protection against those 0 values as mentioned in one of your comments.

Thanks!

I just got a solaredge. And know you are on amber…Are you able to limit export through HA? For when amber fit goes negative

Amber SmartShift will export limit your SolarEdge inverter for you if you enroll during negative FIT.

If you have a StorEdge battery you can have we c as one fine control:

Finally I have seen some reports of setting export limits, including zero, through MODBUS registers.

Hi Remko, at the moment i have “my” strange behavior again.

The House “consumes” only 989W, the battery gives approx. 3200W. My Car is charging with about 2,7kW. So that values “must” be wrong. Please look at my Screenshots:

Aaaah…there is something. You are charging your car as well… I am not sure how this reflects in the modbus values or how your car charger is connected. I think the issue is there. It would explain the difference you see, since I do not have an e-car and have not taken this into account at all…

Maybe you could post the values you get from the solaredge intergration, so all sensors starting with “solaredge_”

Thank you for your reply, @Remko!

lets take a look at the solaredge_ values - i hope, you have an ideo which could cause these issues:








I already posted this in this community but i feel in this thread it might be better.
First of all: Thank you for taking the time and effort to @Remko . I learned a lot in this process.


I have random spikes in the energy dashboard that i am unable to understand where they are coming from. They don’t have a pattern, usually occurring once-twice a day, sometimes not at all.

I looked at the sensor states but it does not have any unknown or 0 values, its always increasing.

When looking at the statistics and statistic_short_term in the sqlite file i do see the problem but there my ideas from where to look further stops. The states look good, it appears to me that the statistics code messes something up.

Any ideas where i can look further?

In my setup, I have two SE7600H inverter - each having an LG RESU 10 Prime attached. The primary inverter has also the SmartEV charger connected.
I installed the SolarEdge Modbus integration twice (once for each inverter) and get data from both Inverters - two meters on the primary and one meter on the secondary inverter.
But I do not see the batteries ever. If I check the box for 1 battery during the setup, all values show “unknown”. To verify I connected a raw modbus tool to the inverter and indeed the range that the SunSpec has outlined for a battery is not returning any values.

This makes me think that maybe the installer did not configure the RS485 modbus IDs of the batteries correctly (I saw other people’s posts having similar issues with batteries causing missing data).

Unfortunately there is nowhere a good explanation how the RS485 IDs should be set.
Does anybody have a good tutorial how the Modbus IDs should be configured for all to work (2 inverters, one leader one follower - each having a battery and primary has the EV Charger. The primary seems to have 2 meters and the follower has one meter attached ← all of those are connected via Modbus).

Thanks

1 Like

Looking at the data, I cannot really make out if there is any sensor showing how your car is connected to the system and where I could find those values. Is your car connected directly to the DC side of the inverter and is there an extra meter or so in between?
I have no experience with this, so I am struggling a bit of finding out how that is reflected in the Modbus values.

That is strange, I use the same sensors and do not have those issues. The only thing I can think of is that every now and then the modbus connection drops, the value becomes 0 and jumps back to it’s previous state. But then…I should have that issue too since I am using the same sensors. So…I don’t know

I found it. Solaredge only supports 1 client for modbus. I have a wallbox (openwb) that is also connecting to the inverter. Its hidden in the statistics data, but “weird” responses are visible in the “states” table this way.
To solve this i made hassio add-on that can multiplex multiple modbus clients onto one modbus server. If someone has the same issue i can probably try to publish it.

3 Likes

I used the docker version of modbus proxy below but addon seems also a good solution if you can share yours :slight_smile:

1 Like

i’m also interestet! :slight_smile:

Alright, i went through the “how to make it public” devpage and hope its okay.

@elRadix that is also the python code i used. if you already have a docker running with it its the same thing in the end :slight_smile:

@s_ash
so its my first attempt at doing a add-on, tell me if it worked out for you and if the readme was understandable

Hi @Akulatraxas, I tried to add your repository, but HA says it’s invalid:

Hope it helps.

I have a general question. Is it possible to change the device ID of the Inverter bzw meter in this Project (binsentsu / home-assistant-solaredge-modbus)?
Thanks a lot.

I think i had the same problem as well and it drived be crazy during testing but it turned out that any new repository i tried to add resulted in this error. If you get the same error with other repositories as well then just reboot everything and it should fix itself :slight_smile:

got this error after adding the repo and restarting hass


22-04-20 23:47:19 ERROR (SyncWorker_3) [supervisor.utils.yaml] Can't read YAML file /data/addons/git/81ab01ea/modbus-proxy/config.yaml - while parsing a block mapping
  in "/data/addons/git/81ab01ea/modbus-proxy/config.yaml", line 1, column 1
did not find expected key
  in "/data/addons/git/81ab01ea/modbus-proxy/config.yaml", line 10, column 2
22-04-20 23:47:19 WARNING (SyncWorker_3) [supervisor.store.data] Can't read /data/addons/git/81ab01ea/modbus-proxy/config.yaml from repository 81ab01ea

Thanks for reporting!. Wrong indentation in config.yaml. Please retry

connection is not stable, i need to set connection_time 2 instead of 0.1

Generated Config
devices:
  - modbus:
      url: 192.168.1.125:502 # device url (mandatory)
      timeout: 10 # communication timeout (s) (optional, default: 10)
      connection_time: 0.1 # delay after connection (s) (optional, default: 0)
    listen:
      bind: 0:502 # listening address (mandatory)
2022-04-21 00:26:47,941     INFO modbus-proxy: Starting...
2022-04-21 00:26:47,945     INFO modbus-proxy.ModBus(192.168.1.125:502): Ready to accept requests on 0:502
2022-04-21 00:26:48,546     INFO modbus-proxy.Client(192.168.1.100:55901): new client connection
2022-04-21 00:26:48,547     INFO modbus-proxy.ModBus(192.168.1.125:502): connecting to modbus...
2022-04-21 00:26:48,548    ERROR modbus-proxy.ModBus(192.168.1.125:502): write_read error [1/2]: ConnectionRefusedError(111, "Connect call failed ('192.168.1.125', 502)")
2022-04-21 00:26:48,549     INFO modbus-proxy.ModBus(192.168.1.125:502): connecting to modbus...
2022-04-21 00:26:48,550    ERROR modbus-proxy.ModBus(192.168.1.125:502): write_read error [2/2]: ConnectionRefusedError(111, "Connect call failed ('192.168.1.125', 502)")
2022-04-21 00:26:48,550     INFO modbus-proxy.Client(192.168.1.100:55901): closing connection...
2022-04-21 00:26:48,551     INFO modbus-proxy.Client(192.168.1.100:55901): connection closed
2022-04-21 00:27:03,549     INFO modbus-proxy.Client(192.168.1.100:45661): new client connection
2022-04-21 00:27:03,550     INFO modbus-proxy.ModBus(192.168.1.125:502): connecting to modbus...
2022-04-21 00:27:03,551    ERROR modbus-proxy.ModBus(192.168.1.125:502): write_read error [1/2]: ConnectionRefusedError(111, "Connect call failed ('192.168.1.125', 502)")
2022-04-21 00:27:03,551     INFO modbus-proxy.ModBus(192.168.1.125:502): connecting to modbus...
2022-04-21 00:27:03,552    ERROR modbus-proxy.ModBus(192.168.1.125:502): write_read error [2/2]: ConnectionRefusedError(111, "Connect call failed ('192.168.1.125', 502)")
2022-04-21 00:27:03,552     INFO modbus-proxy.Client(192.168.1.100:45661): closing connection...
2022-04-21 00:27:03,553     INFO modbus-proxy.Client(192.168.1.100:45661): connection closed