a tool to poll the UniFi controller API and populate clients to mqtt
unifi2mqtt is a small gateway daemon in the spirit of zwave2mqtt, which polls the UniFi Controller API and feeds information about connected devices into MQTT, for the intended purpose of powering HomeAssistant's MQTT Device Tracker.
unifi2mqtt [flags]
-h, --help help for unifi2mqtt
--host string hostname of the UniFi controller (default "localhost")
--include-name / client names to include; if no --include flags are set, all clients will be reported. If a name is surrounded with /, it's interpreted as a regular expression. Flag may be specified multiple times, or just once with `,`-separated options.
--mqtt-host string hostname of the MQTT server to publish to (default "localhost")
--mqtt-port int port used to connect to MQTT (default 1883)
--mqtt-prefix string a prefix for the mqtt space to publish, messages are published to {mqtt-prefix}/{device-name} (default "unifi")
--mqtt-proto tcp protocol used to connect to MQTT; options are tcp, `ssl`, `ws` (default "tcp")
--password string user password on UniFi controller (env: UNIFI2MQTT_PASS)
--port int UniFi controller port (default 8443)
--unifi-timeout duration how long does a device need to be not 'seen' before it's repoted as not_home. Note that since unifi2mqtt _polls_ the unifi API once a minute, there's no point in setting this lower than that. Unifi itself will stop reporting a device after about five minutes. (default 1m0s)
--username string login user on UniFi controller (env: UNIFI2MQTT_USER)
--verify-tls if true, verify the TLS certificate of the UniFi controller