{"id":36027583,"url":"https://github.com/David-Lor/MQTT2ETCD","last_synced_at":"2026-01-17T02:00:46.060Z","repository":{"id":104269168,"uuid":"217742525","full_name":"David-Lor/MQTT2ETCD","owner":"David-Lor","description":"Send configuration from 🦟MQTT to ⚙️ETCD and vice versa","archived":false,"fork":false,"pushed_at":"2019-11-08T20:08:52.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-10-11T11:11:33.792Z","etag":null,"topics":["etcd","etcd-keys","mqtt","mqtt-bridge","paho-mqtt","python","python3","python36","python37"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/David-Lor.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2019-10-26T17:09:44.000Z","updated_at":"2021-02-15T21:28:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"a85be7f0-aeca-41c6-bd51-6ca842f005c4","html_url":"https://github.com/David-Lor/MQTT2ETCD","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/David-Lor/MQTT2ETCD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FMQTT2ETCD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FMQTT2ETCD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FMQTT2ETCD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FMQTT2ETCD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/David-Lor","download_url":"https://codeload.github.com/David-Lor/MQTT2ETCD/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Lor%2FMQTT2ETCD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28492047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"online","status_checked_at":"2026-01-17T02:00:07.808Z","response_time":85,"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":["etcd","etcd-keys","mqtt","mqtt-bridge","paho-mqtt","python","python3","python36","python37"],"created_at":"2026-01-10T15:00:40.727Z","updated_at":"2026-01-17T02:00:46.030Z","avatar_url":"https://github.com/David-Lor.png","language":"Python","funding_links":[],"categories":["Interfaces"],"sub_categories":["Misc"],"readme":"# MQTT2ETCD\n\nBridge between MQTT and ETCD, that can:\n\n- PUT on ETCD by publishing on MQTT\n- Watch ETCD keys and Publish changes on MQTT\n\n## Requirements\n\n- Python \u003e= 3.6\n- Packages listed on [requirements.txt](requirements.txt)\n- Docker recommended for deployment\n\n## Changelog\n\n- 0.1.3 - add tests\n- 0.1.2 - add logging\n- 0.1.1 - add settings to customize MQTT topics\n- 0.0.1 - initial version (base functional code, supporting MQTT2ETCD \u0026 ETCD2MQTT)\n\n## Settings\n\nSettings can be defined through environment variables or using a `.env` file (located within the `__main__.py` file).\n\n### ETCD Settings\n\n- **MQTT2ETCD_HOST**: ETCD server host (default: `127.0.0.1`)\n- **MQTT2ETCD_PORT**: ETCD server port (default: `2379`)\n- **MQTT2ETCD_LISTEN_PREFIX**: ETCD key prefix to watch (default=undefined; if undefined, will not watch)\n- **MQTT2ETCD_LISTEN_ALL**: if 1, watch ALL ETCD keys (default=0; if 1 will override the LISTEN_PREFIX setting)\n- **MQTT2ETCD_PREV_KV**: if 1, publish watched ETCD keys on startup (default=0)\n\n### MQTT Settings\n\n- **MQTT2ETCD_BROKER**: MQTT broker host (default: `127.0.0.1`)\n- **MQTT2ETCD_BROKER_PORT**: MQTT broker port (default: `1883`)\n- **MQTT2ETCD_CLIENT_ID**: MQTT client ID (default: `MQTT2ETCD-{uuid1}`)\n- **MQTT2ETCD_RETAIN**: if 1, publish watched ETCD keys MQTT messages with Retain flag (default=0)\n- **MQTT2ETCD_TOPIC_BASE**: Base level topic (default: `mqtt2etcd`)\n- **MQTT2ETCD_TOPIC_PUT**: Context level for PUT (publish) keys (default: `put`)\n- **MQTT2ETCD_TOPIC_WATCH**: Context level where watched keys get published (default: `stat`)\n- **MQTT2ETCD_TOPIC_STATUS**: Context level where MQTT2ETCD service status messages get published (default: `status`)\n- **MQTT2ETCD_PAYLOAD_ONLINE**: Payload to send on the Status topic when the service connects to MQTT (default: `Online`)\n- **MQTT2ETCD_PAYLOAD_OFFLINE**: Payload to send on the Status topic when the service goes offline, as LWT (default: `Offline`)\n\n### Misc System Settings\n\n- **MQTT2ETCD_LOG_LEVEL**: Log level for the logger (default: `INFO`)\n\n## MQTT Topics\n\nTopics for ETCD keys are split in 3 levels (split by `/`):\n\n1. Base level (default: `mqtt2etcd`)\n2. Order/context level (default: `put`, `stat`)\n3. ETCD key (it can contain multiple `/`, but shall not contain `#` nor `+`)\n\nHaving the order/context level at the end would be (personally) prefered, but would cause trouble with the MQTT wildcard pattern \n  for subscribing to the `put` order topics while supporting ETCD keys with `/`.\n\nAn additional topic for status about the MQTT2ETCD service (on-connect and LWT messages) get published on the Status topic\n  (`mqtt2etcd/status` by default).\n\n### MQTT2ETCD (PUT)\n\n- Default topic is `mqtt2etcd/put/{key}`, being `{key}` the full ETCD key of the entry\n- Payload must be the value to set\n\n### ETCD2MQTT (Watch)\n\n- Default topic is `mqtt2etcd/stat/{key}`, being `{key}` the full ETCD key of the entry\n- Payload is the value of the entry\n\n## Installing (via Docker)\n\nThe recommended method to install is using the [Python-Autoclonable-App](https://hub.docker.com/r/davidlor/python-autoclonable-app/) image:\n\n```bash\nsudo docker run -d \\\n  -e GIT_REPOSITORY=https://github.com/David-Lor/MQTT2ETCD.git \\\n  -e GIT_BRANCH=develop \\\n  -e MQTT2ETCD_BROKER={mqtt_broker_ip} \\\n  -e MQTT2ETCD_HOST={etcd_server_ip} \\\n  -v /etc/timezone:/etc/timezone:ro \\\n  -v /etc/localtime:/etc/localtime:ro \\\n  --name mqtt2etcd \\\n  davidlor/python-autoclonable-app\n```\n\nIf you want to run it locally:\n\n```bash\ngit clone https://github.com/David-Lor/MQTT2ETCD.git\npython MQTT2ETCD\n```\n\n### Running tests\n\nInstall the requirements for the tests:\n```bash\n# After cloning...\ncd MQTT2ETCD\npip install -r tests/requirements.txt\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavid-Lor%2FMQTT2ETCD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDavid-Lor%2FMQTT2ETCD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavid-Lor%2FMQTT2ETCD/lists"}