Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when sending notification to mqtt broker #1117

Closed
Alulu2401 opened this issue Apr 24, 2024 · 5 comments
Closed

Issue when sending notification to mqtt broker #1117

Alulu2401 opened this issue Apr 24, 2024 · 5 comments
Labels

Comments

@Alulu2401
Copy link

Alulu2401 commented Apr 24, 2024

hello all,

i'm having little troubles to send notification on mqtt broker. logs are showing that url is not parseable but i'm following url formating like mentionned in MQTT part. Did someone already uncounter this behaviour ?

apprise -vvv -b "whatever-payload-want" "mqtt://mqtt_user:"password"@10.43.35.1:1883/notif"
2024-04-24 10:16:47,870 - DEBUG - Language set to en
2024-04-24 10:16:47,982 - DEBUG - Notification Plugin 104(s) and 148 Schema(s) loaded in 0.1111s
2024-04-24 10:16:47,983 - ERROR - Unparseable MQTT Notification URL mqtt://mqtt_user:"password"@10.43.35.1:1883/notif
2024-04-24 10:16:47,983 - ERROR - There are no service(s) to notify

Broker is used by other selfhosted services without any troubles. I'm not using TLS or other securities than user/password because it is a private isolated network.

if i remove user/password part, things seems to works but rejected by my broker (which i guess is logical :D )

apprise -vvv -b "whatever-payload-want" "mqtt://10.43.35.1:1883/notif"
2024-04-24 10:32:15,062 - DEBUG - Language set to en
2024-04-24 10:32:15,170 - DEBUG - Notification Plugin 104(s) and 148 Schema(s) loaded in 0.1071s
2024-04-24 10:32:15,171 - DEBUG - Loaded MQTT Notification URL: mqtt://10.43.35.1/notif?version=v3.1.1&qos=0&session=no&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes
2024-04-24 10:32:15,183 - DEBUG - MQTT POST URL: 10.43.35.1:1883/notif (cert_verify=True)
2024-04-24 10:32:15,184 - DEBUG - MQTT Payload: whatever-payload-want
2024-04-24 10:32:15,184 - DEBUG - Blocking until MQTT payload is published...
2024-04-24 10:32:19,189 - WARNING - The MQTT message could not be delivered

It must be missing something but can't figure it out. Any kind of help will be greatly appreciated :)

Regards :)

@caronc
Copy link
Owner

caronc commented Apr 24, 2024

Its likely because you're using paho-mqtt v2.0. The developer did not make it backwards compatible with v1.x

Try installing paho-mqtt v1.6.1.

@Alulu2401
Copy link
Author

Thx for your reply.

Quite strange : "Requirement already satisfied: paho-mqtt==1.6.1"

My bad, i forgot to say that i'm using apprise through changedetection (changedetection.io) application maybe it's important, sorry

@dgtlmoon
Copy link
Contributor

@caronc thanks, you are correct again :)

paho-mqtt < 2.0.0

our application does not specificaly tell to use atleat 1.6.1 , i'm also not confident that @Alulu2401 is reporting about his local system or the application container or what

thanks again

@dgtlmoon
Copy link
Contributor

@caronc i think you can close this, thanks :)

@caronc
Copy link
Owner

caronc commented Apr 24, 2024

Sounds good. I'll try to add v2 support soon

@caronc caronc closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants