MQBoard - Micro-Framework for MicroPython Boards Managed via MQTT
Posted: Tue May 26, 2020 7:30 am
My projects tend to be on the infrastructure side of things resulting in microcontrollers stuck somewhere doing some thing for a long time, sometimes a decade. At the same time, a lot of these projects are experiments that I keep tweaking even once they're "deployed" and "in production". So I need a robust framework that allows me to see what's happening on the board remotely, sometimes perform interactive troubleshooting, and update software, all remote. And have high confidence that I'm not going to loose connectivity or management access to the board even if I make a mistake. Out of this context and need comes MQBoard.
MQBoard contains the following:
- an MQTT client library that uses the new uasyncio, that deals with disconnection and retransmission, and that supports the data rates needed for an OTA upgrade (1.5MB to transfer...)
- a set of python files that boot a board, provide a safe-mode when things go wrong, log over MQTT, provide Repl access, and launch a modular application
- a MQRepl task that provides access to the flash filesystem, to the Repl, and to OTA upgrades all over MQTT
- a mqboard commandline tool that has commands similar to pyboard.py, plus OTA update, log viewing, and file synchronization, all over MQTT
- a simple blinky demo app
Right now MQBoard only works on the esp32. I'd like to make it work on PYBD, but have not had the time yet. It will not work on the esp8266, there's just not enough memory there for this to make sense.
I won't copy the README here: there is quite some documentation in the repository, if you're interested in the issues addressed by MQBoard please check out https://github.com/tve/mqboard
MQBoard contains the following:
- an MQTT client library that uses the new uasyncio, that deals with disconnection and retransmission, and that supports the data rates needed for an OTA upgrade (1.5MB to transfer...)
- a set of python files that boot a board, provide a safe-mode when things go wrong, log over MQTT, provide Repl access, and launch a modular application
- a MQRepl task that provides access to the flash filesystem, to the Repl, and to OTA upgrades all over MQTT
- a mqboard commandline tool that has commands similar to pyboard.py, plus OTA update, log viewing, and file synchronization, all over MQTT
- a simple blinky demo app
Right now MQBoard only works on the esp32. I'd like to make it work on PYBD, but have not had the time yet. It will not work on the esp8266, there's just not enough memory there for this to make sense.
I won't copy the README here: there is quite some documentation in the repository, if you're interested in the issues addressed by MQBoard please check out https://github.com/tve/mqboard