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

@switchbot/homebridge-switchbot

Package Overview
Dependencies
Maintainers
2
Versions
924
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@switchbot/homebridge-switchbot - npm Package Compare versions

Comparing version 0.1.2-beta.37 to 0.1.2-beta.38

4

dist/devices/bots.js

@@ -196,4 +196,4 @@ "use strict";

catch (e) {
this.platform.log.error(`Bot - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Bot ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Bot ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Bot ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -200,0 +200,0 @@ }

@@ -125,4 +125,4 @@ "use strict";

catch (e) {
this.platform.log.error(`Bulb - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Bulb ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Bulb ${this.accessory.displayName} failed to refresh status, Error Message ${JSON.stringify(e.message)}`);
this.platform.debug(`Bulb ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -129,0 +129,0 @@ }

@@ -169,4 +169,4 @@ "use strict";

catch (e) {
this.platform.log.error(`Contact - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Contact ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Contact ${this.accessory.displayName} failed to refresh status. Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Contact ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -173,0 +173,0 @@ }

@@ -235,3 +235,2 @@ "use strict";

try {
this.platform.debug('Curtain - Reading', `${settings_1.DeviceURL}/${this.device.deviceId}/status`);
this.deviceStatus = (await this.platform.axios.get(`${settings_1.DeviceURL}/${this.device.deviceId}/status`)).data;

@@ -244,4 +243,4 @@ this.platform.debug(`Curtain ${this.accessory.displayName} refreshStatus: ${JSON.stringify(this.deviceStatus)}`);

catch (e) {
this.platform.log.error(`Curtain - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Curtain ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Curtain ${this.accessory.displayName} failed to refresh status, Eror Message ${JSON.stringify(e.message)}`);
this.platform.debug(`Curtain ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -248,0 +247,0 @@ }

@@ -201,4 +201,4 @@ "use strict";

catch (e) {
this.platform.log.error(`Humidifier - Failed to update status of ${this.device.deviceName}: ${JSON.stringify(e.message)}`);
this.platform.debug(`Humidifier ${this.accessory.displayName} ${JSON.stringify(e)}`);
this.platform.log.error(`Humidifier ${this.accessory.displayName}, Failed to update status. Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Humidifier ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -205,0 +205,0 @@ }

@@ -145,3 +145,2 @@ "use strict";

try {
this.platform.debug('Camera - Reading', `${settings_1.DeviceURL}/${this.device.deviceId}/status`);
this.deviceStatus = (await this.platform.axios.get(`${settings_1.DeviceURL}/${this.device.deviceId}/status`)).data;

@@ -153,4 +152,4 @@ this.platform.device(`Camera ${this.accessory.displayName} refreshStatus: ${JSON.stringify(this.deviceStatus)}`);

catch (e) {
this.platform.log.error(`IndoorCam - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`IndoorCam ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`IndoorCam ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`IndoorCam ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -157,0 +156,0 @@ }

@@ -261,4 +261,4 @@ "use strict";

catch (e) {
this.platform.log.error(`Meter - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Meter ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Meter ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Meter ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -265,0 +265,0 @@ }

@@ -152,4 +152,4 @@ "use strict";

catch (e) {
this.platform.log.error(`Motion - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Motion ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Motion ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Motion ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -156,0 +156,0 @@ }

@@ -154,4 +154,4 @@ "use strict";

catch (e) {
this.platform.log.error(`Plug - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Plug ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Plug ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Plug ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -158,0 +158,0 @@ }

@@ -59,6 +59,7 @@ import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, Service, Characteristic } from 'homebridge';

* Otherwise send debug logs to log.debug
* this.debugMode = process.argv.includes('-D') || process.argv.includes('--debug');
*/
debug(...log: any[]): void;
/**
* If debug level logging is turned on, log to log.info
* If device level logging is turned on, log to log.warn
* Otherwise send debug logs to log.debug

@@ -65,0 +66,0 @@ */

{
"displayName": "Homebridge SwitchBot",
"name": "@switchbot/homebridge-switchbot",
"version": "0.1.2-beta.37",
"version": "0.1.2-beta.38",
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",

@@ -6,0 +6,0 @@ "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",

@@ -237,4 +237,4 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge';

} catch (e: any) {
this.platform.log.error(`Bot - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Bot ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Bot ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Bot ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -241,0 +241,0 @@ }

@@ -171,4 +171,4 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge';

} catch (e: any) {
this.platform.log.error(`Bulb - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Bulb ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Bulb ${this.accessory.displayName} failed to refresh status, Error Message ${JSON.stringify(e.message)}`);
this.platform.debug(`Bulb ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -175,0 +175,0 @@ }

@@ -213,4 +213,4 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge';

} catch (e: any) {
this.platform.log.error(`Contact - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Contact ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Contact ${this.accessory.displayName} failed to refresh status. Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Contact ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -217,0 +217,0 @@ }

@@ -306,3 +306,2 @@ /* eslint-disable @typescript-eslint/no-var-requires */

try {
this.platform.debug('Curtain - Reading', `${DeviceURL}/${this.device.deviceId}/status`);
this.deviceStatus = (await this.platform.axios.get(`${DeviceURL}/${this.device.deviceId}/status`)).data;

@@ -314,4 +313,4 @@ this.platform.debug(`Curtain ${this.accessory.displayName} refreshStatus: ${JSON.stringify(this.deviceStatus)}`);

} catch (e: any) {
this.platform.log.error(`Curtain - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Curtain ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Curtain ${this.accessory.displayName} failed to refresh status, Eror Message ${JSON.stringify(e.message)}`);
this.platform.debug(`Curtain ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -318,0 +317,0 @@ }

@@ -238,4 +238,4 @@ import { Service, PlatformAccessory, CharacteristicValue } from 'homebridge';

} catch (e: any) {
this.platform.log.error(`Humidifier - Failed to update status of ${this.device.deviceName}: ${JSON.stringify(e.message)}`);
this.platform.debug(`Humidifier ${this.accessory.displayName} ${JSON.stringify(e)}`);
this.platform.log.error(`Humidifier ${this.accessory.displayName}, Failed to update status. Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Humidifier ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -242,0 +242,0 @@ }

@@ -192,3 +192,2 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge';

try {
this.platform.debug('Camera - Reading', `${DeviceURL}/${this.device.deviceId}/status`);
this.deviceStatus = (await this.platform.axios.get(`${DeviceURL}/${this.device.deviceId}/status`)).data;

@@ -199,4 +198,4 @@ this.platform.device(`Camera ${this.accessory.displayName} refreshStatus: ${JSON.stringify(this.deviceStatus)}`);

} catch (e: any) {
this.platform.log.error(`IndoorCam - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`IndoorCam ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`IndoorCam ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`IndoorCam ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -203,0 +202,0 @@ }

@@ -308,4 +308,4 @@ import { Service, PlatformAccessory, Units, CharacteristicValue, MacAddress } from 'homebridge';

} catch (e: any) {
this.platform.log.error(`Meter - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Meter ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Meter ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Meter ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -312,0 +312,0 @@ }

@@ -195,4 +195,4 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge';

} catch (e: any) {
this.platform.log.error(`Motion - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Motion ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Motion ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Motion ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -199,0 +199,0 @@ }

@@ -200,4 +200,4 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge';

} catch (e: any) {
this.platform.log.error(`Plug - Failed to refresh status of ${this.device.deviceName} - ${JSON.stringify(e.message)}`);
this.platform.debug(`Plug ${this.accessory.displayName} - ${JSON.stringify(e)}`);
this.platform.log.error(`Plug ${this.accessory.displayName} failed to refresh status, Error Message: ${JSON.stringify(e.message)}`);
this.platform.debug(`Plug ${this.accessory.displayName}, Error: ${JSON.stringify(e)}`);
this.apiError(e);

@@ -204,0 +204,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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