-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple inverters #29
base: master
Are you sure you want to change the base?
Conversation
…y instead of specifying unit_id
…busTcpCLient from pymodbus
Hello rzulian, Thank you for your integration. My set-up will be a little different including 3 x single phase inverters (one for each phase and in master-slave configuration). I was able to include a "battery sensor" as requested by one of the comment present in the issue page but I would like to understand which is the easiest way to get data from each of my inverters. Before landing on your integration I was wondering if it is feasible to implement 3 different custom components with 3 different domain (e.g. solaredge_modbus_1, solaredge_modbus_2, ...) and define 3 inverter communication through modbus over ethernet. Otherwise, have you any suggestion for my implementation? Is it possible for your integration to include 3 inverters? Can you share your configuration as an example? Looking forward to contribute with some testing activities as soon as my system will be upgraded from 1 to 3 inverters. |
I have two inverters and have just setup multiple integrations to access each inverter using their own IP address. I then sum individual production in home assistant to provide total production. One inverter has the consumption meter which I also access via this integration |
That is exactly my goal (plus battery readings). |
@mmN83 I don't think it works this way. What I've understood from my implementation is that you have to use the unit_id to get access to a specific inverter via modbus; you cannot use the different ip address. |
Not really much integration configuration. You need to ensure both inverters have modbus enabled and you know each IP address. Then complete two integrations with different names and ip addresses. I called mine 'solaredge-modbus' and 'solaredge-modbus-meter'. Then I sum the production from both in sensors.yaml to give me a total:
There could be a race issue where the two meters are measures at slightly different times, which is why I am interested in this pull request as I won't need to to the summation myself, the integration will be able to provide the total production as my inverters will be reporting through there internal RS485 Bus, until then I need to utilise the two integrations. |
Agreed. Currently the only way I could see to get the consolidated result was to create two integrations poll each inverter separately, which can have minor timing issues, but seems to be working reasonably for me. I would prefer to just poll the master and get the results from there, hence I'm following your pull request and awaiting its integration. |
Thank you both for your clarification. solaredge_modbus: Am I right? Additionally I can include in the code a if statement to read certain register (battery status) only from 2 of the inverter. I will give it a try as soon as my system will be installed. |
I've added the support for multiple inverters in the same modbus connection. This is the scenario when you have a three-phase inverter for photovoltaic and you also have a battery, which is driven by a single-phase inverter.
You cannot open multiple connection to the different inverters, instead you have to use one connection and use the unit_id to read from the other inverter.
I've used the
ModbusTCPClient
from pymodbus, which is supporting the unit_id in theread_holding_registers
.I've also modified the reference to the meter using
meter_id
instead ofunit_id
, because the unit_id has to reference to the main inverter's unit_id.