alexdelprete / ha-abb-powerone-pvi-sunspec

HA Custom Component to integrate data from ABB/Power-One/FIMER PV Inverters that support SunSpec Modbus (Sunspec M1, M101, M103, M160), natively or through the VSN300 wifi logger card.
MIT License
24 stars 5 forks source link

Failed with error: unpack requires a buffer of 2 bytes on v3.5.0 #165

Open nonth opened 1 month ago

nonth commented 1 month ago

System Health details

System Information

version core-2024.7.3
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.5.0-45-generic
arch x86_64
timezone Asia/Bangkok
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1398 Downloaded Repositories | 15
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | January 1, 2018 at 7:00 AM relayer_connected | false relayer_region | null remote_enabled | true remote_connected | false alexa_enabled | false google_enabled | false remote_server | null certificate_status | null instance_id | 39fe8ae6d4a44c54a5102898879b3151 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 7 -- | -- resources | 9 views | 13 mode | storage
Recorder oldest_recorder_run | July 20, 2024 at 12:25 PM -- | -- current_recorder_run | July 29, 2024 at 8:35 PM estimated_db_size | 401.80 MiB database_engine | sqlite database_version | 3.45.3

Checklist

Describe the issue

Hi @alexdelprete,

I'm using an ABB TRIO-5.8-TL-OUTD-S Inverter with a VSN300 Wifi Logger Card. Everything was working fine on version 3.1.5. However, after updating the integration to version 3.5.0, I encountered the following error:

Failed with error: unpack requires a buffer of 2 bytes

While investigating the differences between the two versions, I found that starting from version 3.3.0, the read_sunspec_modbus_model_160 method in api.py included a check for multiple MPPT IDs if it's not 160. If the ID is not 160, it tries to use register address 41104 for UNO-DM-PLUS and REACT2 inverters (if I understood correctly). In my case, the multi_mppt_id value is 120.

The error Failed with error: unpack requires a buffer of 2 bytes occurs at line 562 in api.py when trying to decode from register address 41104.

I temporarily fixed it by adding a check to ensure the base address is greater than 0 because your readme mentioned that the register map base address for ABB VSN300/VSN700 dataloggers is 0:

if multi_mppt_id != 160 and self._base_addr > 0:

After making this change, the integration started working again. I'm not sure if this is the best solution, so I'd appreciate your advice. If it's okay, I'll open a PR.

Inverter Information:

Integration Configuration:

Reproduction steps

...

Debug logs

