Skip to content
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

Unit ID = device_address not working? #52

Open
TeslaV1 opened this issue Feb 17, 2024 · 2 comments
Open

Unit ID = device_address not working? #52

TeslaV1 opened this issue Feb 17, 2024 · 2 comments

Comments

@TeslaV1
Copy link

TeslaV1 commented Feb 17, 2024

Huawei inverters use a dongle as bridge to accept modbus tcp requests and map them to modbus rtu. With this more than one inverter can be connected to the dongle.

When wanting to read registers from one or the other inverter, the unit ID is needed to identify the correct inverter.

Please add support for that, many thanks in advance.

@TeslaV1
Copy link
Author

TeslaV1 commented Feb 17, 2024

Dammit, is already implemented, sorry for that.

@TeslaV1 TeslaV1 closed this as completed Feb 17, 2024
@TeslaV1 TeslaV1 reopened this Feb 17, 2024
@TeslaV1
Copy link
Author

TeslaV1 commented Feb 17, 2024

Sorry I have to reopen that.

This is my config:

ip: 192.168.0.157 #your inverter ip address
port: 502
update_rate: 15
device_address: 2 (tested with different addresses)
address_offset: 0
variant: tcp (tested with rtu-over-tcp)
word_order: highlow
scan_batching: 1
registers:

  • pub_topic: "modbus4mqtt/energy_yield"
    address: 32106
    table: 'holding'
    type: int32

Device Address is 2.
If I look at the packets in wireshark I see:
Unit Identifier 1

Unit Identifier does not change if I change the device_address in the config.

Any tips?
Error is:
ValueError: Failed to read 1 holding table registers starting from 32107: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

@TeslaV1 TeslaV1 changed the title Request: add support for unit ID for Huawei inverters Unit ID = device_address not working? Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant