MicroPython on ESP32 - can't install adafruit-io library

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
karltbraun
 
Posts: 13
Joined: Tue Dec 07, 2021 4:48 pm

MicroPython on ESP32 - can't install adafruit-io library

Post by karltbraun »

Command: upip.install('adafruit-io')
Result: ... "Error installing 'requests': , packages may be partially installed.

I get the feeling I might be running out of memory, but this is after a fresh flash. Any ideas what's going on?

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: MicroPython on ESP32 - can't install adafruit-io library

Post by brubell »

Not entirely sure as the Adafruit IO Python + CircuitPython library is unsupported for MicroPython. We have official CPython and a CircuitPython library support for Adafruit.io, not micropython. You may have better luck running the Micropython uMQTT client along with the MQTT API for IO if there is no official library https://io.adafruit.com/api/docs/mqtt.h ... o-mqtt-api

User avatar
karltbraun
 
Posts: 13
Joined: Tue Dec 07, 2021 4:48 pm

Re: MicroPython on ESP32 - can't install adafruit-io library

Post by karltbraun »

Thanks for the reply. If I'm understanding you, I can take the MQTT setup I had working with my own on-prem broker (umqttsimple library) and configure it to talk to the Adafruit IO broker?

User avatar
karltbraun
 
Posts: 13
Joined: Tue Dec 07, 2021 4:48 pm

Re: MicroPython on ESP32 - can't install adafruit-io library

Post by karltbraun »

I've since come discover that you can use the umqtt.simple library to connect to the Adafruit IO setup. You will of course need to connect with a username and password (which will be the account key), and your topic needs to be in a format which maps to the MQTT key for your feed.

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: MicroPython on ESP32 - can't install adafruit-io library

Post by brubell »

karltbraun wrote:I've since come discover that you can use the umqtt.simple library to connect to the Adafruit IO setup. You will of course need to connect with a username and password (which will be the account key), and your topic needs to be in a format which maps to the MQTT key for your feed.
Correct - the "Adafruit IO" client libraries provide the correct topic/feed mapping along with other helper functions.

Topic formatting is discussed in the Adafruit IO MQTT API documentation: https://io.adafruit.com/api/docs/mqtt.html#mqtt-topics

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”