{"id":13478971,"url":"https://github.com/juanboro/cync2mqtt","last_synced_at":"2025-04-11T01:21:50.863Z","repository":{"id":45332926,"uuid":"412926550","full_name":"juanboro/cync2mqtt","owner":"juanboro","description":"Bridge Cync bluetooth mesh to mqtt","archived":false,"fork":false,"pushed_at":"2025-03-04T00:53:28.000Z","size":85,"stargazers_count":46,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-24T22:25:22.373Z","etag":null,"topics":["home-assistant","home-automation","iot","mqtt"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/juanboro.png","metadata":{"files":{"readme":"README.docker.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":"2021-10-02T22:41:19.000Z","updated_at":"2025-03-18T01:47:04.000Z","dependencies_parsed_at":"2024-03-17T05:03:19.337Z","dependency_job_id":"4c0e7b00-a865-4a2b-9758-eeb63f6c4220","html_url":"https://github.com/juanboro/cync2mqtt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanboro%2Fcync2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanboro%2Fcync2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanboro%2Fcync2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juanboro%2Fcync2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juanboro","download_url":"https://codeload.github.com/juanboro/cync2mqtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248323407,"owners_count":21084496,"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":["home-assistant","home-automation","iot","mqtt"],"created_at":"2024-07-31T16:02:06.880Z","updated_at":"2025-04-11T01:21:50.829Z","avatar_url":"https://github.com/juanboro.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# cync2mqtt Dockerfile Build\nRunning in a docker container is a good alternative to running the systemd virtual env setup.  Here are instructions for one possible way to setup using docker.\n\n## Setup\n### Build cync2mqtt Docker Image\n```shell\ndocker build -t cync2mqtt:latest github.com/juanboro/cync2mqtt.git#main\n```\n\n### Download Mesh Configuration from CYNC using 2FA\nCreate a directory on the host to store the mesh configuration file:\n```shell\nmkdir ~/.cync2mqtt\n```\n\nMake sure your devices are all configured in the Cync app, then:\n```shell\ndocker run --rm -it -v ~/.cync2mqtt:/home/cync2mqtt cync2mqtt get_cync_config_from_cloud /home/cync2mqtt/cync_mesh.yaml\n```\n\nYou will be prompted for your username (email) - you'll then get a onetime passcode on the email you will enter as well as your password you use with the app.\n\n### Edit generated configuration\nEdit the generated yaml file as necessary.  The only thing which should be necessary at a minimum is to make sure the mqtt_url definition matches your MQTT broker.\n\n### Create Docker Container\nThis will create a docker container for cync2mqtt which shares access to the host Bluez bluetooth controller:\n```shell\ndocker create --name cync2mqtt --restart=unless-stopped  -v ~/.cync2mqtt:/home/cync2mqtt \\\n-v /var/run/dbus/:/var/run/dbus/:z --privileged cync2mqtt:latest  cync2mqtt /home/cync2mqtt/cync_mesh.yaml\n```\n\nIf you need to use bluepy, create docker container like this (per stackoverflow guidance):\n```shell\ndocker create --name cync2mqtt --restart=unless-stopped  -v ~/.cync2mqtt:/home/cync2mqtt \\\n --cap-add=SYS_ADMIN --cap-add=NET_ADMIN --net=host cync2mqtt:latest  cync2mqtt /home/cync2mqtt/cync_mesh.yaml\n```\n\n### Test Run\nRun the container interactively:\n```shell\ndocker start -ai cync2mqtt\n```\nIf it works you should see an INFO message similar to this:\n```shell\ncync2mqtt - INFO - Connected to mesh mac: XX:XX:XX:XX:XX:XX\n```\n\nYou can view MQTT messages on the topics: acyncmqtt/# and homeassistant/# ...i.e, from the host:\n```shell\nmosquitto_sub -h $mqttip -v -t 'acyncmqtt/#' -t 'homeassistant/#'\n```\n\nControl-C will exit the test run.\n### Run as container service\nOnce things seem correctly running - you can run detached like this:\n```shell\ndocker start cync2mqtt\n```\n(see also docker documentation)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanboro%2Fcync2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuanboro%2Fcync2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuanboro%2Fcync2mqtt/lists"}