我正在尝试使用 thingsboard IoT 网关连接到 thingsboard 服务器。我已遵循以下链接中给出的所有步骤:https ://thingsboard.io/docs/iot-gateway/install/source-installation/
使用命令运行 tb-gateway 时:python3 ./thingsboard_gateway/tb_gateway.py
我收到以下错误消息:
INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected mapping handlers: 0"
INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted serverSideRpc handlers: 2"
INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected serverSideRpc handlers: 0"
INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted connectRequests handlers: 2"
INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected connectRequests handlers: 0"
INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted disconnectRequests handlers: 2"
INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected disconnectRequests handlers: 0"
ERROR - [mqtt_connector.py] - mqtt_connector - 130 - 'attributeRequests' section missing from configuration"
INFO - [mqtt_connector.py] - mqtt_connector - 153 - Number of accepted attributeUpdates handlers: 1"
INFO - [mqtt_connector.py] - mqtt_connector - 157 - Number of rejected attributeUpdates handlers: 0"
INFO - [tb_gateway_service.py] - tb_gateway_service - 135 - Gateway started."
ERROR - [tb_client.py] - tb_client - 132 - [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\thingsboard_gateway-2.5.4-py3.9.egg\thingsboard_gateway\gateway\tb_client.py", line 127, in run
self.client.connect(keepalive=keep_alive,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\thingsboard_gateway-2.5.4-py3.9.egg\thingsboard_gateway\tb_client\tb_device_mqtt.py", line 167, in connect
self._client.connect(self.__host, self.__port, keepalive=keepalive)
我在各个文件中做了以下更改:
mqtt.json:
"broker": {
"name":"Default Local Broker",
"host":"IP Address",
"port":1883,
"clientId": "ThingsBoard_gateway",
"security": {
"type": "basic",
"username": "**********",
"password": "***********"
}
}
tb_gateway.yaml:
host: "IP Address"
port: 1883
remoteShell: false
remoteConfiguration: false
security:
accessToken: ********************
qos: 1
storage:
type: memory
read_records_count: 100
max_records_count: 100000
connectors:
-
name: MQTT Broker Connector
type: mqtt
configuration: mqtt.json
感谢你的帮助。提前致谢。