node-unifi
node-unifi copied to clipboard
[INFORMATION] Websockets
Hello,
on unifiOS lot of websockets events come from : wss://unifi/api/ws/system with an object like :
interface IControllerEvent {
type: string;
[key: string]: unknown;
}
And it seems you just listen on : wss://unifi[/proxy/network]/wss/s/<siteName>/events .
But on unifi ( non unifiOS ), some events are send on the "super" site wss://unifi[/proxy/network]/wss/s/super/events ( + events on the selected site ) . They are like the other SiteEvents so ( from what I saw ) :
export interface ISiteEvent {
meta: {
rc: string;
message: string;
product_line?: string;
};
data: Array<unknown>;
}
Some events like "admin login" are send on the super site websockets .
It can be interessting to add a way to listen on them