homeassistant  | 2024-07-29 18:30:45.737 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] Setup config_entry for abb_powerone_pvi_sunspec
homeassistant  | 2024-07-29 18:30:45.738 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Scan Interval: scan_interval=60 update_interval=0:01:00
homeassistant  | 2024-07-29 18:30:45.738 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Config Data: {'name': 'VSN300', 'host': '192.168.1.111', 'port': 502, 'slave_id': 247, 'base_addr': 0, 'scan_interval': 60}
homeassistant  | 2024-07-29 18:30:45.738 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator API init: Host: 192.168.1.111 Port: 502 ID: 247 ScanInterval: 60
homeassistant  | 2024-07-29 18:30:45.738 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Data Coordinator: Update started at 2024-07-29 18:30:45.738896
homeassistant  | 2024-07-29 18:30:45.739 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] API Client connect to IP: 192.168.1.111 port: 502 slave id: 247 timeout: 59
homeassistant  | 2024-07-29 18:30:45.739 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port: opening socket on 192.168.1.111:502 with a 3.0s timeout.
homeassistant  | 2024-07-29 18:30:45.748 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port (SUCCESS): port open on 192.168.1.111:502
homeassistant  | 2024-07-29 18:30:45.748 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Inverter ready for Modbus TCP connection
homeassistant  | 2024-07-29 18:30:45.757 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Modbus TCP Client connected
homeassistant  | 2024-07-29 18:30:45.758 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Start Get data (Slave ID: 247 - Base Address: 0)
homeassistant  | 2024-07-29 18:30:45.770 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Slave ID: 247
homeassistant  | 2024-07-29 18:30:45.771 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Base Address: 0
homeassistant  | 2024-07-29 18:30:45.772 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Manufacturer: Power-One
homeassistant  | 2024-07-29 18:30:45.772 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Model: -3M97-
homeassistant  | 2024-07-29 18:30:45.772 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Options: r
homeassistant  | 2024-07-29 18:30:45.772 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (opt_printable) opt_model: r - opt_model_int: 114
homeassistant  | 2024-07-29 18:30:45.772 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (opt_comm_model) comm_model: TRIO-5.8-OUTD
homeassistant  | 2024-07-29 18:30:45.772 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Version: CAA8
homeassistant  | 2024-07-29 18:30:45.772 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Sernum: 108624-3M97-5019
homeassistant  | 2024-07-29 18:30:45.779 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Slave ID: 247
homeassistant  | 2024-07-29 18:30:45.779 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Base Address: 0
homeassistant  | 2024-07-29 18:30:45.779 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (int): 103
homeassistant  | 2024-07-29 18:30:45.780 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (str): Three Phase
homeassistant  | 2024-07-29 18:30:45.780 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Value Read: 25487796
homeassistant  | 2024-07-29 18:30:45.780 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Previous Value: 1
homeassistant  | 2024-07-29 18:30:45.780 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) DC Power Value read: 0
homeassistant  | 2024-07-29 18:30:45.780 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Oth Value read: 37.1
homeassistant  | 2024-07-29 18:30:45.782 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Cab Value read: 37.3
homeassistant  | 2024-07-29 18:30:45.782 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Device Status Value read: Out OC
homeassistant  | 2024-07-29 18:30:45.782 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Status Vendor Value read: Run
homeassistant  | 2024-07-29 18:30:45.782 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Completed
homeassistant  | 2024-07-29 18:30:45.791 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Slave ID: 247
homeassistant  | 2024-07-29 18:30:45.791 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Base Address: 0
homeassistant  | 2024-07-29 18:30:45.791 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Model not 160 try another offset - multi_mppt_id: 120
homeassistant  | 2024-07-29 18:30:45.802 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Slave ID: 247
homeassistant  | 2024-07-29 18:30:45.802 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Base Address: 0
homeassistant  | 2024-07-29 18:30:45.802 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] read_sunspec_modbus: failed with error: unpack requires a buffer of 2 bytes
homeassistant  | 2024-07-29 18:30:45.804 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Update Error:  at 2024-07-29 18:30:45.738373
homeassistant  | 2024-07-29 18:30:45.804 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Finished fetching abb_powerone_pvi_sunspec (108624-3M97-5019) data in 0.066 seconds (success: False)

Diagnostics dump

No response

alexdelprete commented 1 month ago

Thanks for opening the issue. It led me to rework the Model 160 logic and simplify it, so now we can read M160 registers also for Trio inverters. :)

Check code changes here: https://github.com/alexdelprete/ha-abb-powerone-pvi-sunspec/commit/ee5ba3ebb449bae5d4a9e55ab8711d3e51cc41ab

I released a v3.5.1-beta.1 version to be tested, you can use it in HACS if you enable Show beta versions in Redownload page.

image

Please let me know if it works and if you also see Model 160 specific values, with previous versions you wouldn't.

nonth commented 1 month ago

Hi @alexdelprete ,

Thanks for an update but still getting the same error. Here's the log from v3.5.1-beta.1.

