Replies: 8 comments 32 replies
-
Can you tell me the version of the integration you're using? How many panel strings do you have connected, 1 or 2? Also, can you show me the screenshot of qmodmaster with offset 122? The problem is that for some inverter models, the M160 sunspec model doesn't start at 122, so we need to find where it is in your case. For UNO-DM-* and REACT2-* models, the offset is 1104. If we can find where the M160 model starts, I can implement a fix for your model. You need to use qmodmaster to find it. |
Beta Was this translation helpful? Give feedback.
-
I will release a beta with the following code for M160, that takes into account 3 different offsets: check those 3 offsets with qmodmaster, in first register you should find the value 160. try:
# Model 160 default address: 40122 (or base address + 122)
# For UNO-DM-PLUS/REACT2/TRIO inverters it has different offset
invmodel = self.data["comm_model"].upper()
if invmodel.startswith("UNO") or invmodel.startswith("REACT2"):
offset = 1104
elif invmodel.startswith("TRIO"):
offset = 208
else:
offset = 122
read_model_160_data = self.read_holding_registers(
slave=self._slave_id, address=(self._base_addr + offset), count=42
)
_LOGGER.debug("(read_rt_160) Model: %s", invmodel)
_LOGGER.debug("(read_rt_160) Slave ID: %s", self._slave_id)
_LOGGER.debug("(read_rt_160) Base Address: %s", self._base_addr)
_LOGGER.debug("(read_rt_160) Offset: %s", offset)
except ModbusException as modbus_error:
_LOGGER.debug(f"Read M160 modbus_error: {modbus_error}")
raise ModbusError() from modbus_error |
Beta Was this translation helpful? Give feedback.
-
v3.5.1-beta.4 has been released, please upgrade and let me know how it goes. Thanks. |
Beta Was this translation helpful? Give feedback.
-
@pdebruine can you test latest beta for me? I introduced a new method to look for M160 data, trying ALL offsets. I think M160 data is available ONLY when using Multi-MPPTs: it doesn't depend on the model, etc. It's v3.5.5-beta.1. if you can send me a debug log you do me a favor, I want to see how it works with other inverters. Thank you. |
Beta Was this translation helpful? Give feedback.
-
That error is really weird. Never seen it before. Please test v3.5.5 final. I tested 3.5.5 with 3 other users, didn't have issues. |
Beta Was this translation helpful? Give feedback.
-
I noticed that, and I modified the code: class ABBPowerOneFimerCoordinator(DataUpdateCoordinator):
"""Class to manage fetching data from the API."""
config_entry: ConfigEntry
def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry) -> None:
"""Initialize data update coordinator."""
# get parameters from user config
self.conf_name = config_entry.data.get(CONF_NAME)
self.conf_host = config_entry.data.get(CONF_HOST)
self.conf_port = int(config_entry.data.get(CONF_PORT))
self.conf_slave_id = int(config_entry.data.get(CONF_SLAVE_ID))
self.conf_base_addr = int(config_entry.data.get(CONF_BASE_ADDR))
self.scan_interval = int(
config_entry.data.get(CONF_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL)
) It's in latest release. Did you test it? I don't have your error, and 3 other users neither. So I'm a little bit confused about your issue. What HA version are you using? Please post the FULL debug log, filtering with "abb" in the HA search input and post it here. I'll compare it to mine. |
Beta Was this translation helpful? Give feedback.
-
I tested with an int conversion, like I do in the integration, and it works: slave_id: int = 247.0
def myMethod(slave_id1: int):
return slave_id1.to_bytes(1, 'big')
value = myMethod(int(slave_id))
print(value) result: b'\xf7'
** Process exited - Return Code: 0 **
Press Enter to exit terminal |
Beta Was this translation helpful? Give feedback.
-
Sorry for getting back at you late on this. Good to know now we manage errors for these inverters correctly, it helped making the code more resilient. But I see a weird issue: your inverter reports it has 2 MPPTs, but I see data only of one. How many strings you have, 1 or 2? 2025-01-22 14:50:33.860 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Model: UNO-3.0-TL-OUTD
2025-01-22 14:50:33.860 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Slave ID: 247
2025-01-22 14:50:33.860 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Base Address: 0
2025-01-22 14:50:33.860 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Offset: 122
2025-01-22 14:50:33.871 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) mppt_nr 2
2025-01-22 14:50:33.871 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) dc1curr: 0.17 Round: 0.17 SF: -2
2025-01-22 14:50:33.871 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) dc1volt 237.0
2025-01-22 14:50:33.872 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) dc1power 40
2025-01-22 14:50:33.872 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) dc2curr: 0.0 Round: 0.0 SF: -2
2025-01-22 14:50:33.872 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) dc2volt 0.0
2025-01-22 14:50:33.872 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) dc2power 0
2025-01-22 14:50:33.872 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Completed |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to setup this integration with my ABB UNO-3.0-TL-OUTD inverter with the VSN300 WiFi logger card. I have installed HACS and the custom component, but when I try to add the device in HA I get an "Unknown error".
I see this in the logs:
As you can see it's reading some data from the inverter, but if fails in the read_sunspec_modbus_model_160 method. I had a look at the code and saw that it's trying to read data with an offset of 122 and a count of 42. I tried to do that myself but then I also get an read error in the Modbus Master tool.
After some experimenting I noticed that I can only read 2 register from offset 122, more than 2 registers will give a read error in the tool.
Do you have any clue why this happens? Should this component work with my inverter?
Beta Was this translation helpful? Give feedback.
All reactions