-
Notifications
You must be signed in to change notification settings - Fork 8
Update interface to match MQTT client #27
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
Changes from 5 commits
d742b4b
b8a9ba5
0fe53e5
4ea8273
b7a55b6
e9565b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,7 @@ def message(client, topic, msg): | |
client = MQTT.MQTT( | ||
broker=secrets["broker"], | ||
client_id=secrets["client_id"], | ||
is_ssl=True, | ||
socket_pool=pool, | ||
ssl_context=ssl_context, | ||
) | ||
Comment on lines
141
to
147
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jersu11 can you make sure all 3 look the same way? The native one also as port in it (which really isn't needed). The closer these are, the easier for users just to swap it out for what they need client = MQTT.MQTT(
broker=secrets["broker"],
client_id=secrets["client_id"],
is_ssl=True,
socket_pool=pool,
ssl_context=ssl_context,
) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call out. I've updated the native example to match the MQTT client settings of the other examples. |
||
|
@@ -162,14 +163,14 @@ def message(client, topic, msg): | |
# Pump the message loop forever, all events | ||
# are handled in their callback handlers | ||
# while True: | ||
# aws_iot.loop() | ||
# aws_iot.loop(10) | ||
|
||
# Start a blocking message loop... | ||
# NOTE: NO code below this loop will execute | ||
# NOTE: Network reconnection is handled within this loop | ||
while True: | ||
try: | ||
aws_iot.loop() | ||
aws_iot.loop(10) | ||
except (ValueError, RuntimeError) as e: | ||
print("Failed to get data, retrying\n", e) | ||
wifi.reset() | ||
|
Uh oh!
There was an error while loading. Please reload this page.