{"id":47356645,"url":"https://github.com/bramstroker/UnifiMqttPublisher","last_synced_at":"2026-04-01T07:00:55.210Z","repository":{"id":148702260,"uuid":"367829482","full_name":"bramstroker/UnifiMqttPublisher","owner":"bramstroker","description":"Publishes Unifi controller and AP statistics to a MQTT broker, for use in home automation systems","archived":false,"fork":false,"pushed_at":"2023-05-18T06:49:40.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-01T06:52:42.150Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bramstroker.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,"publiccode":null,"codemeta":null}},"created_at":"2021-05-16T08:54:28.000Z","updated_at":"2025-02-27T21:47:39.000Z","dependencies_parsed_at":"2023-06-19T09:12:30.182Z","dependency_job_id":null,"html_url":"https://github.com/bramstroker/UnifiMqttPublisher","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.15384615384615385","last_synced_commit":"8550c60c8b8fb5a9b0a48c25dba2463a46f29878"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bramstroker/UnifiMqttPublisher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstroker%2FUnifiMqttPublisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstroker%2FUnifiMqttPublisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstroker%2FUnifiMqttPublisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstroker%2FUnifiMqttPublisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bramstroker","download_url":"https://codeload.github.com/bramstroker/UnifiMqttPublisher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramstroker%2FUnifiMqttPublisher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31269190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T06:57:45.811Z","status":"ssl_error","status_checked_at":"2026-04-01T06:57:42.389Z","response_time":53,"last_error":"SSL_read: 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":[],"created_at":"2026-03-18T03:00:18.691Z","updated_at":"2026-04-01T07:00:55.204Z","avatar_url":"https://github.com/bramstroker.png","language":"Python","funding_links":[],"categories":["Home Automation"],"sub_categories":["Other Platforms"],"readme":"# UnifiMqttPublisher\n\nThis repository provides a docker image which publishes Unifi controller and access point statistics to a MQTT broker.\nThese messages can be picked up by home automation systems and allow you to present this information on you dashboard or make automations using this virtual sensor data.\n\n## Prerequisites\n\nYou need the following:\n- Working MQTT broker\n- Unifi controller\n- Some machine with docker installed (which is up 24/7)\n\n## Installation\n\nGo to the machine with docker where you want to run the publisher and make a new folder:\n\n```sh\nmkdir mqtt_unifi\ncd mqtt_unifi\n```\n\nCopy the file `.env.example` to this directory and change the environment vars to match your situation.\n\nStart the docker container:\n\n`docker run -d --restart unless-stopped --env-file=.env bramgerritsen/unifi_mqtt_publisher:latest`\n\nAfter the container is started you should see messages been published on topics `unifi/stats/controller` and `unifi/stats/ap0`. You can verify this by installing a MQTT client and subscribe to these topics.\n\n## Example configuration Home Assistant\n\nAdd the following to you configuration yaml to get sensors in Home assistant\nWhen you have multiple access points the topic is `unifi/stats/ap1` and for the third one `unifi/stats/ap2` vice versa. You can duplicate all entries for `unifi/stats/ap0` to also get these sensors.\n\n```yaml\nsensor:\n  - platform: mqtt\n    name: \"Unifi controller\"\n    state_topic: \"unifi/stats/controller\"\n    value_template: \"{{ value_json.wlan_status }}\"\n    json_attributes_topic: \"unifi/stats/controller\"\n  - platform: mqtt\n    name: \"Unifi controller - version\"\n    state_topic: \"unifi/stats/controller\"\n    value_template: \"{{ value_json.version }}\"\n  - platform: mqtt\n    name: \"Unifi controller - clients\"\n    state_topic: \"unifi/stats/controller\"\n    value_template: \"{{ value_json.num_clients }}\"\n  - platform: mqtt\n    name: \"Unifi controller - update available\"\n    state_topic: \"unifi/stats/controller\"\n    value_template: \"{{ value_json.update_available }}\"\n  - platform: mqtt\n    name: \"Unifi AP 1\"\n    state_topic: \"unifi/stats/ap0\"\n    availability_topic: \"unifi/availability/ap0\"\n    payload_available: \"1\"\n    payload_not_available: \"0\"\n    value_template: \"{{ value_json.device_state }}\"\n    json_attributes_topic: \"unifi/stats/ap0\"\n  - platform: mqtt\n    name: \"Unifi AP 1 - score\"\n    state_topic: \"unifi/stats/ap0\"\n    value_template: \"{{ value_json.satisfaction }}\"\n  - platform: mqtt\n    name: \"Unifi AP 1 - CPU\"\n    state_topic: \"unifi/stats/ap0\"\n    value_template: \"{{ value_json['system-stats']['cpu'] }}\"\n    icon: mdi:chip\n  - platform: mqtt\n    name: \"Unifi AP 1 - RAM\"\n    state_topic: \"unifi/stats/ap0\"\n    value_template: \"{{ value_json['system-stats']['mem'] }}\"\n    icon: mdi:memory\n  - platform: mqtt\n    name: \"Unifi AP 1 - uptime\"\n    state_topic: \"unifi/stats/ap0\"\n    value_template: \"{{ value_json['system-stats']['uptime'] }}\"\n    icon: mdi:clock-outline\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbramstroker%2FUnifiMqttPublisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbramstroker%2FUnifiMqttPublisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbramstroker%2FUnifiMqttPublisher/lists"}