External libraries

asyncio primitives

To get you startet the ESP8266 firmware has asyncio primitives from Peter Hinch included

uasyncio, uasyncio.core, mqtt_as.py and asyn.py are requiered for Microhomie.


switch.py asyncio switch class

class primitives.switch.Switch(pin)

Simple debounced switch class for normally open grounded switch.


pushbutton.py asyncio pushbutton class

class primitives.pushbutton.Pushbutton(pin, suppress=False)

Extend the Switch class to support logical state, long press and double-click events

Author: Peter Hinch


mqtt_as.py is a “resilient” asynchronous non-blocking MQTT driver. In Microhomie we use the patched version from Kevin Köck. Kevins version use keywords to initialize the mqtt_as object, support for “unsubscribe” and support for the unix port of MicroPython.

Author: Peter Hinch, Kevin Köck