broadlinkts-rm
v1.0.2
Published
TypeScript reimplementation of broadlinkjs-rm, providing discovery and control for Broadlink RM devices. Credits: broadlinkjs-rm (lprhodes).
Maintainers
Readme
BroadlinkJS RM (TypeScript)
Overview
This package is a TypeScript port of the popular broadlinkjs-rm library by @lprhodes.
It provides an easy way to discover and control Broadlink RM devices (IR and RF) directly from Node.js applications, now with full type definitions out of the box.
Features
- 📡 Discover Broadlink RM devices on your local network
- 🎛️ Send and learn IR and RF commands
- 🌡️ Read temperature data (on supported devices)
- ✅ Written in TypeScript with complete typings
- ⚡ Drop-in replacement for
broadlinkjs-rmwith the same API
Installation
npm install broadlinkts-rmUsage
import Broadlink from "broadlinkts-rm";
// Create a Broadlink instance
const broadlink = new Broadlink();
// Start discovering devices on the local network
broadlink.discover();
// When a device is found and ready to use
broadlink.on("deviceReady", (device) => {
console.log("✅ Device discovered:", device.host);
// Put the device into learning mode
device.enterLearning();
// Listen for learned IR/RF codes
device.on("rawData", (data: Buffer) => {
console.log("📡 Learned code:", data.toString("hex"));
});
});Credits
This project is a TypeScript adaptation of the excellent work by @lprhodes in broadlinkjs-rm.
It also builds upon the research and contributions of:
- @momodalo with broadlinkjs
- @mjg59 with python-broadlink
Huge thanks to all of them for laying the foundation of Broadlink support in the open-source community.
