Skip to content

MQTT plugin: schedule events thread-safely from paho callbacks - #2679

Merged
acockburn merged 1 commit into
AppDaemon:devfrom
alien43:mqtt-threadsafe-events
Nov 4, 2026
Merged

acockburn merged 1 commit into
AppDaemon:devfrom
alien43:mqtt-threadsafe-events

Conversation

@alien43

@alien43 alien43 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Paho runs on_connect/on_disconnect/on_message on its network thread. loop.create_task() from there doesn't wake the loop, so events waited for the next unrelated wakeup (up to ~1 s). Use run_coroutine_threadsafe.

Paho runs on_connect/on_disconnect/on_message on its network thread.
loop.create_task() from there doesn't wake the loop, so events waited
for the next unrelated wakeup (up to ~1 s). Use run_coroutine_threadsafe.
@acockburn
acockburn merged commit 5c8b74c into AppDaemon:dev Nov 4, 2026
8 checks passed
@alien43
alien43 deleted the mqtt-threadsafe-events branch November 4, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants