Skip to content

Micropython library notes

Alex Hanson edited this page Jan 19, 2019 · 6 revisions

umqtt

The general installation instructions[1] (if the firmware doesn't come with it) are:

>>>import upip
>>>upip.install('micropython-umqtt.simple')
>>>upip.install('micropython-umqtt.robust')
>>>from umqtt.simple import MQTTClient  # verify install

Use mobaxterm or similar.

Sometimes the umqtt.simple module is empty! To fix this, download it and copy to the device as follows[2]:

  1. https://github.com/micropython/micropython-lib/blob/master/umqtt.simple/umqtt/simple.py
  2. Copy file to lib/umqtt/simple.py. See lake_esp32_upload_instructions for general instructions.
  3. Reboot and verify with from umqtt.simple import MQTTClient

Clone this wiki locally