{"id":19211370,"url":"https://github.com/truebrain/mqtt-bridge","last_synced_at":"2025-07-14T02:35:50.746Z","repository":{"id":147275620,"uuid":"462886361","full_name":"TrueBrain/mqtt-bridge","owner":"TrueBrain","description":"A bridge between two MQTT brokers","archived":false,"fork":false,"pushed_at":"2022-02-23T21:14:33.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T07:43:48.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TrueBrain.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":"2022-02-23T19:57:19.000Z","updated_at":"2023-09-29T16:13:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"9302a613-4eca-4cdd-b9e0-ba63e7164b10","html_url":"https://github.com/TrueBrain/mqtt-bridge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TrueBrain/mqtt-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueBrain%2Fmqtt-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueBrain%2Fmqtt-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueBrain%2Fmqtt-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueBrain%2Fmqtt-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TrueBrain","download_url":"https://codeload.github.com/TrueBrain/mqtt-bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TrueBrain%2Fmqtt-bridge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265233753,"owners_count":23731825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-09T13:42:18.066Z","updated_at":"2025-07-14T02:35:50.712Z","avatar_url":"https://github.com/TrueBrain.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MQTT Bridge\n\nSometimes you have two MQTT brokers, and you want one to contain information about the other.\n\nThis bridge allows you to dynamically (over MQTT) tell what information it should fetch from what remote MQTT broker to duplicate in the local MQTT broker.\n\n# Usage\n\n```bash\npython3 -m venv .env\n.env/bin/pip install -U \"setuptools\u003c50\" pip\n.env/bin/pip install -e .\n\n.env/bin/python -m mqtt_bridge\n```\n\nThis will connect to the MQTT broker on localhost (default port), and starts listening for `+/+/remote`.\nIf a key matching is created, the following payload is expected:\n\n```json\n{\n    \"remote\": \"ip:port\",\n    \"on_initialize\": \"\",\n    \"on_disconnect\": \"\",\n}\n```\n\n- `remote`: the remote broker to connect to. `port` part is mandatory, so use 1883 for default port.\n- `on_initialize`: the initial payload when we haven't seen any payload on the remote yet.\n- `on_disconnect`: the payload to use locally when the connection to the remote broker drops.\n\nAfter this, the bridge will connect to the remote broker and starts listening for activity on the `+/+` topic.\nAnything it sees there, will be replicated on the local broker.\n\n# Example setup\n\n- Run an MQTT broker on 1883.\n- Run an MQTT broker on 1900.\n- Start `test_receive.py`.\n- Start `test_send.py`. both should show nothing.\n- Start the bridge, and (re)start `test_receive.py`. You now should see data from `test_receive.py`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruebrain%2Fmqtt-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftruebrain%2Fmqtt-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftruebrain%2Fmqtt-bridge/lists"}