Skip to content

Implement network callbacks for Feed Subscribe/Unsubscribe #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

Merged
merged 1 commit into from
Oct 8, 2019

Conversation

brentru
Copy link
Member

@brentru brentru commented Aug 28, 2019

Fixes #25

  • _on_subscribe_mqtt and _on_unsubscribe_mqtt added to Adafruit IO's MQTT_API
  • Subscribing and unsubscribing to/from feeds will now correctly execute user-defined callback methods in user-code
  • MQTT Simpletest example updated for subscribe and unsubscribe.

Code Test Result:

  • subscribed to feed -> subscribe() from code.py called
  • unsubscribed from feed -> unsubscribe() from code.py called
  • Publishing to feed does not change feed value, or call message() from code.
code.py output:
Connected to Adafruit IO!  Listening for DemoFeed changes...
Subscribed to brubell/feeds/DemoFeed with QOS level 0
Unsubscribed from brubell/feeds/DemoFeed with PID 2
Publishing a new message every 10 seconds...
Publishing 73 to DemoFeed.
Publishing 75 to DemoFeed.

@brentru brentru added the bug Something isn't working label Aug 28, 2019
@brentru brentru requested a review from a team August 28, 2019 15:57
@brentru brentru merged commit 5431e6c into adafruit:master Oct 8, 2019
@brentru brentru deleted the callbacks-for-sub-unsub branch October 8, 2019 20:16
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 9, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.0.0 from 2.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#77 from brentru/add-certificate-handlers

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx to 1.1.1 from 1.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP3xxx#16 from magnusvmt/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO to 2.1.0 from 2.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_AdafruitIO#21 from brentru/close-responses
  > Merge pull request adafruit/Adafruit_CircuitPython_AdafruitIO#27 from brentru/callbacks-for-sub-unsub

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 1.1.5 from 1.1.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#9 from brentru/cert-example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Callbacks for subscribe and unsubscribe are not initialized
1 participant