-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add modbus address selection #59
Add modbus address selection #59
Conversation
Added support to set the device modbus address
Added support to set the device modbus address
Added support to set the device modbus address
Added support to set the device modbus address
This approach will only work for systems where every inverter has an individual modbus/tcp connection or for single inverter systems. This will conflict with #12 or #47 where multiple inverters are read in sequence through a single modbus/tcp connection. Inverters chained through the RS-485 bus cannot be read by duplicating the integration since the solaredge inverter only allows one active modbus/tcp connection at a time, so eventually you will end up with overlapping connection attempts (and failures) trying poll a single IP. You could do a configurable base address and iterate upwards from that, but the only reliable way to read a chain of inverters is by iterating through on a single connection. |
I agree that if you have daisy changed the inverters this will be a issue. Also I think that this can be combined with the feature #12 and #47. So if you look at the feature #12 def read_modbus_data_inverters(self):
for inverter_index in range(self.number_of_inverters):
inverter_prefix = "i" + str(inverter_index + 1) + "_"
inverter_data = self.read_holding_registers(unit=inverter_index + 1, address=40071, count=38) can than be changed to: def read_modbus_data_inverters(self):
for inverter_index in range(self.number_of_inverters):
inverter_prefix = "i" + str(inverter_index + self._address) + "_"
inverter_data = self.read_holding_registers(unit=inverter_index + self._address, address=40071, count=38) |
I will add this to my fork and try it. |
Add modbus address selection binsentsu#59
Add modbus address selection binsentsu#59
You save my day! How to vote to this PR will be merged? It runs like a charm. |
pulled upstram
Hello @WillCodeForCats, Did you had time to check the change? |
@cabeljunky Sorry for the very delayed response. I am no longer using this integration, I've moved on to a different one. |
Not all the inverters are on the default address 1.
If a users has more device on the modbus network the mandatory address 1 is not the preferred and can mess up the network.
The change contains the option to select the address in the flow setup.
Then is is saved and is used in all the all the places where the unit was set.
Also this will also make it easier to configure multiple SolarEdge converters.