richibrics / IoTuring

Your Windows, Linux, macOS computer as MQTT and HomeAssistant integration
https://pypi.org/project/IoTuring/
GNU General Public License v3.0
78 stars 6 forks source link

"Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.rst for details" #127

Open mido1978 opened 1 week ago

mido1978 commented 1 week ago

Hi, just tried to start IoTuring on Raspberry Pi in connection with HomeAssistant. I installed all new with pipx command according to your documentation. Setup the warehouse with HomeAssistant as also MQTT ends in the following error:

==================================================== `1 - Manage entities 2 - Manage warehouses C - Start IoTuring H - Help Q - Quit

Select your choice: C

[ 2024-10-21 14:45:54 | Message | ConfiguratorIO ] Saved "/home/pi/.config/IoTuring/configurations.json" [ 2024-10-21 14:45:54 | Info | App ] Name: IoTuring [ 2024-10-21 14:45:54 | Info | App ] Version: 2023.11.1 [ 2024-10-21 14:45:54 | Info | App ] Description: Simple and powerful cross-platform script to control your pc and share statistics using communication protocols like MQTT and home control hubs like HomeAssistant. [ 2024-10-21 14:45:54 | Info | Configurator ] Run the script with -c to enter configuration mode [ 2024-10-21 14:45:54 | Info | Entity.AppInfo ] Initialization successfully completed [ 2024-10-21 14:45:54 | Info | Entity.Temperature ] Initialization successfully completed [ 2024-10-21 14:45:54 | Info | Entity.Hostname ] Initialization successfully completed [ 2024-10-21 14:45:54 | Info | Entity.Power ] Initialization successfully completed [ 2024-10-21 14:45:54 | Info | Entity.Disk ] Initialization successfully completed [ 2024-10-21 14:45:54 | Info | Entity.Cpu ] Initialization successfully completed [ 2024-10-21 14:45:54 | Info | Entity.Ram ] Initialization successfully completed [ 2024-10-21 14:45:54 | Error | Entity.Monitor ] Initialization interrupted due to an error: [ 2024-10-21 14:45:54 | Error | Entity.Monitor ] Xset not supported: xset command not found! [ 2024-10-21 14:45:54 | Info | EntityManager ] Entity.Monitor unloaded [ 2024-10-21 14:45:54 | Info | MQTT ] Preparing MQTT client Traceback (most recent call last): File "/home/pi/.local/bin/IoTuring", line 8, in sys.exit(loop()) File "/home/pi/.local/pipx/venvs/IoTuring/lib/python3.7/site-packages/IoTuring/init.py", line 52, in loop warehouse.Start() File "/home/pi/.local/pipx/venvs/IoTuring/lib/python3.7/site-packages/IoTuring/ClassManager/../Warehouse/Deployments/MQTTWarehouse/MQTTWarehouse.py", line 37, in Start self.GetFromConfigurations(CONFIG_KEY_PASSWORD)) File "/home/pi/.local/pipx/venvs/IoTuring/lib/python3.7/site-packages/IoTuring/Protocols/MQTTClient/MQTTClient.py", line 38, in init self.SetupClient() File "/home/pi/.local/pipx/venvs/IoTuring/lib/python3.7/site-packages/IoTuring/Protocols/MQTTClient/MQTTClient.py", line 45, in SetupClient self.client = MqttClient.Client(self.name) File "/home/pi/.local/pipx/venvs/IoTuring/lib/python3.7/site-packages/paho/mqtt/client.py", line 773, in init "Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.rst for details" ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.rst for details`

Some research brought me to this: https://github.com/eclipse/paho.mqtt.python/blob/master/docs/migrations.rst. Is it connected? Maybe my Paho-MQTT Version is too new?

Thanks in advance for a hint or help.

infeeeee commented 6 days ago

You are using version 2023.11.1, this was fixed in the latest 2024.6.1 version.

Reinstalling should upgrade, so run pipx install IoTuring again.