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

Initial Pull Request #1

Merged
merged 148 commits into from
Jul 16, 2019
Merged

Initial Pull Request #1

merged 148 commits into from
Jul 16, 2019

Conversation

brentru
Copy link
Member

@brentru brentru commented Jul 10, 2019

Initial pull request for MiniMQTT - a featured MQTT client for CircuitPython

This library is based off previous work performed by pfalcon on the uMQTT library (and the subsequent port to ESP32SPI by beachbc) and follows similar callback conventions and method signatures from the Eclipse Foundation's Paho.Mqtt.Python.

MiniMQTT API Overview

  • connect: initiates a connection with the mqtt broker

  • reconnect: handles reconnection to the mqtt broker and re-subscription to topics

  • last_will: Sets the client's optional last will and testament properties

  • publish: Publishes to a broker's mqtt topic. Handles data type conversions.

  • subscribe: Subscribes to a broker's mqtt topic. Can subscribe to one, or multiple topics with varying QoS levels.

  • unsubscribe: Unsubscribes from a broker's mqtt topic or multiple topics.

  • loop: Non-blocking messaging loop, useful for checking incoming subscription messages.

  • loop_forever: Blocking messaging loop

  • set_logger_level/log: Attaches/modifies a logger to the MiniMQTT client

brentru and others added 30 commits June 27, 2019 12:18
…lax on user-defined. set msg size lim to a constant
@brentru brentru requested a review from a team July 10, 2019 22:55
@abachman
Copy link

I notice there are a lot of normal commands that can result in errors being raised, specifically related to is_connected.

The examples should either use try: except: around every call or it might be worth figuring out a different way to address unexpected disconnection.

@brentru
Copy link
Member Author

brentru commented Jul 11, 2019 via email

@abachman
Copy link

Are you strongly attached to "MiniMQTT", or would "MQTT" be okay?

Also, is it possible to make the name of the repository the same as the name of the module?

Copy link
Member

@ladyada ladyada left a comment

Choose a reason for hiding this comment

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

chagne 'while 1' to 'while true:' and get rid of the const()'s

adafruit_minimqtt.py Outdated Show resolved Hide resolved
adafruit_minimqtt.py Outdated Show resolved Hide resolved
adafruit_minimqtt.py Outdated Show resolved Hide resolved
adafruit_minimqtt.py Outdated Show resolved Hide resolved
@brentru
Copy link
Member Author

brentru commented Jul 16, 2019

@abachman MQTT would not be OK as ReadTheDocs requires a non-generic slug url (i.e: https://readthedocs.org/projects/mqtt/ is already taken).

@ladyada
Copy link
Member

ladyada commented Jul 16, 2019

i think this is good for an initial version, and we'll see how it goes!

@brentru brentru merged commit fd26c93 into adafruit:master Jul 16, 2019
@tannewt
Copy link
Member

tannewt commented Jul 16, 2019

Shouldn't the readthedocs slug be adafruit-circuitpython-mqtt (or adafruit-circuitpython-minimqtt)? It's only as a circuitpython subproject that it's shortened to mqtt or minimqtt.

@brentru
Copy link
Member Author

brentru commented Jul 16, 2019

@tannewt Yep, just redid the RTD setup to use that slug. RTD badge on README is now green.

@tannewt
Copy link
Member

tannewt commented Jul 18, 2019

Perfect! Glad it helped.

rtwfroody pushed a commit to rtwfroody/Adafruit_CircuitPython_MiniMQTT that referenced this pull request Sep 18, 2022
FoamyGuy pushed a commit that referenced this pull request Oct 10, 2022
merging EAGAIN changes
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.

4 participants