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

[HELP]The Modbus RPC call failed #1575

Open
tangchengxiang666 opened this issue Oct 31, 2024 · 0 comments
Open

[HELP]The Modbus RPC call failed #1575

tangchengxiang666 opened this issue Oct 31, 2024 · 0 comments
Assignees

Comments

@tangchengxiang666
Copy link

Describe the issue
The Modbus RPC call failed

Configuration (Attach your configuration file)
Notate: Remove Access token from file if you want to attach a tb_gateway.yaml

Connector name (If you need help with some connector/converter):
MODBUS

Error traceback (If it was raised):

The 空调遥控器1 connector should be modbus1
The 空调遥控器2 connector should be modbus1
Screenshot from 2024-10-31 17-00-03
This causes me to have the following anomaly

2024-10-31 16:56:34 - |ERROR| - [tb_logger.py] - tb_logger - exception - 161 - Error during RPC handling: %s
Traceback (most recent call last):
  File "/home/tcx/Documents/code/github/thingsboard-gateway-release-3.5.3/thingsboard_gateway/connectors/modbus/modbus_connector.py", line 701, in server_side_rpc_handler
    device = ModbusConnector.__get_device_by_name(server_rpc_request[DEVICE_SECTION_PARAMETER],
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tcx/Documents/code/github/thingsboard-gateway-release-3.5.3/thingsboard_gateway/connectors/modbus/modbus_connector.py", line 837, in __get_device_by_name
    return tuple(filter(lambda slave: slave.device_name == device_name, devices))[0]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: tuple index out of range

Versions (please complete the following information):

  • OS: [Ubuntu 24.04]
  • Thingsboard IoT Gateway version [3.5.3]
  • Python version[3.11]
@tangchengxiang666 tangchengxiang666 changed the title [HELP] [HELP]The Modbus RPC call failed Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants