Open lambory opened 8 months ago
日志 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused 2024-03-17 09:38:33,414 - INFO - Sleep 2s to reconnect to emqx:1883 2024-03-17 09:38:35,417 - INFO - Speech server started(0.0.0.0:8085/udp) 2024-03-17 09:38:35,418 - INFO - Connected to MQTT Broker(emqx:1883)! 2024-03-17 09:44:53,087 - DEBUG - Received /user/folotoy/24dcc3cf730c/thing/event/post: message data: {'msgId': 0, 'identifier': 'login', 'outParams': {'role': 1}} 2024-03-17 09:44:53,088 - DEBUG - Publish topic: /user/folotoy/24dcc3cf730c/thing/command/call, msg: {"msgId": 0, "identifier": "updatetoken", "inputParams": {"token": "2d8acee95950401fb888cbf7937efabc"}} 2024-03-17 09:44:53,088 - DEBUG - Publish topic: /user/folotoy/24dcc3cf730c/thing/command/call, msg: {"msgId": 1, "identifier": "updateconfig", "inputParams": {"speechUdpServerHost": "34.97.222.161", "speechUdpServerPort": 8085}} 2024-03-17 09:44:59,445 - DEBUG - Received /user/folotoy/24dcc3cf730c/thing/command/callAck: message data: {'msgId': 0, 'identifier': 'updatetoken', 'result': 1} 2024-03-17 09:44:59,445 - DEBUG - Command call ack: True, topic_tokens: {'#': [], '+': ['24dcc3cf730c']} 2024-03-17 09:45:01,259 - DEBUG - Received /user/folotoy/24dcc3cf730c/thing/command/callAck: message data: {'msgId': 1, 'identifier': 'updateconfig', 'result': 1} 2024-03-17 09:45:01,259 - DEBUG - Command call ack: True, topic_tokens: {'#': [], '+': ['24dcc3cf730c']} 2024-03-17 09:45:01,482 - DEBUG - Received /user/folotoy/24dcc3cf730c/thing/event/post: message data: {'msgId': 1, 'identifier': 'press_small_btn', 'outParams': {'keyCode': 1, 'changed': 1}} 2024-03-17 09:45:01,483 - DEBUG - Cannot find role config for sn=24dcc3cf730c, role=1 Exception in thread paho-mqtt-client-folotoy: Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/local/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4517, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 2291, in loop_forever rc = self._loop(timeout) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1680, in _loop rc = self.loop_read() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 2094, in loop_read rc = self._packet_read() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3137, in _packet_read rc = self._packet_handle() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3803, in _packet_handle return self._handle_publish() ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4140, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4496, in _handle_on_message on_message(self, self._userdata, message) File "core/folotoy_app.py", line 126, in core.folotoy_app.FolotoyApp.start.on_message File "core/folotoy_app.py", line 97, in core.folotoy_app.FolotoyApp.process_mqtt_message File "core/folotoy_msg_processor.py", line 169, in core.folotoy_msg_processor.FolotoyMsgProcessor.process_press_small_btn TypeError: 'NoneType' object is not iterable
roles.json 是否放在 config 目录之下了?
是的
文件名字错了,是 roles.json
恍然大悟,还是没文化水平不够 谢谢,解决了
EMQX已开启认证,但folotoyserver没有接入
roles.jason配置
docker-compose.yml配置