Compare commits

...

4 Commits

Author SHA1 Message Date
github-actions
0fe903874f GitHub bot: changelog 2025-11-05 21:54:35 +00:00
Alexandre
6af0ef33b7 Update version to 2025.11.04 2025-11-05 22:26:05 +01:00
Alexandre
b71ab0fe1d Merge pull request #2165 from alexbelgium/codex/fix-issue-#2162-on-github
Fix BirdNET-Pi MQTT callback compatibility with paho 2.x
2025-11-05 22:25:38 +01:00
Alexandre
1b11a5a8dd Fix BirdNET-Pi MQTT callback for paho 2.x 2025-11-05 22:25:17 +01:00
3 changed files with 11 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
## 2025.11.04 (05-11-2025)
- Minor bugs fixed
## 2025.11.03 (04-11-2025)
- Minor bugs fixed
## 2025.11.02 (01-11-2025)

View File

@@ -113,5 +113,5 @@ tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi
usb: true
version: 2025.11.03
version: 2025.11.04
video: true

View File

@@ -113,7 +113,14 @@ def automatic_mqtt_publish(file, detection, path):
log.info("Posted to MQTT: ok")
mqttc = mqtt.Client("birdnet_mqtt", callback_api_version=4)
# Create MQTT client using legacy callback API when available for
# compatibility with paho-mqtt >= 2.0
callback_api = getattr(mqtt, "CallbackAPIVersion", None)
if callback_api is not None:
mqttc = mqtt.Client("birdnet_mqtt", callback_api_version=callback_api.VERSION1)
else:
mqttc = mqtt.Client("birdnet_mqtt")
mqttc.username_pw_set(mqtt_user, mqtt_pass)
mqttc.on_connect = on_connect