homeassistant  | -------------------------------------------------------------------
homeassistant  | ABB/Power-One/FIMER PVI SunSpec ModBus TCP
homeassistant  | Version: 3.0.0
homeassistant  | by @alexdelprete
homeassistant  | This is a custom integration!
homeassistant  | If you have any issues with this you need to open an issue here:
homeassistant  | https://github.com/alexdelprete/ha-abb-powerone-pvi-sunspec/issues
homeassistant  | -------------------------------------------------------------------
homeassistant  | 
homeassistant  | 2024-07-30 10:42:06.892 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] Setup config_entry for abb_powerone_pvi_sunspec
homeassistant  | 2024-07-30 10:42:06.892 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Scan Interval: scan_interval=60 update_interval=0:01:00
homeassistant  | 2024-07-30 10:42:06.892 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Config Data: {'name': 'VSN300', 'host': '192.168.1.111', 'port': 502, 'slave_id': 247, 'base_addr': 0, 'scan_interval': 60}
homeassistant  | 2024-07-30 10:42:06.893 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator API init: Host: 192.168.1.111 Port: 502 ID: 247 ScanInterval: 60
homeassistant  | 2024-07-30 10:42:06.893 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Data Coordinator: Update started at 2024-07-30 10:42:06.893048
homeassistant  | 2024-07-30 10:42:06.893 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] API Client connect to IP: 192.168.1.111 port: 502 slave id: 247 timeout: 59
homeassistant  | 2024-07-30 10:42:06.893 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port: opening socket on 192.168.1.111:502 with a 3.0s timeout.
homeassistant  | 2024-07-30 10:42:07.234 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port (SUCCESS): port open on 192.168.1.111:502
homeassistant  | 2024-07-30 10:42:07.235 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Inverter ready for Modbus TCP connection
homeassistant  | 2024-07-30 10:42:07.247 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Modbus TCP Client connected
homeassistant  | 2024-07-30 10:42:07.248 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Start Get data (Slave ID: 247 - Base Address: 0)
homeassistant  | 2024-07-30 10:42:07.270 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Slave ID: 247
homeassistant  | 2024-07-30 10:42:07.271 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Base Address: 0
homeassistant  | 2024-07-30 10:42:07.271 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Manufacturer: Power-One
homeassistant  | 2024-07-30 10:42:07.271 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Model: -3M97-
homeassistant  | 2024-07-30 10:42:07.271 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Options: r
homeassistant  | 2024-07-30 10:42:07.271 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (opt_printable) opt_model: r - opt_model_int: 114
homeassistant  | 2024-07-30 10:42:07.271 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (opt_comm_model) comm_model: TRIO-5.8-OUTD
homeassistant  | 2024-07-30 10:42:07.271 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Version: CAA8
homeassistant  | 2024-07-30 10:42:07.271 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Sernum: 108624-3M97-5019
homeassistant  | 2024-07-30 10:42:07.304 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Slave ID: 247
homeassistant  | 2024-07-30 10:42:07.304 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Base Address: 0
homeassistant  | 2024-07-30 10:42:07.304 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (int): 103
homeassistant  | 2024-07-30 10:42:07.304 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (str): Three Phase
homeassistant  | 2024-07-30 10:42:07.304 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Value Read: 25491184
homeassistant  | 2024-07-30 10:42:07.304 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Previous Value: 1
homeassistant  | 2024-07-30 10:42:07.304 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) DC Power Value read: 1516
homeassistant  | 2024-07-30 10:42:07.305 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Oth Value read: 42.4
homeassistant  | 2024-07-30 10:42:07.305 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Cab Value read: 40.1
homeassistant  | 2024-07-30 10:42:07.305 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Device Status Value read: Out OC
homeassistant  | 2024-07-30 10:42:07.305 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Status Vendor Value read: Run
homeassistant  | 2024-07-30 10:42:07.305 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Completed
homeassistant  | 2024-07-30 10:42:07.321 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Model: TRIO-5.8-OUTD
homeassistant  | 2024-07-30 10:42:07.321 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Slave ID: 247
homeassistant  | 2024-07-30 10:42:07.321 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Base Address: 0
homeassistant  | 2024-07-30 10:42:07.321 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Offset: 208
homeassistant  | 2024-07-30 10:42:07.322 DEBUG (SyncWorker_4) [custom_components.abb_powerone_pvi_sunspec.api] read_sunspec_modbus: failed with error: unpack requires a buffer of 2 bytes
homeassistant  | 2024-07-30 10:42:07.331 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Update Error:  at 2024-07-30 10:42:06.892794
homeassistant  | 2024-07-30 10:42:07.331 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Finished fetching abb_powerone_pvi_sunspec (108624-3M97-5019) data in 0.438 seconds (success: False)
homeassistant  | 2024-07-30 10:42:17.724 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] Setup config_entry for abb_powerone_pvi_sunspec
homeassistant  | 2024-07-30 10:42:17.724 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Scan Interval: scan_interval=60 update_interval=0:01:00
homeassistant  | 2024-07-30 10:42:17.725 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Config Data: {'name': 'VSN300', 'host': '192.168.1.111', 'port': 502, 'slave_id': 247, 'base_addr': 0, 'scan_interval': 60}
homeassistant  | 2024-07-30 10:42:17.725 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator API init: Host: 192.168.1.111 Port: 502 ID: 247 ScanInterval: 60
homeassistant  | 2024-07-30 10:42:17.725 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Data Coordinator: Update started at 2024-07-30 10:42:17.725312
homeassistant  | 2024-07-30 10:42:17.725 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] API Client connect to IP: 192.168.1.111 port: 502 slave id: 247 timeout: 59
homeassistant  | 2024-07-30 10:42:17.725 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port: opening socket on 192.168.1.111:502 with a 3.0s timeout.
homeassistant  | 2024-07-30 10:42:17.773 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port (SUCCESS): port open on 192.168.1.111:502
homeassistant  | 2024-07-30 10:42:17.782 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Inverter ready for Modbus TCP connection
homeassistant  | 2024-07-30 10:42:17.786 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Modbus TCP Client connected
homeassistant  | 2024-07-30 10:42:17.786 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Start Get data (Slave ID: 247 - Base Address: 0)
homeassistant  | 2024-07-30 10:42:17.806 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Slave ID: 247
homeassistant  | 2024-07-30 10:42:17.806 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Base Address: 0
homeassistant  | 2024-07-30 10:42:17.807 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Manufacturer: Power-One
homeassistant  | 2024-07-30 10:42:17.807 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Model: -3M97-
homeassistant  | 2024-07-30 10:42:17.807 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Options: r
homeassistant  | 2024-07-30 10:42:17.807 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (opt_printable) opt_model: r - opt_model_int: 114
homeassistant  | 2024-07-30 10:42:17.807 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (opt_comm_model) comm_model: TRIO-5.8-OUTD
homeassistant  | 2024-07-30 10:42:17.807 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Version: CAA8
homeassistant  | 2024-07-30 10:42:17.807 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Sernum: 108624-3M97-5019
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Slave ID: 247
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Base Address: 0
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (int): 103
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (str): Three Phase
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Value Read: 25491184
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Previous Value: 1
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) DC Power Value read: 1516
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Oth Value read: 42.4
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Cab Value read: 40.1
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Device Status Value read: Out OC
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Status Vendor Value read: Run
homeassistant  | 2024-07-30 10:42:17.820 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Completed
homeassistant  | 2024-07-30 10:42:17.830 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Model: TRIO-5.8-OUTD
homeassistant  | 2024-07-30 10:42:17.832 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Slave ID: 247
homeassistant  | 2024-07-30 10:42:17.832 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Base Address: 0
homeassistant  | 2024-07-30 10:42:17.832 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Offset: 208
homeassistant  | 2024-07-30 10:42:17.832 DEBUG (SyncWorker_5) [custom_components.abb_powerone_pvi_sunspec.api] read_sunspec_modbus: failed with error: unpack requires a buffer of 2 bytes
homeassistant  | 2024-07-30 10:42:17.833 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Update Error:  at 2024-07-30 10:42:17.724886
homeassistant  | 2024-07-30 10:42:17.833 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Finished fetching abb_powerone_pvi_sunspec (108624-3M97-5019) data in 0.108 seconds (success: False)
homeassistant  | 2024-07-30 10:42:28.306 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] Setup config_entry for abb_powerone_pvi_sunspec
homeassistant  | 2024-07-30 10:42:28.306 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Scan Interval: scan_interval=60 update_interval=0:01:00
homeassistant  | 2024-07-30 10:42:28.307 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Config Data: {'name': 'VSN300', 'host': '192.168.1.111', 'port': 502, 'slave_id': 247, 'base_addr': 0, 'scan_interval': 60}
homeassistant  | 2024-07-30 10:42:28.307 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator API init: Host: 192.168.1.111 Port: 502 ID: 247 ScanInterval: 60
homeassistant  | 2024-07-30 10:42:28.307 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Data Coordinator: Update started at 2024-07-30 10:42:28.307534
homeassistant  | 2024-07-30 10:42:28.307 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] API Client connect to IP: 192.168.1.111 port: 502 slave id: 247 timeout: 59
homeassistant  | 2024-07-30 10:42:28.307 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port: opening socket on 192.168.1.111:502 with a 3.0s timeout.
homeassistant  | 2024-07-30 10:42:29.032 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port (SUCCESS): port open on 192.168.1.111:502
homeassistant  | 2024-07-30 10:42:29.032 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Inverter ready for Modbus TCP connection
homeassistant  | 2024-07-30 10:42:29.042 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Modbus TCP Client connected
homeassistant  | 2024-07-30 10:42:29.042 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Start Get data (Slave ID: 247 - Base Address: 0)
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Slave ID: 247
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Base Address: 0
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Manufacturer: Power-One
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Model: -3M97-
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Options: r
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (opt_printable) opt_model: r - opt_model_int: 114
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (opt_comm_model) comm_model: TRIO-5.8-OUTD
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Version: CAA8
homeassistant  | 2024-07-30 10:42:29.057 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Sernum: 108624-3M97-5019
homeassistant  | 2024-07-30 10:42:29.067 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Slave ID: 247
homeassistant  | 2024-07-30 10:42:29.067 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Base Address: 0
homeassistant  | 2024-07-30 10:42:29.067 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (int): 103
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (str): Three Phase
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Value Read: 25491184
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Previous Value: 1
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) DC Power Value read: 1516
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Oth Value read: 42.4
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Cab Value read: 40.1
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Device Status Value read: Out OC
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Status Vendor Value read: Run
homeassistant  | 2024-07-30 10:42:29.068 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Completed
homeassistant  | 2024-07-30 10:42:29.078 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Model: TRIO-5.8-OUTD
homeassistant  | 2024-07-30 10:42:29.078 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Slave ID: 247
homeassistant  | 2024-07-30 10:42:29.078 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Base Address: 0
homeassistant  | 2024-07-30 10:42:29.078 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Offset: 208
homeassistant  | 2024-07-30 10:42:29.079 DEBUG (SyncWorker_1) [custom_components.abb_powerone_pvi_sunspec.api] read_sunspec_modbus: failed with error: unpack requires a buffer of 2 bytes
homeassistant  | 2024-07-30 10:42:29.079 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Update Error:  at 2024-07-30 10:42:28.307010
homeassistant  | 2024-07-30 10:42:29.079 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Finished fetching abb_powerone_pvi_sunspec (108624-3M97-5019) data in 0.772 seconds (success: False)
alexdelprete commented 1 month ago

