{"id":21853570,"url":"https://github.com/lupin3000/iot-radar-python-micropython-mosquito","last_synced_at":"2026-04-18T09:40:21.940Z","repository":{"id":219562995,"uuid":"749345202","full_name":"Lupin3000/IoT-Radar-Python-MicroPython-Mosquito","owner":"Lupin3000","description":"Simple IoT Radar example for IoT projects","archived":false,"fork":false,"pushed_at":"2024-02-04T06:33:57.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T18:52:04.628Z","etag":null,"topics":["esp32","micropython","micropython-esp32","mosquitto","mosquitto-mqtt-broker","mqtt","python","python3"],"latest_commit_sha":null,"homepage":"https://softwaretester.info","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lupin3000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-28T10:04:36.000Z","updated_at":"2024-01-28T10:09:11.000Z","dependencies_parsed_at":"2024-02-04T07:27:24.124Z","dependency_job_id":null,"html_url":"https://github.com/Lupin3000/IoT-Radar-Python-MicroPython-Mosquito","commit_stats":null,"previous_names":["lupin3000/iot-radar-python-micropython-mosquito"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lupin3000/IoT-Radar-Python-MicroPython-Mosquito","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FIoT-Radar-Python-MicroPython-Mosquito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FIoT-Radar-Python-MicroPython-Mosquito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FIoT-Radar-Python-MicroPython-Mosquito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FIoT-Radar-Python-MicroPython-Mosquito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lupin3000","download_url":"https://codeload.github.com/Lupin3000/IoT-Radar-Python-MicroPython-Mosquito/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FIoT-Radar-Python-MicroPython-Mosquito/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31964541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp32","micropython","micropython-esp32","mosquitto","mosquitto-mqtt-broker","mqtt","python","python3"],"created_at":"2024-11-28T01:25:44.957Z","updated_at":"2026-04-18T09:40:21.923Z","avatar_url":"https://github.com/Lupin3000.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoT Radar: Python - MicroPython - Mosquito MQTT\n\nThis repository contains a basic IoT MQTT solution to create a radar animation (_incl. distance and angle_). The publisher script is written in MicroPython and subscriber script is written in Python.\n\nI tested the Mosquito MQTT broker on Raspberry Pi 4 - Bookworm, the MQTT publisher Radar UI on macOS 14.3 and the subscriber on ESP32 - MicroPython 1.20.0.\n\n## Install Mosquito MQTT broker\n\n```shell\n# update packages (optional)\n$ apt update \u0026\u0026 apt upgrade -y\n\n# install mosquitto broker and clients\n$ apt install -y mosquitto mosquitto-clients\n\n# stop mosquitto service (optional)\n$ systemctl stop mosquitto.service\n\n# add configuration\n$ vim /etc/mosquitto/conf.d/mosquitto_add.conf\n\n# start mosquitto service\n$ systemctl start mosquitto.service\n\n# verify mosquitto service status (optional)\n$ systemctl status mosquitto.service\n\n# enable mosquitto service\n$ systemctl enable mosquitto.service\n```\n\n### mosquitto_add.conf\n\nThis is the content for `/etc/mosquitto/conf.d/mosquitto_add.conf`. It will create a listener for anonymous remote connections. Don't use in production!\n\n```\nlistener 1883\nallow_anonymous true\n```\n\n## Test Mosquitto\n\nYou can use this manual test for the `mosquitto.service` and also to test publisher: `main.py` and/or subscriber: `example.py`.\n\n### ttys001\n\n```shell\n# client for subscribing to topics\n$ mosquitto_sub -d -t python/mqtt\n```\n\n### ttys002\n\n```shell\n# client for publishing simple messages\n$ mosquitto_pub -d -t python/mqtt -m \"90;225\"\n```\n\n\u003e **Important for testing `example.py`:** \n\u003e - The first value `90` means degrees and second value `225` means distance.\n\u003e - Values must be separated by `;`\n\u003e - Degrees min value is `45` and max value is `135`\n\u003e - Distance min value is `0` and max value is `350`\n\n## Local Development Environment\n\n\u003e Adapt the values inside `configuration.py` for your needs!\n\u003e - WLAN_SSID\n\u003e - WLAN_PASSWORD\n\u003e - MQTT_BROKER (_IP address is also possible_)\n\n### Prepare local development environment\n\n```shell\n# create virtualenv\n$ python3 -m venv .venv\n\n# activate virtualenv\n$ source .venv/bin/activate\n\n# install requirements\n$ pip3 install -r requirements.txt\n```\n\n### Upload publisher scripts to ESP32\n\n\u003e The device name `cu.usbserial-0001` can be different for you!\n\n```shell\n# verifiy serial connection (optional)\n(.venv) $ ls -la /dev/cu.*\ncrw-rw-rw-  1 root  wheel  0x9000007 Feb  1 16:43 /dev/cu.usbserial-0001\n\n# upload main.py to ESP32\n(.venv) $ rshell -p /dev/cu.usbserial-0001 cp main.py /pyboard/\n\n# upload configuration.py to ESP32\n(.venv) $ rshell -p /dev/cu.usbserial-0001 cp -r config /pyboard/\n\n# start MicroPython repl (optional)\n(.venv) $ rshell -p /dev/cu.usbserial-0001 repl\n```\n\n## Run everything\n\n\u003e The broker should run already and must be reachable! It doesn't matter in which order you start the publisher: `main.py` and subscriber: `example.py`.\n\n### Start subscriber script on local environment\n\n**Start: `example.py`**\n\n```shell\n# start subscriber\n(.venv) $ python3 -B example.py \n```\n\n**Stop: `radar.py`**\n\nPress `ctrl` + `c` to stop `example.py` execution.\n\n### Start publisher script to ESP32\n\n**Start: `main.py`**\n\nPress `ctrl` + `d` (_if you use REPL_) or reset button on device to start the `main.py` on ESP32 device.\n\n**Stop: `main.py`**\n\nIf you're inside the REPL, you can press `ctrl` + `c` to stop execution and `ctrl` + `x` to close REPL and connection.\n\n### Example result\n\n![example.jpg](./img/example.jpg)\n\n## Additional information\n\n**Stop: virtualenv**\n\n```shell\n# stop virtualenv\n(.venv) $ deactivate\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupin3000%2Fiot-radar-python-micropython-mosquito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flupin3000%2Fiot-radar-python-micropython-mosquito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupin3000%2Fiot-radar-python-micropython-mosquito/lists"}