{"id":23752493,"url":"https://github.com/rwbl/domoticz-micropython-projects","last_synced_at":"2026-04-11T19:34:07.713Z","repository":{"id":156008806,"uuid":"628219564","full_name":"rwbl/domoticz-micropython-projects","owner":"rwbl","description":"Explore using MicroPython with the Domoticz Home Automation System.","archived":false,"fork":false,"pushed_at":"2024-02-14T16:32:46.000Z","size":48484,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-25T00:22:03.008Z","etag":null,"topics":["diy","domoticz","dzvents","esp32","esp32cyd","lua","micropython","raspberry-pi","raspberry-pi-pico-w"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwbl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-15T09:12:37.000Z","updated_at":"2024-02-13T10:24:12.000Z","dependencies_parsed_at":"2025-05-29T12:01:27.187Z","dependency_job_id":null,"html_url":"https://github.com/rwbl/domoticz-micropython-projects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rwbl/domoticz-micropython-projects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fdomoticz-micropython-projects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fdomoticz-micropython-projects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fdomoticz-micropython-projects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fdomoticz-micropython-projects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwbl","download_url":"https://codeload.github.com/rwbl/domoticz-micropython-projects/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbl%2Fdomoticz-micropython-projects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31693272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["diy","domoticz","dzvents","esp32","esp32cyd","lua","micropython","raspberry-pi","raspberry-pi-pico-w"],"created_at":"2024-12-31T17:53:06.414Z","updated_at":"2026-04-11T19:34:07.658Z","avatar_url":"https://github.com/rwbl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# domoticz-micropython-projects\n\n## Purpose\nTo explore how to use the MicroPython programming language running on embedded hardware interfacing with the Domoticz Home Automation System.\n\nThe core of the projects uses the Raspberry Pi Pico W microcontroller (some using the ESP32), with components like actuators \u0026 sensors.\nThe microcontroller is acting as a web server or MQTT Auto Discovery client or BLE advertiser communicating with the Domoticz Home Automation System.\n\nThe intention is to provide some practical guidance, inspire ideas, but not to explain Domoticz nor programming languages.\n... and to have fun experimenting ...\n\n## Prerequisites\nIt is expected to have basic knowledge of\n* Domoticz Home Automation System.\n* Domoticz Automation Event system dzVents \u0026 Lua.\n* Programming languages Python and MicroPython.\n* Raspberry Pi Pico / Pico W and ESP8266/ESP32 microcontrollers.\n* Thonny Integrated Development Environment.\n* JavaScript Object Notation (JSON).\n* Message Queuing Telemetry Transport MQTT and MQTT Auto Discovery.\n* Bluetooth Low Energy (BLE).\n* Node-RED Low-code programming for event-driven applications.\n\n## Remarks\n* This is a working document = conceptual changes \u0026 new idea’s whilst progressing.\n* There might be better solutions = changes depend on the author’s learning curve.\n* To-Do actions are tagged with [TODO].\n* Hard- and Software versions are subject to change.\n* Drawings are created with Fritzing.\n* Sources included in this document - latest sources this GitHub repository folder _src_.\n\n## Concept\n![image](https://github.com/rwbl/domoticz-micropython-projects/assets/47274144/54f97a7f-8c10-4699-bb8d-e1994dc028cf)\nThe block diagram starts at the left with the MicroPython editor (Thonny) running on the development device (Notebook with Windows 11).\n\nConnected to the development device is a Microcontroller Unit (MCU) with external components (actuators \u0026 sensors).\nFor the Pico W projects, the Pico Breadboard Kit or the Pico IO Shield is used. These are a rather handy boards, not only for experimenting but also for building prototypes.\n\nThe MCU communicates with the Domoticz Test System via HTTP, Bluetooth Low Energy (BLE) or MQTT.\nThe MCU acts as a\n* Web Server by sending HTTP GET/POST requests to connected clients or receiving HTTP GET/POST requests from connected clients,\n* MQTT Auto Discovery Client by publishing device configuration or state messages and subscribing to state messages,\n* Bluetooth Low Energy (BLE) advertiser by sending messages to an OpenMQTTGateway, which publishes MQTT messages being converted by Node-RED flow to Domoticz MQTT Auto Discovery Message.\n\nThe connected clients can be any client (like a Web Browser, Node-RED or Application), but for this book the client is a dedicated Domoticz Test System running on a Raspberry Pi 4B 4GB with Raspberry Pi OS version 12 (bookworm).\n\nThe Domoticz hardware and related devices are added, either manually via the “Dummy Hardware Controller” or automatic via the “MQTT Auto Discovery Client Gateway with LAN interface” depending on the requirements of the project as described in this book.\nNote\nWhilst starting to write this book, most of the devices are virtual sensors assigned to the Dummy Hardware Controller, but also gradually start to use the (new) MQTT Auto Discovery feature.\n\nThe Automation events are developed in dzVents (Domoticz Easy Events).\nEvent scripting with dzVents is well integrated in Domoticz and good documentation with many examples is available.\nThe Domoticz editor (GUI \u003e Setup \u003e More Options \u003e Events) is used to develop and test the scripts (My Automation Scripts).\n\nIn addition, Node-RED and MQTT broker mosquitto (with clients mosquitto_pub and mosquitto_sub) are running on the Raspberry Pi.\n\nThe software is regularly updated to stay at the latest versions – for Domoticz the release channel Beta 2024.3 (build 15866) is used (at the time of writing).\n\n## Components\n* 1x Raspberry Pi Pico W 2022.\n* 1x Pico Breadboard Kit GeeekPi with LEDs (LED1-4), Pushbuttons (Button K1 - K4), Buzzer (not used).\n* 1x Pico IO Shield KEYESTUDIO.\n* 1x ESP32-WROOM-32 (basic experiments, OpenMQTTGateway).\n* 1x DHT22 - Temperature \u0026 Humidity sensor.\n* 1x LCD display - I2C 20 columns x 4 rows.\n* 1x LCD display - 1.14 inch 240x135 resolution (Waveshare Pico-LCD-1.14).\n* 1x LCD display - 3.5 inch 480x320 resolution (Waveshare Pico-ResTouch-LCD-3.5).\n* 1x TM1637 - 4-digit 7-segment LED display (I2C).\n* 1x Servo Motor - Tower Pro Micro Servo 9g SG90.\n* 1x RFID-RC522 - Reader for MIFARE RFID Cards and Tokens.\n* 1x TM1638 LED\u0026KEY - 8x 7-segment decimal LED component with 8x individual LEDs and 8x push buttons.\n* 1x PIR Motion Sensor.\n* 1x Potentiometer.\n* 2x DS18B20 - 1-wire digital thermometer.\n* 1x 28BYJ-48 Stepper Motor with ULN2003 motor driver.\n* 1x HC-SR04 Ultrasonic Distance Sensor.\n* 1x IKEA VINDRIKTNING Air Quality sensor.\n* 1x OVNSHVN ESP32 2.8\" TFT Touch Screen Display ESP-32 WIFI BLE Dual Core.\n\n## Credits\n**THANKS**, to the developers of the Raspberry Pi \u0026 ESP Microcontroller, Domoticz Home Automation System, MicroPython Language, Libraries \u0026 Tools and to all sharing related information. Without these, it would not be possible to write this document.\n\n## Licence\nGNU GENERAL PUBLIC LICENSE v3.0.\n\nThe information shared for personal use only - use at your own risk (see LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwbl%2Fdomoticz-micropython-projects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwbl%2Fdomoticz-micropython-projects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwbl%2Fdomoticz-micropython-projects/lists"}