Dobrý den,
ano bcg spouštím přímo v rpi OS. Mosquitto MQTT spouštím jako kontejner vy publikovaný na standardní port 1883
netstat -antp | grep 1883
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 2121/docker-proxy
tcp6 0 0 :::1883 :::* LISTEN 2130/docker-proxy
Zkusil jsem se na MQTT připojit z jiného stroje a spojení je OK stejně jako jsem to zkusil lokálně z přímo z RpiOS
root@DietPi:~# mosquitto_pub -h 127.0.0.1 -m “test mess” -t neco/nekde -d
Client (null) sending CONNECT
Client (null) received CONNACK (0)
Client (null) sending PUBLISH (d0, q0, r0, m1, ‘neco/nekde’, … (9 bytes))
Client (null) sending DISCONNECT
root@DietPi:~# mosquitto_pub -h localhost -m “test mess” -t neco/nekde -d
Client (null) sending CONNECT
Client (null) received CONNACK (0)
Client (null) sending PUBLISH (d0, q0, r0, m1, ‘neco/nekde’, … (9 bytes))
Client (null) sending DISCONNECT
root@DietPi:~# mosquitto_pub -h 192.168.1.137 -m “test mess” -t neco/nekde -d
Client (null) sending CONNECT
Client (null) received CONNACK (0)
Client (null) sending PUBLISH (d0, q0, r0, m1, ‘neco/nekde’, … (9 bytes))
Client (null) sending DISCONNECT
pokud spustím bcg tak se do logu MQTT nic nezaloguje ( první 3 záznamy jsou předešlé lokální pokusy )
root@DietPi:/opt/mqtt/log# tail mosquitto.log
1709583981: New client connected from 192.168.1.11:39634 as mqtt-explorer-bbd60e19 (p2, c1, k60).
1709584409: New connection from 172.17.0.1:37058 on port 1883.
1709584409: New client connected from 172.17.0.1:37058 as auto-A31359C3-696D-FC9B-ADC7-DCFABEA71371 (p2, c1, k60).
1709584409: Client auto-A31359C3-696D-FC9B-ADC7-DCFABEA71371 disconnected.
1709584451: New connection from 172.17.0.1:57458 on port 1883.
1709584451: New client connected from 172.17.0.1:57458 as auto-77D77F27-E8A0-E4D5-542A-9DB2FA594E16 (p2, c1, k60).
1709584451: Client auto-77D77F27-E8A0-E4D5-542A-9DB2FA594E16 disconnected.
1709584460: New connection from 192.168.1.137:54136 on port 1883.
1709584460: New client connected from 192.168.1.137:54136 as auto-10F32893-EFDD-443D-BB51-1A31ED8F0F68 (p2, c1, k60).
1709584460: Client auto-10F32893-EFDD-443D-BB51-1A31ED8F0F68 disconnected.
root@DietPi:/opt/mqtt/log# /usr/bin/python3 /usr/local/bin/bcg --device /dev/bcUD0
Exception ignored in: <function Client.del at 0x7fff8d9c4fe0>
Traceback (most recent call last):
- File “/usr/local/lib/python3.11/dist-packages/paho/mqtt/client.py”, line 874, in del*
- self._reset_sockets()*
- File “/usr/local/lib/python3.11/dist-packages/paho/mqtt/client.py”, line 1133, in _reset_sockets*
- self._sock_close()*
- File “/usr/local/lib/python3.11/dist-packages/paho/mqtt/client.py”, line 1119, in _sock_close*
- if not self._sock:*
-
^^^^^^^^^^*
AttributeError: ‘Client’ object has no attribute ‘_sock’
2024-03-04 20:43:22,828 ERROR: Client.init() missing 1 required positional argument: ‘callback_api_version’
root@DietPi:/opt/mqtt/log# tail mosquitto.log
1709583981: New client connected from 192.168.1.11:39634 as mqtt-explorer-bbd60e19 (p2, c1, k60).
1709584409: New connection from 172.17.0.1:37058 on port 1883.
1709584409: New client connected from 172.17.0.1:37058 as auto-A31359C3-696D-FC9B-ADC7-DCFABEA71371 (p2, c1, k60).
1709584409: Client auto-A31359C3-696D-FC9B-ADC7-DCFABEA71371 disconnected.
1709584451: New connection from 172.17.0.1:57458 on port 1883.
1709584451: New client connected from 172.17.0.1:57458 as auto-77D77F27-E8A0-E4D5-542A-9DB2FA594E16 (p2, c1, k60).
1709584451: Client auto-77D77F27-E8A0-E4D5-542A-9DB2FA594E16 disconnected.
1709584460: New connection from 192.168.1.137:54136 on port 1883.
1709584460: New client connected from 192.168.1.137:54136 as auto-10F32893-EFDD-443D-BB51-1A31ED8F0F68 (p2, c1, k60).
1709584460: Client auto-10F32893-EFDD-443D-BB51-1A31ED8F0F68 disconnected.
Jak je vidět po spuštění bcg se další záznam nevytvořil
Děkuji
Viktor