Hi again @nxd4n
I try your last version of stibgtfs2mqtt but I get this error:
root@odroidhc4:~/stibgtfs2mqtt-main/mqttsensor# python3 sensor.py
{'71': {'pointid': '3520', 'lineid': '71', 'passingtimes': [{'destination': {'fr': 'DE BROUCKERE', 'nl': 'DE BROUCKERE'}, 'expectedArrivalTime': '2024-05-03T17:52:00+02:00', 'lineId': '71'}, {'destination': {'fr': 'DE BROUCKERE', 'nl': 'DE BROUCKERE'}, 'expectedArrivalTime': '2024-05-03T17:57:00+02:00', 'lineId': '71'}]}}
{'5': {'pointid': '8232', 'lineid': '5', 'passingtimes': [{'destination': {'fr': 'HERRMANN-DEBROUX', 'nl': 'HERRMANN-DEBROUX'}, 'expectedArrivalTime': '2024-05-03T17:54:00+02:00', 'lineId': '5'}, {'destination': {'fr': 'HERRMANN-DEBROUX', 'nl': 'HERRMANN-DEBROUX'}, 'expectedArrivalTime': '2024-05-03T17:58:00+02:00', 'lineId': '5'}]}}
{'72': {'pointid': '3546', 'lineid': '72', 'passingtimes': [{'destination': {'fr': 'ADEPS', 'nl': 'ADEPS'}, 'expectedArrivalTime': '2024-05-03T18:41:00+02:00', 'lineId': '72'}, {'expectedArrivalTime': '2024-05-03T17:52:00+02:00', 'lineId': '72'}]}}
{'72': {'pointid': '3556', 'lineid': '72', 'passingtimes': [{'destination': {'fr': 'ULB', 'nl': 'ULB'}, 'expectedArrivalTime': '2024-05-03T18:16:00+02:00', 'lineId': '72'}, {'expectedArrivalTime': '2024-05-03T17:52:00+02:00', 'lineId': '72'}]}, '71': {'pointid': '3556', 'lineid': '71', 'passingtimes': [{'destination': {'fr': 'DE BROUCKERE', 'nl': 'DE BROUCKERE'}, 'expectedArrivalTime': '2024-05-03T17:55:00+02:00', 'lineId': '71'}, {'destination': {'fr': 'DE BROUCKERE', 'nl': 'DE BROUCKERE'}, 'expectedArrivalTime': '2024-05-03T18:00:00+02:00', 'lineId': '71'}]}}
{'5': {'pointid': '8231', 'lineid': '5', 'passingtimes': [{'destination': {'fr': 'ERASME', 'nl': 'ERASMUS'}, 'expectedArrivalTime': '2024-05-03T17:52:00+02:00', 'lineId': '5'}, {'destination': {'fr': 'ERASME', 'nl': 'ERASMUS'}, 'expectedArrivalTime': '2024-05-03T17:58:00+02:00', 'lineId': '5'}]}}
Retrieving STIB-MIVB realtime data
{"line_ids": ["72", "5", "71"], "waiting_times": {"3556": {"72": {"pointid": "3556", "lineid": "72", "passingtimes": [{"destination": {"fr": "ULB", "nl": "ULB"}, "expectedArrivalTime": "2024-05-03T18:16:00+02:00", "lineId": "72"}, {"expectedArrivalTime": "2024-05-03T17:52:00+02:00", "lineId": "72"}]}, "71": {"pointid": "3556", "lineid": "71", "passingtimes": [{"destination": {"fr": "DE BROUCKERE", "nl": "DE BROUCKERE"}, "expectedArrivalTime": "2024-05-03T17:55:00+02:00", "lineId": "71"}, {"destination": {"fr": "DE BROUCKERE", "nl": "DE BROUCKERE"}, "expectedArrivalTime": "2024-05-03T18:00:00+02:00", "lineId": "71"}]}}, "3546": {"72": {"pointid": "3546", "lineid": "72", "passingtimes": [{"destination": {"fr": "ADEPS", "nl": "ADEPS"}, "expectedArrivalTime": "2024-05-03T18:41:00+02:00", "lineId": "72"}, {"expectedArrivalTime": "2024-05-03T17:52:00+02:00", "lineId": "72"}]}}, "8231": {"5": {"pointid": "8231", "lineid": "5", "passingtimes": [{"destination": {"fr": "ERASME", "nl": "ERASMUS"}, "expectedArrivalTime": "2024-05-03T17:52:00+02:00", "lineId": "5"}, {"destination": {"fr": "ERASME", "nl": "ERASMUS"}, "expectedArrivalTime": "2024-05-03T17:58:00+02:00", "lineId": "5"}]}}, "3520": {"71": {"pointid": "3520", "lineid": "71", "passingtimes": [{"destination": {"fr": "DE BROUCKERE", "nl": "DE BROUCKERE"}, "expectedArrivalTime": "2024-05-03T17:52:00+02:00", "lineId": "71"}, {"destination": {"fr": "DE BROUCKERE", "nl": "DE BROUCKERE"}, "expectedArrivalTime": "2024-05-03T17:57:00+02:00", "lineId": "71"}]}}, "8232": {"5": {"pointid": "8232", "lineid": "5", "passingtimes": [{"destination": {"fr": "HERRMANN-DEBROUX", "nl": "HERRMANN-DEBROUX"}, "expectedArrivalTime": "2024-05-03T17:54:00+02:00", "lineId": "5"}, {"destination": {"fr": "HERRMANN-DEBROUX", "nl": "HERRMANN-DEBROUX"}, "expectedArrivalTime": "2024-05-03T17:58:00+02:00", "lineId": "5"}]}}}}
Traceback (most recent call last):
File "/root/stibgtfs2mqtt-main/mqttsensor/sensor.py", line 380, in <module>
init(clean)
File "/root/stibgtfs2mqtt-main/mqttsensor/sensor.py", line 257, in init
setConfig(attribute)
File "/root/stibgtfs2mqtt-main/mqttsensor/sensor.py", line 333, in setConfig
mqttSend(c,topic,True)
File "/root/stibgtfs2mqtt-main/mqttsensor/sensor.py", line 361, in mqttSend
client = connect_mqtt()
File "/root/stibgtfs2mqtt-main/mqttsensor/sensor.py", line 357, in connect_mqtt
client.connect(mqtt_server, int(mqtt_port))
File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 914, in connect
return self.reconnect()
File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1044, in reconnect
sock = self._create_socket_connection()
File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
File "/usr/lib/python3.9/socket.py", line 843, in create_connection
raise err
File "/usr/lib/python3.9/socket.py", line 831, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
It works now, I was using a wrong mqtt_server adress