unifi2mqtt
unifi2mqtt copied to clipboard
Update for Wired and Wireless Environment
The code presently does not totally understand the difference between UniFi AP's and other UniFi equipment... It needs to be extended to deal with switches in particular.
In my case there is one strange thing happening - the LED on the US-24 is missing the 'default' whilst the US-16-PoE includes it.
- unifi/status/device/Switch/led - {}
- unifi/status/device/PoE Switch/led - {"val":"default"}
unifi/status/clientCount is the count of all AP's not AP's and switches. Perhaps this should be the aggregate of wired and wireless clients, and unifi/status/wireless/clientCount should be for wireless alone.
I am not 100% sure of how to model the UniFi data into MQTT, else I would be proposing it, and potentially implementing it. I am mostly concerned with end user clients, rather than connections between switches. Connected to each switches are clients with MAC addresses. There can be more than one client on each port (since you can have an unmanaged switch connected to a port). There is also the ability for that port to be PoE, which could be power cycled (outside the scope at the moment).
Ideally I would like to be able to monitor when devices appear in the network, and have things happen then, and also have things happen when they disappear.
ALSO:
I am getting items like unifi/status/wifi//client/UniFi-CloudKey - {"val":false,"ts":1533539244350}
This is a device that is definitely on my wired network and will always be. There is no reason for it to be reporting as a WiFi.