New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-abode

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-abode - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

1

.eslintrc.json

@@ -122,3 +122,2 @@ {

"no-undefined": 0,
"no-use-before-define": 2,
"handle-callback-err": 0,

@@ -125,0 +124,0 @@ "no-mixed-requires": 0,

37

index.js

@@ -6,11 +6,15 @@ 'use strict';

module.exports = function (homebridge) {
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;
homebridge.registerAccessory('homebridge-abode', 'AbodeCommand', AbodeCommandAccessory);
};
function AbodeCommandAccessory(log, config) {
this.log = log;
this.name = config.name;
this.open = true;
}
AbodeCommandAccessory.prototype.setState = function (isClosed, callback) {
this.log('Hello World');
if (this.open) {
if (!isClosed) {
this.alarmService.setCharacteristic(Characteristic.CurrentDoorState, Characteristic.CurrentDoorState.CLOSED);

@@ -27,31 +31,16 @@ this.open = true;

AbodeCommandAccessory.prototype.getState = function (callback) {
callback(null, Characteristic.CurrentDoorState.open);
callback(null, this.open ? Characteristic.CurrentDoorState.OPEN : Characteristic.CurrentDoorState.CLOSED);
};
AbodeCommandAccessory.prototype.getServices = function () {
this.informationService = new Service.AccessoryInformation();
this.alarmService = new Service.LockMechanism(this.name);
this.informationService
.setCharacteristic(Characteristic.Manufacturer, 'Abode Command')
.setCharacteristic(Characteristic.Model, 'Homebridge Plugin')
.setCharacteristic(Characteristic.SerialNumber, '001');
this.alarmService.getCharacteristic(Characteristic.TargetDoorState)
.on('set', this.setState.bind(this));
.on('set', this.setState.bind(this))
.on('get', this.getState.bind(this));
if (this.stateCommand) {
this.alarmService.getCharacteristic(Characteristic.CurrentDoorState)
.on('get', this.getState.bind(this));
this.alarmService.getCharacteristic(Characteristic.TargetDoorState)
.on('get', this.getState.bind(this));
}
this.alarmService.getCharacteristic(Characteristic.CurrentDoorState)
.on('get', this.getState.bind(this));
return [this.informationService, this.garageDoorService];
return [this.alarmService];
};
module.exports = function (homebridge) {
Service = homebridge.hap.Service;
Characteristic = homebridge.hap.Characteristic;
homebridge.registerAccessory('homebridge-abode', 'AbodeCommand', AbodeCommandAccessory);
};
{
"name": "homebridge-abode",
"version": "0.0.3",
"version": "0.0.4",
"description": "Abode Plugin for homebridge",

@@ -5,0 +5,0 @@ "scripts": {

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