Skip to content

add MQTT handler example #45

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

Merged
merged 7 commits into from
Dec 20, 2022
Merged

Conversation

vladak
Copy link
Contributor

@vladak vladak commented Dec 13, 2022

As suggested in #44, I'd like to add an example on how to use MQTT handler along with Stream handler.

The MQTT handler class is made with microcontrollers in mind, where there is very limited number of sockets. So, the MQTTHandler init function accepts a MQTT client object that should be already connected to MQTT broker - it is assumed that the MQTT connection will be used both for logging as well as for publishing data messages. Also, this avoids dealing with argument passing between the init functions.

@tannewt tannewt requested a review from FoamyGuy December 15, 2022 17:16
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks for submitting this @vladak!

I have some initial feedback about example filenames. I'll try this out on a device later today and follow up here with findings from testing.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks again @vladak!

@FoamyGuy FoamyGuy merged commit 01f33e9 into adafruit:main Dec 20, 2022
@vladak vladak deleted the mqtt_handler_example branch December 20, 2022 22:35
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 21, 2022
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