{"id":20569510,"url":"https://github.com/hobbyquaker/unifi2mqtt","last_synced_at":"2025-04-14T16:35:09.941Z","repository":{"id":57386191,"uuid":"119074391","full_name":"hobbyquaker/unifi2mqtt","owner":"hobbyquaker","description":"Connect Ubiquiti UniFi controller to MQTT :satellite:","archived":false,"fork":false,"pushed_at":"2020-08-07T23:16:30.000Z","size":16,"stargazers_count":72,"open_issues_count":14,"forks_count":27,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-04-14T06:29:27.719Z","etag":null,"topics":["client","mqtt","smarthome","ubiquiti","unifi","wifi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hobbyquaker.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}},"created_at":"2018-01-26T16:20:21.000Z","updated_at":"2024-02-17T11:39:14.000Z","dependencies_parsed_at":"2022-09-02T01:10:36.544Z","dependency_job_id":null,"html_url":"https://github.com/hobbyquaker/unifi2mqtt","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/hobbyquaker%2Funifi2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Funifi2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Funifi2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Funifi2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hobbyquaker","download_url":"https://codeload.github.com/hobbyquaker/unifi2mqtt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248917142,"owners_count":21182935,"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":["client","mqtt","smarthome","ubiquiti","unifi","wifi"],"created_at":"2024-11-16T05:08:32.753Z","updated_at":"2025-04-14T16:35:09.916Z","avatar_url":"https://github.com/hobbyquaker.png","language":"JavaScript","funding_links":[],"categories":["Interfaces"],"sub_categories":["Misc"],"readme":"# unifi2mqtt\n\n[![mqtt-smarthome](https://img.shields.io/badge/mqtt-smarthome-blue.svg)](https://github.com/mqtt-smarthome/mqtt-smarthome)\n[![NPM version](https://badge.fury.io/js/unifi2mqtt.svg)](http://badge.fury.io/js/unifi2mqtt)\n[![dependencies Status](https://david-dm.org/hobbyquaker/unifi2mqtt/status.svg)](https://david-dm.org/hobbyquaker/unifi2mqtt)\n[![Build Status](https://travis-ci.org/hobbyquaker/unifi2mqtt.svg?branch=master)](https://travis-ci.org/hobbyquaker/unifi2mqtt)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![License][mit-badge]][mit-url]\n\n\u003e Connect Ubiquiti UniFi controller to MQTT 📡\n\n### Install\n\n`$ sudo npm install -g unifi2mqtt`\n\nI suggest to use [pm2](http://pm2.keymetrics.io/) to manage the unifi2mqtt process (start on system boot, manage log \nfiles, ...)\n\n### Usage \n\n```\nUsage: unifi2mqtt [options]\n\nOptions:\n  -a, --unifi-host      unifi hostname or address         [default: \"127.0.0.1\"]\n  -p, --unifi-port      unifi port                               [default: 8443]\n  -c, --unifi-user      unifi user                            [default: \"admin\"]\n  -s, --unifi-password  unifi password                                [required]\n  -w, --unifi-site      unifi site                          [default: \"default\"]\n  -k, --insecure        allow ssl connections without valid certificate\n  -v, --verbosity       possible values: \"error\", \"warn\", \"info\", \"debug\"\n                                                               [default: \"info\"]\n  -n, --name            instance name. used as topic prefix   [default: \"unifi\"]\n  -u, --url             mqtt broker url            [default: \"mqtt://127.0.0.1\"]\n  -h, --help            Show help                                      [boolean]\n  --version             Show version number                            [boolean]\n\n```\n\n### Topics and Payloads\n\nTopics and Payloads follow [mqtt-smarthome architectural proposal](https://github.com/mqtt-smarthome/mqtt-smarthome).\n\n#### Topics published by unifi2mqtt\n\n* `\u003cname\u003e/status/wifi/\u003cssid\u003e/client/\u003chostname\u003e` - `{\"val\":true}` if client is connected to the wifi network, `{\"val\":false}`\notherwise. Object also contains the properties `mac` and `ts`. Retained.\n* `\u003cname\u003e/status/wifi/\u003cssid\u003e/event/connected` - Client connect event. Payload as above. Not retained.\n* `\u003cname\u003e/status/wifi/\u003cssid\u003e/event/disconnected` - Client disconnect event. Payload as above. Not retained.\n* `\u003cname\u003e/status/wifi/\u003cssid\u003e/clientCount` - number of clients in specific wifi network, e.g. `{\"val\":5}`. Retained.\n* `\u003cname\u003e/status/wifi/\u003cssid\u003e/enabled` - wifi enabled status, e.g. `{\"val\":true}`. Retained.\n* `\u003cname\u003e/status/clientCount` - number of clients in all wifi networks, e.g. `{\"val\":12}`. Retained.\n* `\u003cname\u003e/status/device/\u003cdevice\u003e/led` - status of a device led, e.g. `{\"val\":\"on\"}` Retained.\n* `\u003cname\u003e/connected` - `1` if connected to mqtt broker, `2` if connected to UniFi Controller, `0` on last will. \nRetained.\n\n\n#### Topics subscribed by unifi2mqtt\n\n* `\u003cname\u003e/set/device/\u003cdevice\u003e/led` - switch device led on or off. Payload `on`, `off` or `default` (default uses \nsite-wide led setting).\n* `\u003cname\u003e/set/wifi/\u003cssid\u003e/enabled` - enable/disable wireless network. Payload `true` or `false`.\n\n## License\n\nMIT © [Sebastian Raff](https://github.com/hobbyquaker)\n\n[mit-badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat\n[mit-url]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Funifi2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhobbyquaker%2Funifi2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Funifi2mqtt/lists"}