Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-rflink

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-rflink - npm Package Compare versions

Comparing version 1.1.2 to 1.1.4

16

dist/index.cjs.js

@@ -8,6 +8,7 @@ 'use strict';

const Readline = SerialPort.parsers.Readline;
let Service, Characteristic; // TODO: types
let Service, Characteristic, UUIDGen; // TODO: types
function index (homebridge) {
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;
UUIDGen = homebridge.hap.uuid;
homebridge.registerPlatform("homebridge-rflink", "RFLink", RFLinkPlatform);

@@ -30,3 +31,3 @@ }

this.log(`received ${s}`);
const m = s.match(/^20;\d+;(?<proto>[^;]+);ID=(?<address>[^;]+);SWITCH=(?<button>[^;]+);CMD=(?<command>[^;]+);/);
const m = s.match(/^20;[^;]+;(?<proto>[^;]+);ID=(?<address>[^;]+);SWITCH=(?<button>[^;]+);CMD=(?<command>[^;]+);/);
if (m) {

@@ -67,2 +68,4 @@ const { proto, address, button, command } = m.groups;

constructor(config, port, log, subscribe) {
this.currentValue = false;
this.currentLevel = 0;
this.name = config.name;

@@ -73,2 +76,5 @@ this.config = config;

this.service = new Service[config.type](config.name);
this.manufacturer = "RF Accessories";
this.model = `RF ${config.type}`;
this.serialNumber = UUIDGen.generate(config.name);
subscribe((message) => {

@@ -136,3 +142,3 @@ if (!config.devices) {

this.currentValue = value;
this.service.getCharacteristic(Characteristic.On).updateValue(value);
this.service.setCharacteristic(Characteristic.On, value);
}

@@ -142,5 +148,3 @@ updateLevel(level) {

this.currentLevel = level;
this.service
.getCharacteristic(Characteristic.Brightness)
.updateValue(level);
this.service.setCharacteristic(Characteristic.Brightness, level);
}

@@ -147,0 +151,0 @@ getServices() {

import SerialPort from 'serialport';
const Readline = SerialPort.parsers.Readline;
let Service, Characteristic; // TODO: types
let Service, Characteristic, UUIDGen; // TODO: types
function index (homebridge) {
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;
UUIDGen = homebridge.hap.uuid;
homebridge.registerPlatform("homebridge-rflink", "RFLink", RFLinkPlatform);

@@ -25,3 +26,3 @@ }

this.log(`received ${s}`);
const m = s.match(/^20;\d+;(?<proto>[^;]+);ID=(?<address>[^;]+);SWITCH=(?<button>[^;]+);CMD=(?<command>[^;]+);/);
const m = s.match(/^20;[^;]+;(?<proto>[^;]+);ID=(?<address>[^;]+);SWITCH=(?<button>[^;]+);CMD=(?<command>[^;]+);/);
if (m) {

@@ -62,2 +63,4 @@ const { proto, address, button, command } = m.groups;

constructor(config, port, log, subscribe) {
this.currentValue = false;
this.currentLevel = 0;
this.name = config.name;

@@ -68,2 +71,5 @@ this.config = config;

this.service = new Service[config.type](config.name);
this.manufacturer = "RF Accessories";
this.model = `RF ${config.type}`;
this.serialNumber = UUIDGen.generate(config.name);
subscribe((message) => {

@@ -131,3 +137,3 @@ if (!config.devices) {

this.currentValue = value;
this.service.getCharacteristic(Characteristic.On).updateValue(value);
this.service.setCharacteristic(Characteristic.On, value);
}

@@ -137,5 +143,3 @@ updateLevel(level) {

this.currentLevel = level;
this.service
.getCharacteristic(Characteristic.Brightness)
.updateValue(level);
this.service.setCharacteristic(Characteristic.Brightness, level);
}

@@ -142,0 +146,0 @@ getServices() {

{
"name": "homebridge-rflink",
"version": "1.1.2",
"version": "1.1.4",
"description": "RFLink support for Homebridge: https://github.com/nfarina/homebridge",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc