Hello,
Is there a way to convert Modbus configurations on a TRB to single JSON file ? On the TRB Modbus serial client is configured and to its RS485 a modbus capable meter is connected which serves as Modbus server. I want to pull the complete Modbus configuration for client, requests and then just further use this to add more requests as and when meters are added to the TRB and further TRB’s in use.
Thanks
JH
Greetings,
You can retrieve the Modbus client configuration via the CLI using the following command:
ubus call uci get '{"config":"modbus_client"}' > /tmp/modbus_config.json
This will generate a JSON file containing the Modbus client configuration. You can then download this file using WinSCP.
Instructions for accessing the CLI are available here:
Instructions on downloading files from the router can be found here:
Please note that the configuration file cannot be uploaded directly to apply the settings. To reapply the configuration, you would need to create a script that parses the JSON file and applies the values using uci set commands.
Additional information on UCI command usage is available here:
Best Regards,
Justinas