python SDK 数据接入驱动开发问题
-
-
发一下 service.yml 的内容
-
SDK中的 startup.py,没有看到--groupId参数的设置,是SDK版本不同么?
-
这个是后来添加的参数,把 sdk 升级到 v4.0.6. https://github.com/air-iot/sdk-python-examples/releases
-
]2025-07-04 10:23:46,244 INFO --- [ startup]: 启动驱动: jt808_driver_tcp_106
Q2025-07-04 10:23:46,245 INFO --- [ launcher]: connect to data sender
2025-07-04 10:23:46,245 INFO --- [ mqtt_data_sender]: start connect to mqtt server, MqttConfig(scheme=mqtt, host=127.0.0.1, port=1883, username=admin, password=4P1jILKAq5, skip_verify=False, version=4, keepalive=60, reconnect_interval=30, connect_timeout=15, publish_timeout=5)
]2025-07-04 10:23:46,248 ERROR --- [ base_events]: Task exception was never retrieved
�future: <Task finished name='Task-1' coro=<DriverLauncher.start() done, defined at /usr/local/lib/python3.10/site-packages/airiot_python_sdk/driver/launcher.py:93> exception=ConnectionRefusedError(111, 'Connection refused')>
#Traceback (most recent call last):
j File "/usr/local/lib/python3.10/site-packages/airiot_python_sdk/driver/launcher.py", line 101, in start
! self.__connect_data_sender()
z File "/usr/local/lib/python3.10/site-packages/airiot_python_sdk/driver/launcher.py", line 504, in __connect_data_sender
self.data_sender.start()
y File "/usr/local/lib/python3.10/site-packages/airiot_python_sdk/driver/service/mqtt_data_sender.py", line 73, in start
g self.client.connect(host=self.config.host, port=self.config.port, keepalive=self.config.keepalive)
[ File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect
return self.reconnect()
^ File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect
, sock = self._create_socket_connection()
n File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
` return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
M File "/usr/local/lib/python3.10/socket.py", line 857, in create_connection
raise err
M File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection
sock.connect(sa)
7ConnectionRefusedError: [Errno 111] Connection refused -