adafruit / Adafruit_CircuitPython_AdafruitIO

Adafruit IO for CircuitPython
http://io.adafruit.com
MIT License
49 stars 33 forks source link

Update for settings.toml (CPY8) and SSL. #108

Closed tyeth closed 1 year ago

tyeth commented 1 year ago

Tested on Adafruit Feather ESP32-S2 Reverse TFT with CPY 8.2.4.

Paul Cutler raised an issue in discord about using SSL and miniMQTT with the IO library, and I realised I hadn't retested with SSL in circuitpython for a while especially since Root cert updates. The version Paul was using was 8.2.2 which has an SSL issue connecting to api.github.com so advised to update to latest CPY of 8.2.4 to get up to date root certs.

This brings the demo for the esp32s2 up to scratch, working with secrets.py or settings.toml, and optionally connecting to wifi. The port is also changed and is_ssl=True to enable SSL.

github-actions[bot] commented 1 year ago

👋 Thanks for this pull request! Unfortunately, it looks like the automated continuous integration (CI) test(s) failed. These can be tricky to fix so we've written a guide on how to fix them locally. It has pages about running pre-commit locally and another about building the docs locally with sphinx. Thanks for contributing to CircuitPython! If you have more questions, feel free to join the Adafruit Discord and post in #circuitpython-dev.

tyeth commented 1 year ago

@brentru This relates to #99

brentru commented 1 year ago

@prcutler Could you test if this fixes https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/issues/107?

tyeth commented 1 year ago

Just to add the root certs in CPY 8.2.4 still fail with API.github.com but Dan will cut a new release with updated root certs this week (8.2.5) There's an open issue in the Adafruit nina-fw repo

prcutler commented 1 year ago

I will test this, but probably not until tomorrow (sorry!). Tyeth was able to help get me working code to use io.connect() but I will try the simpletest out. Thanks for the quick responses!

luke-edward commented 9 months ago

prcutler

How were you able to get io.connect() working?

prcutler commented 9 months ago

Looking at my code, it looks like I used normal MQTT and not io.connect. It looks like the original issue was due to a root certificate problem, it should work on 8.2.9 or later.