WillCodeForCats / WillCodeForCats/solaredge-modbus-multi

[v4.0.0] New device detected after update, fails with "Unable to connect:1502" due to wrong port/IP - Unable to connect to 192.168.1.XXX:1502 after 2 attempts

Open
#1,084 3 comments 0 reactions 1 assignee View on GitHub

@WillCodeForCats is already working on this.

Since Sep 17, 2026.

Dominant language
Python
Stars
326
Forks
29
Avg merge
1d 3h
Merged PRs (30d)
20

Description

Describe the bug

After upgrading to v4.0.0, the integration detected a new device and prompted to add it. When attempting to complete the setup/add the new device, the discovery scan fails with the following error:

Expected behavior

The IP address in the error log (192.168.1.XXX) belongs to the secondary inverter in a Leader/Follower (Master/Slave) setup.

The secondary inverter does not expose/listen on Modbus TCP port 1502 directly; communication for all units is routed through the primary inverter via RS485/Modbus bridge. It appears that the new device-modelling framework in v4.0.0 incorrectly attempts an independent TCP connection to the follower unit's IP instead of querying it through the primary Modbus gateway/connection.

To Reproduce

Running a multi-inverter SolarEdge setup (Leader + Follower via RS485).

Upgrade solaredge-modbus-multi to v4.0.0.

Home Assistant prompts that a new device/component was discovered.

Attempt to add the discovered device.

Setup fails with Scan failed: Unable to connect to <Secondary_Inverter_IP>:1502.

Expected behavior
The discovery/setup mechanism should recognize that secondary/follower inverters are polled through the primary inverter's Modbus connection/Unit ID and should not attempt to establish a separate direct TCP connection to port 1502 on the secondary unit's IP address.

System Information

Integration Version: v4.0.0

Home Assistant Version: 2025.9.0 (or newer)

Setup: Dual SolarEdge Inverters (Leader/Follower via RS485)

Screenshots

No response

Diagnostic File

config_entry-solaredge_modbus_multi-01JVJ3J9M57QX8ZAK3G15Z0SXW.json

Debug logs

Home Assistant Version

2026.9.2

solaredge-modbus-multi Version

4.0.0

Installation Type

HAOS

Read the Instructions
Additional Context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.