Closed deepthi30192 closed 3 years ago
Hi @deepthi30192 ,
It looks like you tries to send configuration to the gateway and parse it. Unfortunately you didn't provide us with your configuration file, so we are unable to help you in this case. But if you read our official guide for MQTT connector (It is here), the gateway configuration will be more clear for you. Please read it, try to configure like it described there and if you have questions, you will be able to the issue.
I have created a Thingsboard Gateway and a device thru it. When I try to send telemetry and attributes, I get the following error:
ERROR - [tb_utility.py] - tb_utility - 63 - No telemetry and attributes in data: {"deviceName": "SN-001", "deviceType": "Thermometer", "attributes": [], "telemetry": []}" ERROR - [tb_gateway_service.py] - tb_gateway_service - 322 - Data from MQTT Broker Connector connector is invalid."
The command I am giving is :
mosquitto_pub -h localhost -p 1883 -t "/sensor/SN-001/data" -u "user" -P "password" -f "b.json"
The json is:
{ "deviceName": "SN-001", "deviceType" : "Thermometer",
"attributes": [ { "type": "string", "key": "model", "value": "T1000" } ], "telemetry": [ { "type": "double", "key": "temperature", "value": 42 } ] }
Where am I going wrong with the message format?