Strange. I used this register map (for the TRIO-50.0-TL-OUTD):

You can see that at address 40208 there's the model# register (int16), and it should be 160.

image

Can you check with qmodmaster reading from address 40200 if at 40208 you read the 160 value?

If it's not there, then the register map is not correct.

alexdelprete commented 1 month ago

@nonth can you please test beta.2? I noticed I was decoding int16 type but it should be an uint16. I hope that was the issue. I also added some debug log to see where it's stopping, please post the debug log like you did before.

Thanks for the help.

nonth commented 1 month ago

@alexdelprete here's a log from beta 2, It looks like it stops around line 549.

Anything I can do to help from my end?

Thanks!

homeassistant  | -------------------------------------------------------------------
homeassistant  | ABB/Power-One/FIMER PVI SunSpec ModBus TCP
homeassistant  | Version: 3.0.0
homeassistant  | by @alexdelprete
homeassistant  | This is a custom integration!
homeassistant  | If you have any issues with this you need to open an issue here:
homeassistant  | https://github.com/alexdelprete/ha-abb-powerone-pvi-sunspec/issues
homeassistant  | -------------------------------------------------------------------
homeassistant  | 
homeassistant  | 2024-07-31 11:01:02.326 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec] Setup config_entry for abb_powerone_pvi_sunspec
homeassistant  | 2024-07-31 11:01:02.326 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Scan Interval: scan_interval=60 update_interval=0:01:00
homeassistant  | 2024-07-31 11:01:02.326 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Config Data: {'name': 'VSN300', 'host': '192.168.1.111', 'port': 502, 'slave_id': 247, 'base_addr': 0, 'scan_interval': 60}
homeassistant  | 2024-07-31 11:01:02.326 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator API init: Host: 192.168.1.111 Port: 502 ID: 247 ScanInterval: 60
homeassistant  | 2024-07-31 11:01:02.326 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Data Coordinator: Update started at 2024-07-31 11:01:02.326924
homeassistant  | 2024-07-31 11:01:02.328 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] API Client connect to IP: 192.168.1.111 port: 502 slave id: 247 timeout: 59
homeassistant  | 2024-07-31 11:01:02.328 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port: opening socket on 192.168.1.111:502 with a 3.0s timeout.
homeassistant  | 2024-07-31 11:01:02.464 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Check_Port (SUCCESS): port open on 192.168.1.111:502
homeassistant  | 2024-07-31 11:01:02.464 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Inverter ready for Modbus TCP connection
homeassistant  | 2024-07-31 11:01:02.471 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Modbus TCP Client connected
homeassistant  | 2024-07-31 11:01:02.471 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.api] Start Get data (Slave ID: 247 - Base Address: 0)
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Slave ID: 247
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Base Address: 0
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Manufacturer: Power-One
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Model: -3M97-
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Options: r
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (opt_printable) opt_model: r - opt_model_int: 114
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (opt_comm_model) comm_model: TRIO-5.8-OUTD
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Version: CAA8
homeassistant  | 2024-07-31 11:01:02.486 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_1) Sernum: 108624-3M97-5019
homeassistant  | 2024-07-31 11:01:02.515 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Slave ID: 247
homeassistant  | 2024-07-31 11:01:02.515 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Base Address: 0
homeassistant  | 2024-07-31 11:01:02.515 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (int): 103
homeassistant  | 2024-07-31 11:01:02.515 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Inverter Type (str): Three Phase
homeassistant  | 2024-07-31 11:01:02.515 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Value Read: 25504416
homeassistant  | 2024-07-31 11:01:02.515 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Total Energy Previous Value: 1
homeassistant  | 2024-07-31 11:01:02.515 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) DC Power Value read: 1768
homeassistant  | 2024-07-31 11:01:02.515 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Oth Value read: 44.3
homeassistant  | 2024-07-31 11:01:02.516 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Temp Cab Value read: 42.0
homeassistant  | 2024-07-31 11:01:02.516 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Device Status Value read: Out OC
homeassistant  | 2024-07-31 11:01:02.516 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Status Vendor Value read: Run
homeassistant  | 2024-07-31 11:01:02.516 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_101_103) Completed
homeassistant  | 2024-07-31 11:01:02.523 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Model: TRIO-5.8-OUTD
homeassistant  | 2024-07-31 11:01:02.523 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Slave ID: 247
homeassistant  | 2024-07-31 11:01:02.523 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Base Address: 0
homeassistant  | 2024-07-31 11:01:02.523 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Offset: 208
homeassistant  | 2024-07-31 11:01:02.523 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] (read_rt_160) Decode Model #
homeassistant  | 2024-07-31 11:01:02.524 DEBUG (SyncWorker_6) [custom_components.abb_powerone_pvi_sunspec.api] read_sunspec_modbus: failed with error: unpack requires a buffer of 2 bytes
homeassistant  | 2024-07-31 11:01:02.524 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Coordinator Update Error:  at 2024-07-31 11:01:02.326660
homeassistant  | 2024-07-31 11:01:02.524 DEBUG (MainThread) [custom_components.abb_powerone_pvi_sunspec.coordinator] Finished fetching abb_powerone_pvi_sunspec (108624-3M97-5019) data in 0.198 seconds (success: False)
cat volume/data/custom_components/abb_powerone_pvi_sunspec/manifest.json 
{
  "domain": "abb_powerone_pvi_sunspec",
  "name": "ABB/Power-One/FIMER PVI SunSpec",
  "codeowners": [
    "@alexdelprete"
  ],
  "config_flow": true,
  "documentation": "https://github.com/alexdelprete/ha-abb-powerone-pvi-sunspec",
  "integration_type": "hub",
  "iot_class": "local_polling",
  "issue_tracker": "https://github.com/alexdelprete/ha-abb-powerone-pvi-sunspec/issues",
  "loggers": [
    "custom_components.abb_powerone_pvi_sunspec"
  ],
  "requirements": [
    "pymodbus>=3.5.4"
  ],
  "version": "v3.5.1-beta.2"
}
alexdelprete commented 1 month ago

