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
Show file tree
Hide file tree
Changes from 147 commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
76c2839
cookiecutter init!
Jun 27, 2019
6863435
add init, starting connect...
Jun 27, 2019
775adff
connects to IO mqtt broker via socket, still need to remove passing t…
Jun 27, 2019
ea99dbf
connects to Adafruit IO with MQTTS
Jun 27, 2019
ed2b12b
generate a client identifier, add control flow for is_ssl boolean
Jun 27, 2019
6f3a57a
generate a client_id based on cpu UUID
Jun 27, 2019
e14df6d
add subscribe() method
Jun 27, 2019
789bf81
add a reconnect method
Jun 27, 2019
51ed0ae
tie the reconnect into the code, hard reset the esp if it doesnt connect
Jun 27, 2019
0d25d3f
publish method works
Jun 27, 2019
9dafe23
add pubsub example
Jun 27, 2019
af70eb4
add a default callback method and set_callback
Jun 27, 2019
e296f11
add naive impl. of associating callback methods with subscription topics
Jun 27, 2019
e5fa86b
start working towards custom callback method dictionary mapping based…
Jun 28, 2019
4da85f7
tested default internal callback method, todo: test dict with a defau…
Jun 28, 2019
1642c59
add better error handling defs
Jun 28, 2019
d29982c
add checks for invalid QOS, message length
Jun 28, 2019
fe1d98f
add msg size limits, topic size limits, setter/getter for size limits
Jun 28, 2019
e4db740
add checks to mqtt publish for topic, message, and quos. add type con…
Jun 28, 2019
ef9ab3c
refactoring and fix publish message type conversions
Jun 28, 2019
054f613
add updated example
Jun 28, 2019
21db5ca
enforce some of the mqtt client_id spec, check hardware objects befor…
Jul 1, 2019
30b4a5f
drop wifimanager dependency, favor esp32spi
Jul 1, 2019
a967eb9
only enforce alpanumeric/byte clientid limit on generated client id, …
Jul 1, 2019
3db4911
wait_for_message checks timeout value, allow more precise timeouts wi…
Jul 1, 2019
6dc0dd8
add check on disconnect() for an empty socket before dc'ing
Jul 1, 2019
e7f9c28
publish matches mqtt spec
Jul 1, 2019
8c372d6
fix broken subscribe, _send_str already encodes the topic per spec.
Jul 1, 2019
5386cd3
client_id is already encoded in connect, dont encode twice
Jul 1, 2019
0833fa1
topic string should not be encoded twice, redundant code
Jul 1, 2019
af3cce8
add last_will method to allow user-defined LWT, incorp. into init. ad…
Jul 1, 2019
6a0d96e
start work on unsubscribe
Jul 1, 2019
91648c4
pop topic from method handler dictionary on unsubscribe. handle publi…
Jul 1, 2019
07a349c
added inline docstring examples to subscription method
Jul 1, 2019
1efb73f
Add publish_multiple method - publish to multiple topics at once!
Jul 1, 2019
9081744
add subscribe_multiple - not working yet! - subscribes to multiple br…
Jul 1, 2019
6251536
check for is_connected before will is set
Jul 2, 2019
c9051fd
minimqttexception -> mmqtexception
Jul 2, 2019
155c679
check if topic is already subscribed to before subscribing
Jul 2, 2019
c6250f5
associate return codes with their description
Jul 2, 2019
f744599
removal of puback error codes, mqtt error handling in favor of cleane…
Jul 2, 2019
5a3b4af
ping method checks against pingresp, returns if true. raises if false
Jul 2, 2019
1fe9cda
start sketching on on_connect for paho-style ack callbacks
Jul 2, 2019
e954938
working on_connect callback, add a user_data property and setter to c…
Jul 2, 2019
f059558
add on_disconnect, check for a previously defined on_ack before calli…
Jul 2, 2019
516db8d
added on_subscribe getter/setter and handling code to subscribe method
Jul 2, 2019
d40288c
fix disconnect callback, publish not working
Jul 2, 2019
5dff2ff
add working publish for callbacks when qos = 0
Jul 2, 2019
3d44461
add network loop methods, untested as of now
Jul 2, 2019
13010a4
add larger example from pyportal
Jul 2, 2019
9acb8e1
fix CONNACK on_connect response codes
Jul 3, 2019
67b4d75
add unsub...broken response
Jul 3, 2019
1316214
increase timeout of wait_for_msg
Jul 3, 2019
51d0b7b
add working unsubscribe method, need stricter checking on the UNPUBACK
Jul 3, 2019
f27e7e5
handle unsuback better with a variable socket timeout
Jul 3, 2019
fba332c
add on_unsubscribe ack handler
Jul 3, 2019
9b0635b
correct method handler call
Jul 3, 2019
c2c4f9c
remove @setter/@getter callbacks, make on_ methods public to usercode
Jul 3, 2019
ef74dfb
add prelimary support for logging
Jul 3, 2019
7aa160b
fix logging, success from logger publish
Jul 3, 2019
345f8f1
fix ping's handling of PINGRESP
Jul 5, 2019
00756c9
add logger debug statements, reduce reused variables in wait_for_msg
Jul 5, 2019
28ebc6b
starting mqtt test client
Jul 5, 2019
eaaebb9
add test harness and additional tests
Jul 5, 2019
ffd87eb
consolidate some tests, fixup bugs
Jul 5, 2019
acae093
create a logger by default, pass client information to the user-defin…
Jul 5, 2019
ebff8e4
docstring the strict method handler signature
Jul 5, 2019
f17f74f
remove topic-based callbacks in favor of default user-defined callbac…
Jul 5, 2019
8b864e3
fix PUBLISH log statement
Jul 5, 2019
d36b716
add callback to on_message within wait_for_msg, handle encoding the m…
Jul 5, 2019
2f7a4d5
update pubsub test for on_message
Jul 5, 2019
af8e094
topic-based resub, add a subscribed_topics list to track topics
Jul 5, 2019
5ced62c
multiple send start work
Jul 5, 2019
0668f10
adding new subscription code, broken down
Jul 5, 2019
ef151e7
working single subscription
Jul 5, 2019
30a497a
subscriptions to multiple topics work!
Jul 5, 2019
599a70f
add comments
Jul 5, 2019
951443c
accept tuple into subscribe method signature
Jul 8, 2019
e9c07d7
log subscriptions to multiple topics
Jul 8, 2019
8db7be2
extend docstring for subscribe
Jul 8, 2019
972f995
allow multiple UNSUBSCRIBE topics, add back subscribed_topics list to…
Jul 8, 2019
41bc399
refactor is_connected method, use it as a universal check before netw…
Jul 8, 2019
66c460c
add on_publish cb for qos of 2, assert
Jul 8, 2019
5b7da5e
stricter esp32spi check for attributes in the init
Jul 8, 2019
93ca083
redo init to be flexible enough for future network interfaces, fix ho…
Jul 8, 2019
5a16869
re-enable log boolean, check if the logger handler has been attached …
Jul 8, 2019
db8f254
drop multiple publishing, not defined within spec. drop esp-related a…
Jul 8, 2019
3a3f9d5
add create_logger method for creating a new logger, post-initialization
Jul 8, 2019
eb30162
add a AMQTT-like example for publishing/subscribing with AIO
Jul 8, 2019
d85dc6a
pylinting and fixing bugs
Jul 8, 2019
1e70f9b
pass pylint
Jul 8, 2019
6413e9f
fix ping() method, pingreq is TWO bytes not one
Jul 8, 2019
e914e28
add working AMQTT library example
Jul 8, 2019
88e000d
fix SSL port instanciation
Jul 8, 2019
508f035
check if a logger exists before calling it within publish
Jul 8, 2019
e332074
restructure test framework
Jul 8, 2019
21b74de
add wildcard publish test
Jul 8, 2019
f7c6d55
enforce topic name and filter limit on unsubscribe
Jul 8, 2019
c817477
define a method to allow post-initialization attachment of a loger ob…
Jul 8, 2019
7181ed4
add a valid check for UNSUBACK, wasnt explicitly checking the fixed h…
Jul 8, 2019
a4027f2
add a generic topic check private method
Jul 8, 2019
70c9e8e
strict topic check added
Jul 8, 2019
7f17ff5
strict length check on password
Jul 9, 2019
c027039
rewrite of unsubscribe with strict return code handling to conform wi…
Jul 9, 2019
47f2ce9
add to docstring...
Jul 9, 2019
3461736
add _check_qos
Jul 9, 2019
a6b387e
handle unsuback correctly
Jul 9, 2019
612ab3f
update hardware test to allow a settings python dict file for configu…
Jul 9, 2019
e4ccdb5
fix import order
Jul 9, 2019
623148e
fix password encoding issue
Jul 9, 2019
2d40156
switching server_Address to server
Jul 9, 2019
6ae098a
pass topic along with granted QOs to on_subscribe
Jul 9, 2019
16e0917
server/broker
Jul 9, 2019
0a20d6b
add minimqtt with replicatable unsuback issue
Jul 9, 2019
8f69940
add a method for setting network interface hardware, useful for later…
Jul 10, 2019
f5f65b6
rewrite of reconnect
Jul 10, 2019
7df2b9f
allow IP addresses along with URLs
Jul 10, 2019
3ac6772
lint
Jul 10, 2019
69d36ba
only log when a logger is provided
Jul 10, 2019
7981e9e
add generalized example code with support for AIO or MQTT brokers
Jul 10, 2019
c45c209
nicer code example for AIO
Jul 10, 2019
5c45ec3
nicer code for simpletest
Jul 10, 2019
1fa7835
fixup example
Jul 10, 2019
ddf3e10
fix some pylint defs
Jul 10, 2019
8a35e0a
update README.md
Jul 10, 2019
6405286
add logger to requirements
Jul 10, 2019
f93feae
remove variable timeout, blocking read on wait_for_msg by default
Jul 10, 2019
4c7fc28
add a long variable timeout to catch brokers like io forcefully disco…
Jul 10, 2019
1df31d4
enable and add mock_imports to satisfy sphinx
Jul 10, 2019
89680cc
add logging since it's not in pypi..
Jul 10, 2019
d2662ae
linting
Jul 10, 2019
c9d6b8d
add non-blocking check for message
Jul 10, 2019
a799f54
add non-blocking and blocking control loops, make wait_for_msg a priv…
Jul 10, 2019
1be4557
add two new examples showing blocking vs nonblocking message loops, r…
Jul 10, 2019
b0a4e53
update examples
Jul 10, 2019
0587b66
lint!
Jul 10, 2019
268210e
fix docstring
Jul 10, 2019
600e336
add docstring for class-level?
Jul 10, 2019
ec20990
add more docstrings
Jul 10, 2019
4e3456c
add blank lines
Jul 10, 2019
1177631
pylint!!!
Jul 10, 2019
e7ed0fa
esp32spi -> networkmanager object instead
Jul 11, 2019
6d928e4
drop esp32spi object in favor of wifimanager, update all examples
Jul 11, 2019
4cade94
add a wait_for_msg call to catch any async publish before pingresp
Jul 11, 2019
5c15d23
check for a PUBLISH before a CONNACK
Jul 11, 2019
07102d8
fix out of bytestring error
Jul 11, 2019
ceb26b6
fix pylint errors
Jul 11, 2019
1ae11a8
changes per @ladyada's review
Jul 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.mpy
.idea
__pycache__
_build
*.pyc
.env
build*
bundles
*.DS_Store
.eggs
dist
**/*.egg-info
Loading