1.1.9 • Published 1 month ago

@mkellsy/baf v1.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Big Ass Fans

Implementation of Big Ass Fans protocol for TypeScript.

This exposes a method to interact with Big Ass Fans devices. This requires the client to impliment the system that needs to be intergrated.

API

You will need information from MDNS to establish a connection to a deice.

this.discovery = new MDNSServiceDiscovery({
    type: "api",
    protocol: Protocol.TCP,
});

this.discovery.onAvailable(this.onAvailable);

Once you have the IP address, name and model, you can create a connetcion to the fan.

const connection = new Connection(ip.address, host.id, host.name, host.model)

connection.on("Connect", onConnect);
connection.on("Disconnect", onDisconnect);
connection.on("Response", onResponse);
connection.on("Error", onError);

await connection.connect();

connection.write([0x12, 0x04, 0x1a, 0x02, 0x08, 0x03]);
connection.write([0x12, 0x04, 0x1a, 0x02, 0x08, 0x06]);
connection.write([0x12, 0x02, 0x1a, 0x00]);
1.1.9

1 month ago

1.1.8

1 month ago

1.1.7

1 month ago

1.0.5

1 month ago

1.0.4

1 month ago

1.0.3

1 month ago

1.0.2

1 month ago

1.0.1

1 month ago