Describe the issue
There is need to change attributes and telemetry in the broker configuration based of customer needs. However a MQTT broker is hardcoded currently for sending a few standard data samples. It needs attention to customize the broker to allow data keys and values as per customer needs. A set of easy instructions like in other documentation is proposed.
Configuration (Attach your configuration file)
Notate: Remove Access token from file if you want to attach a tb_gateway.json
Configuration file attached.
mqtt configuration.txt
Connector name (If you need help with some connector/converter):
[e.g. MQTT Connector] "MQTT"
Error traceback (If it was raised):
Missing data as in additional information below.
Versions (please complete the following information):
- OS: As in ThingsBoard Cloud
- Thingsboard IoT Gateway version: Latest as in ThingsBoard Cloud
- Python version: As in ThingsBoard Cloud
Additional context
- We set up broker as per 'docker run -it -p 1884:1884 thingsboard/tb-gw-mqtt-broker:latest'.
- Also filled up data points (8 attributes and 2 telemetry keys) as per instructions mentioned for 'Connection to broker' and 'Data mapping' in the MQTT configuration.
- It was observed that the broker does not forward all configured datapoints. The converter log shows that only 3 data points (2 attributes and 1 telemetry only for every send) are entering the gateway connector. For instance jSON is as below; [json_mqtt_uplink_converter.py] - json_mqtt_uplink_converter _convert_single_item - 133 - Converted data: ConvertedData(deviceName=Demo Device, deviceType=default, telemetry=[TelemetryEntry(ts=1781976641883, metadata={}, values={DatapointKey(key=humidity, report_strategy=None): 65.0})], attributes=Attributes(values={DatapointKey(key=frequency, report_strategy=None): 84.0, DatapointKey(key=power, report_strategy=None): 90.0}), metadata={'receivedTs': 1781976641883}).
- Issue: 6 out of 8 attributes and 1 of 2 telemetry keys are always missing in every payload.
- Inference: Broker needs customization beyond hardcoded data samples (3 inbuilt).
Describe the issue
There is need to change attributes and telemetry in the broker configuration based of customer needs. However a MQTT broker is hardcoded currently for sending a few standard data samples. It needs attention to customize the broker to allow data keys and values as per customer needs. A set of easy instructions like in other documentation is proposed.
Configuration (Attach your configuration file)
Notate: Remove Access token from file if you want to attach a tb_gateway.json
Configuration file attached.
mqtt configuration.txt
Connector name (If you need help with some connector/converter):
[e.g. MQTT Connector] "MQTT"
Error traceback (If it was raised):
Missing data as in additional information below.
Versions (please complete the following information):
Additional context