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

Doesn't receive (onMessage callback) retained Message after subscription #286

Open
tobiasjaster opened this issue May 29, 2022 · 2 comments

Comments

@tobiasjaster
Copy link

I am trying to handle short mqtt connections between long (60s) deep sleep sessions.

Sequence:

Start
WiFi connect, wait connected
Mqtt set callbacks
Mqtt connect, wait connected
Get variables from ulp and publish
Disconnect mqtt & wifi
Start Deep Sleep

Before mqtt connect I subscribe to an update-request. After connection I would like to handle incoming retained topic, but never receive anything.

Anyone getting retained Message working?

@bertmelis
Copy link
Contributor

You can only subscribe/publish/unsubscribe when connected.

@tobiasjaster
Copy link
Author

Doesn't get the topics retained message, if I subscribe after WiFi und mqtt connected

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

No branches or pull requests

2 participants