Data to Server new MQTT topic limit

When upgrading to firmware RUT2_R_00.07.05 the MQTT topic in Data to Server Collections is now limited to 64 characters, which is a problem when using Azure IoTHub with Azure Storage.

The topic syntax is devices/{device-id}/messages/events/$.ct=application%2Fjson%3Bcharset%3Dutf-8 and that is longer than 64 characters.

Hello,

You are correct. The limit for the MQTT topic in the Data to Server configuration is currently 64 characters as of v7.05. The RnD team is aware of this issue and is planning to increase the limit significantly in the future firmware releases.

For now, I would suggest trying to set the topic via CLI/SSH (username ‘root’). For example:

uci show data_sender
uci set data_sender.2.mqtt_topic='home/smart-house/living-room/temp-sensor-1/data/12345123451234512345'
uci commit
/etc/init.d/data_sender restart

Kind Regards,

Thanks AndzejJ, that fixed the issue with the topic input.

Unfortunately this wasn’t the only problem, as this firmware introduced a breaking change in Data to Server on our setup that I apparently haven’t found yet.

Hello,

Would it be possible for you to provide more information about what exactly is not working?

Kind Regards,

Yes, it is our RUT240 devices. After upgrading to v7.05 the Modbus data readings using the Data to Server package just went silent. It still works fine on any v7.04.x devices.

Here is a copy of my data_sender config:

config settings 'settings'
	option loglevel '1'

config collection 'cfg02efdf_1684390255'
	option period '450'
	option enabled '1'
	option retry '0'
	option name 'Modbus'
	list input 'modbus_Modbus'
	option format_str '[%modbus_Modbus%]'
	option format 'custom'
	option na_str 'N/A'
	option delimiter ','
	option output 'mqtt_Modbus'

config input 'modbus_Modbus'
	option name 'modbus_Modbus'
	option plugin 'modbus'
	option modbus_segments '64'
	option modbus_filter 'all'
	option format 'custom'
	option na_str 'N/A'
	option delimiter ','
	option format_str '{"datetime":"%date%","%name%":%data%}'

config output 'mqtt_Modbus'
	option plugin 'mqtt'
	option name 'mqtt_Modbus'
	option mqtt_use_credentials '0'
	option mqtt_host '127.0.0.1'
	option mqtt_port '8883'
	option mqtt_keepalive '120'
	option mqtt_topic 'devices/mydevice01/messages/events/$.ct=application%2Fjson%3Bcharset%3Dutf-8'
	option mqtt_client_id 'mydevice01'
	option mqtt_qos '2'
	option mqtt_tls '0'

Hello,

Could you please check if Modbus Client and the requests are enabled? Try adding another data input with Base or MNF info. In this case, if there is no Modbus data, the device will still try to send other data.

Are you sending data to the broker running on RUT device or did you replace this for privacy?

If you are using a local broker without a password, make sure you allow anonymous access in MQTT broker → Broker settings → Miscellaneous. Also, check System → Administration → Access control → Security tab and make sure that MQTT ports are not blocked.

Also, did you update the device with ‘keep settings’ option enabled? If possible (and if the issue persists), update the device to the latest firmware version with ‘keep settings’ disabled. You will need to reconfigure the device, so make sure that you have the access to the device before doing so.

Kind Regards,

Hi,

Yes, we use the MQTT Broker service, and it still works sending messages directly to the Modbus and receiving the answer back.

I tried to start from a blank version of v7.05 and entering configuration via the WebUI (where possible) but with no success. Not receiving any Base data from the Data to Server either.

Now after using days of troubleshooting I see no other option than reverting to a previous working firmware version, and awaiting any relevant updates to the documentation and/or bug fixes.

Hello,

Could you please share the screenshots of your Modbus, Data to Server, and MQTT broker configurations?

Kind Regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.