Replies: 1 comment
-
Hi @ddclement, Thank you for your interest in ThingsBoard IoT Gateway. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hello,
I'm configuring a request connector on an iot gateway, to query a network server in http get. nothing goes up on the thingboard server
I can't see any solution, do you have an idea?
Thank you in advance.
http://192.168.1.16:8080/api/machines/11025/work-orders
configuration file
{
"host": "http://192.168.1. 16:8080",
"security": {
"type": "anonymous"
},
"mapping": [
{
"url": "api/machines/11025/work-orders",
"httpMethod": "GET",
"httpHeaders": {
"ACCEPT": "application/json"
},
"content": {},
"allowRedirects": true,
"timeout": 0. 5,
"scanPeriod": 5,
"converter": {
"type": "json",
"deviceNameJsonExpression": "cyclades11025",
"deviceTypeJsonExpression": "default",
"attributes": [],
"telemetry": [
{
"key": "OF",
"value": "${0.Label}",
"type": "string"
}
]
}
}
],
"attributeUpdates": [],
"serverSideRpc": [],
"logLevel": "TRACE",
"name": "11025",
"enableRemoteLogging": false,
"id": "db8bcc90-649d-422a-afca-78d12b9e4712",
"configVersion": "3.6.1"
}
trace log
Mar 19 14:10:13 salleblanche python3[24700]: 2025-03-19 14:10:13 - |DEBUG| - [request_connector.py] - request_connector - __send_request - 216 - /api/machines/11025/work-orders
Mar 19 14:10:13 salleblanche python3[24700]: 2025-03-19 14:10:13 - |DEBUG| - [request_connector.py] - request_connector - __send_request - 218 - http://192.168.1.16:8080/api/machines/11025/work-orders
Mar 19 14:10:13 salleblanche python3[24700]: 2025-03-19 14:10:13 - |DEBUG| - [request_connector.py] - request_connector - __send_request - 229 - http://192.168.1.16:8080/api/machines/11025/work-orders
Mar 19 14:10:13 salleblanche python3[24700]: 2025-03-19 14:10:13 - |DEBUG| - [request_connector.py] - request_connector - __send_request - 232 - Request to http://192.168.1.16:8080/api/machines/11025/work-orders will be sent
Mar 19 14:10:13 salleblanche python3[24700]: 2025-03-19 14:10:13 - |DEBUG| - [json_request_uplink_converter.py] - json_request_uplink_converter - convert - 134 - Converted data: ConvertedData(deviceName=cyclades11025, deviceType=default, telemetry=[TelemetryEntry(ts=1742389813332.768, metadata={}, values={DatapointKey(key=OF, report_strategy=None): '${0.Label}'})], attributes=Attributes(values={}), metadata={})
Mar 19 14:10:13 salleblanche python3[24700]: 2025-03-19 14:10:13 - |ERROR| - [tb_logger.py] - tb_logger - exception - 161 - 'deviceName - Item not found!'
Mar 19 14:10:13 salleblanche python3[24700]: Traceback (most recent call last):
Mar 19 14:10:13 salleblanche python3[24700]: File "/var/lib/thingsboard_gateway/venv/lib/python3.11/site-packages/thingsboard_gateway/connectors/request/request_connector.py", line 277, in __convert_data
Mar 19 14:10:13 salleblanche python3[24700]: if data_to_send.get(converted_data["deviceName"]) is None:
Mar 19 14:10:13 salleblanche python3[24700]: ~~~~~~~~~~~~~~^^^^^^^^^^^^^^
Mar 19 14:10:13 salleblanche python3[24700]: File "/var/lib/thingsboard_gateway/venv/lib/python3.11/site-packages/thingsboard_gateway/gateway/entities/converted_data.py", line 103, in getitem
Mar 19 14:10:13 salleblanche python3[24700]: raise KeyError(f"{item} - Item not found!")
Mar 19 14:10:13 salleblanche python3[24700]: KeyError: 'deviceName - Item not found!'
Beta Was this translation helpful? Give feedback.
All reactions