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

[BUG] Modbus Control Path Not Working: RPC Request Fails with AttributeError in Version 3.5.1 #1628

Open
Supreetha-D opened this issue Dec 19, 2024 · 0 comments
Assignees
Labels

Comments

@Supreetha-D
Copy link

Describe the bug
I am using ThingsBoard Gateway (version 3.5.1) and Thingsboard Server (version 3.7.0) and encountered an issue while trying to send an RPC request from the ThingsBoard Server to the Gateway using the Modbus connector. While testing:

  • The Modbus connector configuration worked successfully when testing the datapath. I was able to create a temp sensor device on the ThingsBoard Server, and telemetry data was published successfully.
  • However, when I attempted to send an RPC request from the server to the ThingsBoard Gateway, I encountered the below error.

Connector name (If bug in the some connector):
Modbus Connector

Error traceback:
The following error appeared in the logs:

Too big LOG message size to send (2203). Skipping... Too big LOG message size to send (1197). Skipping... 2024-12-18 15:01:30 - |ERROR| - [tb_logger.py] - tb_logger - exception - 127 - 'dict' object has no attribute 'split' Traceback (most recent call last): File "/thingsboard_gateway/connectors/modbus/modbus_connector.py", line 644, in server_side_rpc_handler server_rpc_request['device'] = server_rpc_request['params'].split(' ')[0].split('=')[-1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'dict' object has no attribute 'split' Too big LOG message size to send (1095). Skipping...

Steps to Reproduce

  1. Configure the Modbus connector for a datapath.
  2. a temp sensor device is created on the ThingsBoard Server.
  3. Send an RPC request from the ThingsBoard Server to the ThingsBoard Gateway from MODBUS Connector RPC parameters.
  4. Use the getValue and setValue parameters in the RPC message to read/write values.

Expected Behavior

The RPC request should be processed successfully, allowing me to read/write values using the Modbus connector.

Actual Behavior

The request fails with an AttributeError in the Modbus connector code in the Thingsboard gateway debug logs but got 200 success response on the UI. with {"success":false} .
Versions (please complete the following information):

  • OS: Ubuntu 22.04
  • Thingsboard IoT Gateway version 3.5.1
  • Thingsboard Server version 3.7.1
  • Python version 3.10.12
  • Deployment method: Thingsboard Server and Thingsboard gateway deployed as k3s pods, and modbus simulation server is running on host as a python script. and used modbus default connector config.

please let me know what could be the cause ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants