https://github.com/daq-tools/umqtt-example
Examples to test the behavior of MicroPython's "umqtt.simple" module against Mosquitto
https://github.com/daq-tools/umqtt-example
Last synced: 15 days ago
JSON representation
Examples to test the behavior of MicroPython's "umqtt.simple" module against Mosquitto
- Host: GitHub
- URL: https://github.com/daq-tools/umqtt-example
- Owner: daq-tools
- Created: 2021-09-09T07:58:18.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-09T08:09:50.000Z (almost 5 years ago)
- Last Synced: 2025-02-28T09:24:45.773Z (over 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
#############
umqtt-example
#############
About
=====
Concise example to test the behavior of MicroPython's ``umqtt.simple`` against
Mosquitto 2.0.11 / 2.0.12.
The reason is to investigate a potential regression with Mosquitto 2.0.12,
being more strict wrt. protocol compliance, which apparently breaks
``umqtt.simple``.
See also:
- https://github.com/micropython/micropython-lib/issues/445
- https://github.com/hiveeyes/terkin-datalogger/pull/97
Notes
=====
There is a module ``umqtt.universal``, which is derived from ``umqtt.simple``.
It is compatible with both MicroPython and CPython.
Setup
=====
Install MicroPython::
brew install micropython
Acquire sources::
git clone https://github.com/daq-tools/umqtt-example
cd umqtt-example
Usage
=====
Run Mosquitto::
# Version 2.0.11
docker run -it --rm --publish=1883:1883 eclipse-mosquitto:2.0.11 mosquitto -c /mosquitto-no-auth.conf
# Version 2.0.12
docker run -it --rm --publish=1883:1883 eclipse-mosquitto:2.0.12 mosquitto -c /mosquitto-no-auth.conf
Invoke tests, on both CPython and MicroPython::
make test
In order to individually invoke the tests, run::
# CPython
make test-cpython
# MicroPython
make test-micropython