Yes, it's the decode that fails and throws the error. In beta.1 it was

multi_mppt_id = decoder.decode_16bit_int()

I modified it in

multi_mppt_id = decoder.decode_16bit_uint()

Because that register is effectively an unsigned int.

So I don't know exactly why it gives you that error. In order to find out, you should use a tool like qmodmaster to navigate the registers and check at address 40208 what value you find. I expect 160, but we should verify it in order to understand.

nonth commented 1 month ago

@alexdelprete I'll try to use qmodmaster to check the value at address 40208 and get back to you with the results.

Also please bear with me as I'm still new to working with Modbus.

nonth commented 1 month ago

@alexdelprete I'm currently trying to use qmodmaster. I can connect to my inverter, but I'm not sure how to configure the software to read the value.

Here are the settings I'm using:

From settings above qmodmaster shown "Read data failed. Error Illegal data address. I'm unsure if the start address and the number of registers are set correctly.

Can you assist me?

alexdelprete commented 1 month ago

Assuming you set the correct IP and Unit ID, start with address 40002, read 70 registers, to check if basic info is ok.

image

nonth commented 1 month ago

Yes my inverter ip is 192.168.1.111

Try with address 40002, read 70 registers, still got illegal data address

image

alexdelprete commented 1 month ago

Do you have a VSN card? If so, the base address is 0. What base address do you use in my integration? If you use 40000, then 40002 should work in qmodmaster, if you use 0, then you need to use 2.

