-
Notifications
You must be signed in to change notification settings - Fork 51
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
Conversation
… off of subscription topic
…lt and a custom callback
…lax on user-defined. set msg size lim to a constant
…th a float instead of int
…efactor adafruitiowifi example
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 |
A method of addressing this unexpected disconnection might be passing each
command method (publish, subscribe) to a high level method which checks the
connection status and handles hardware and network reconnections.
Though this does add overhead - it might be nicer than wrapping each
publish/subscribe call in a try/except loop?
…On Thu, Jul 11, 2019 at 5:34 PM Adam Bachman ***@***.***> wrote:
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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AACOW7BUQQOKVNFB4IWP74DP66RNNA5CNFSM4IAAMC3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZYBPTQ#issuecomment-510662606>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACOW7A7SNJVOX5NCPASQCDP66RNNANCNFSM4IAAMC3A>
.
|
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? |
There was a problem hiding this 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
@abachman MQTT would not be OK as ReadTheDocs requires a non-generic slug url (i.e: https://readthedocs.org/projects/mqtt/ is already taken). |
i think this is good for an initial version, and we'll see how it goes! |
Shouldn't the readthedocs slug be |
@tannewt Yep, just redid the RTD setup to use that slug. RTD badge on README is now green. |
Perfect! Glad it helped. |
Initial Pull Request
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 brokerreconnect
: handles reconnection to the mqtt broker and re-subscription to topicslast_will
: Sets the client's optional last will and testament propertiespublish
: 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 loopset_logger_level
/log
: Attaches/modifies a logger to the MiniMQTT client