Good day,
I'm using a Raspberry Pi 3B+ (USB, No SD card) with a MQTT broker to control the GPIO of that Raspberry by input from Home Assistant. It has been working great for multiple years except for the fact that when I make a change or cut off the power, I need to reinstall the whole Raspberry Pi. Yesterday I change the setup to wired connection instead of wireless connection which made 3 of the 5 raspberry pi's corrupt again and required a reinstall.
I have completed the installation (according to this link) many many times successfully but now I can't get it to work anymore. The supervisor is giving a problem but I can't figure out how to fix it:
pi@raspberrypi005:~ $ sudo supervisorctl update
pi_mqtt_gpio: added process group
pi@raspberrypi005:~ $ sudo supervisorctl status
pi_mqtt_gpio STARTING
pi@raspberrypi005:~ $ sudo supervisorctl status
pi_mqtt_gpio STARTING
pi@raspberrypi005:~ $ sudo tail /var/log/pi-mqtt-gpio.log
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pi/ve/lib/python3.9/site-packages/pi_mqtt_gpio/server.py", line 12
69, in <module>
main(args)
File "/home/pi/ve/lib/python3.9/site-packages/pi_mqtt_gpio/server.py", line 10
64, in main
client = init_mqtt(config["mqtt"], config["digital_outputs"], config["stream
_writes"])
File "/home/pi/ve/lib/python3.9/site-packages/pi_mqtt_gpio/server.py", line 41
0, in init_mqtt
client = mqtt.Client(client_id=client_id, clean_session=False, protocol=prot
ocal)
TypeError: __init__() missing 1 required positional argument: 'callback_api_vers
ion'
pi@raspberrypi005:~ $
The things I've already tried:
- Older version of Raspbian; Raspberry Pi Imager has been updatet.
- Different versions of Raspbian (32 Bit/64 bit)
- Different versions of Python; 3.7.3 was installed before but gives the same error at the moment. Used Pyenv to try another version but also gave the same error.
- Since two other raspberry pi's are still working, the problem is not within Home Assistant. No changes made there.
I think I tried 12 different times but I just ran out of ideas.
If there is any other information required, please let me know. Thanks!