UNPKG

neramirez-broadlink-ts

Version:

A TypeScript-enhanced Node.JS fork of broadlinkjs, designed for interacting with RM devices in homebridge-broadlink-rm. Now includes a feature for handling multiple requests to the same device, with a specific focus on supporting homebridge-broadlink-wind

27 lines 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BroadLinkDeviceRF = void 0; const broadLinkDevice_1 = require("./broadLinkDevice"); class BroadLinkDeviceRF extends broadLinkDevice_1.BroadLinkDevice { constructor(host, macAddress, deviceType, logger) { super(host, macAddress, deviceType, logger); this.enterRFSweep = () => { let packet = Buffer.from([0x19]); packet = Buffer.concat([this.request_header, packet]); //command: number, payload: Buffer, macAddress: Buffer, requestCounter: number, deviceType: number return this.dispatchCommandAndIncrementCounter(0x6a, packet); }; this.checkRFData = () => { let packet = Buffer.from([0x1a]); packet = Buffer.concat([this.request_header, packet]); return this.dispatchCommandAndIncrementCounter(0x6a, packet); }; this.checkRFData2 = () => { let packet = Buffer.from([0x1b]); packet = Buffer.concat([this.request_header, packet]); return this.dispatchCommandAndIncrementCounter(0x6a, packet); }; } } exports.BroadLinkDeviceRF = BroadLinkDeviceRF; //# sourceMappingURL=broadLinkDeviceRF.js.map