Try address 2 instead of 40002.

image

alexdelprete commented 1 month ago

Also, you need to set Big Endian in settings (check the status bar where it says Endian: little in your screenshot). And use Scan Rate: 10000.

image

nonth commented 1 month ago

Yes I've VSN300 Wi-Fi Logger card

Here's the result after updating the settings:

image

alexdelprete commented 1 month ago

Great, it's working. :)

Can you please start at address 122 reading 80 registers, and post the screenshot?

Also post result starting from address 208. We need to find the value 160.

Thanks.

nonth commented 1 month ago

address 122 read 80 registers

Screenshot 2024-08-01 122503

but for address 208 got an illegal data address error

Screenshot 2024-08-01 122527

And I'm wondering why the integration can still read values from the inverter even after I modified the code to skip this if block.

alexdelprete commented 1 month ago

Can you try from address 200 for 20 registers.

nonth commented 1 month ago

Here are the result from address 200, read 20 registers. Still no luck :(

Screenshot 2024-08-02 103219

alexdelprete commented 1 month ago

Your system does not respect the documented register map, apparently.

How many strings do you have?

nonth commented 1 month ago

I have single 3 phase string inverter connected with 14 solar panels.

alexdelprete commented 1 month ago

Me too, but I have 27 panels divided on two strings. You have all 14 in 1 string?

nonth commented 1 month ago

Yes,

Right now, I’m trying to understand how to map the registers from your XLS document with the latest code. I see that offset 1104 is for UNO-DM and REACT2, and offset 208 is for TRIO. What about offset 122?

From my understanding, my TRIO-5.8-TL-OUTD-S inverter with a VSN300 card has been works with offset 122.

So I’ve tried using 122 as the start address in QModMaster, and I can retrieve data from the inverter (as shown in the screenshot in my previous comment). The first address block has a value of 120, which corresponds to sheet name 120 in SunSpec_PICS-ABB-TRIO-50.0-TL-OUTD.

I’m not sure if I’m on the right track. Any suggestions on what I should do next, or should I try to find the Modbus register mapping for my inverter?

alexdelprete commented 1 month ago

We don't need Model 120, we need Model 160, which starts at offset 208 (check SunSpec_PICS-ABB-TRIO-50.0-TL-OUTD excel file, the tab 160).

That model contains the values for the strings we need.