@switchbot/homebridge-switchbot
Advanced tools
Comparing version 0.1.2-beta.9 to 0.1.2-beta.10
@@ -50,5 +50,20 @@ { | ||
"debug": { | ||
"title": "Debug", | ||
"type": "boolean", | ||
"description": "Turn plugin's debug mode on." | ||
"title": "Logging Setting", | ||
"type": "string", | ||
"description": "Enble 'Device' or 'Debug' logging.", | ||
"oneOf": [ | ||
{ | ||
"title": "Enable Debug Logging", | ||
"enum": [ | ||
"debug" | ||
] | ||
}, | ||
{ | ||
"title": "Enable Device Logging", | ||
"enum": [ | ||
"device" | ||
] | ||
} | ||
], | ||
"required": false | ||
}, | ||
@@ -252,6 +267,2 @@ "ble": { | ||
} | ||
}, | ||
"devicediscovery": { | ||
"name": "Device Discovery", | ||
"type": "boolean" | ||
} | ||
@@ -546,10 +557,2 @@ } | ||
] | ||
}, | ||
{ | ||
"type": "help", | ||
"helpvalue": "<h5>Device Discovery</h5><em class='primary-text'>Enables Device Info Logging.</em>" | ||
}, | ||
{ | ||
"key": "devicediscovery", | ||
"title": "Device Discovery" | ||
} | ||
@@ -556,0 +559,0 @@ ] |
@@ -40,3 +40,3 @@ "use strict"; | ||
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'SwitchBot') | ||
.setCharacteristic(this.platform.Characteristic.Model, device.deviceType) | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-BULB-W1401400') | ||
.setCharacteristic(this.platform.Characteristic.SerialNumber, device.deviceId); | ||
@@ -43,0 +43,0 @@ // get the Television service if it exists, otherwise create a new Television service |
@@ -39,3 +39,3 @@ "use strict"; | ||
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'SwitchBot') | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-CONTACT-') | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-CONTACT-W1201500') | ||
.setCharacteristic(this.platform.Characteristic.SerialNumber, device.deviceId); | ||
@@ -89,3 +89,3 @@ // get the Battery service if it exists, otherwise create a new Contact service | ||
if (this.platform.config.options?.ble?.includes(this.device.deviceId)) { | ||
this.platform.log.warn('BLE DEVICE-REFRESH'); | ||
this.platform.debug('Contact BLE Device RefreshStatus'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
@@ -122,3 +122,3 @@ const Switchbot = require('node-switchbot'); | ||
.startScan({ | ||
mode: 'C', | ||
mode: 'D', | ||
id: bleMac, | ||
@@ -125,0 +125,0 @@ }) |
@@ -87,3 +87,3 @@ "use strict"; | ||
}); | ||
this.platform.log.info(this.device.deviceName + ' current temperature: ' + this.CurrentTemperature + '\u2103'); | ||
//this.platform.log.info(this.device.deviceName + ' current temperature: ' + this.CurrentTemperature + '\u2103'); | ||
} | ||
@@ -115,3 +115,3 @@ else { | ||
}); | ||
this.platform.log.info(this.device.deviceName + ' current humidity: ' + this.CurrentRelativeHumidity + '%'); | ||
//this.platform.log.info(this.device.deviceName + ' current humidity: ' + this.CurrentRelativeHumidity + '%'); | ||
} | ||
@@ -183,3 +183,3 @@ else { | ||
if (this.platform.config.options?.ble?.includes(this.device.deviceId)) { | ||
this.platform.log.warn('BLE DEVICE-REFRESH'); | ||
this.platform.debug('Meter BLE Device RefreshStatus'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
@@ -186,0 +186,0 @@ const Switchbot = require('node-switchbot'); |
@@ -40,3 +40,3 @@ "use strict"; | ||
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'SwitchBot') | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-MOTION-') | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-MOTION-W1101500') | ||
.setCharacteristic(this.platform.Characteristic.SerialNumber, device.deviceId); | ||
@@ -72,8 +72,4 @@ // get the Battery service if it exists, otherwise create a new Motion service | ||
// Set Room Sensor State | ||
if (this.deviceStatus.body.moveDetected) { | ||
this.MotionDetected = true; | ||
} | ||
else { | ||
this.MotionDetected = false; | ||
} | ||
this.MotionDetected = Boolean(this.deviceStatus.body.moveDetected); | ||
this.platform.debug(`${this.accessory.displayName}, MotionDetected: ${this.MotionDetected}`); | ||
} | ||
@@ -85,3 +81,3 @@ /** | ||
if (this.platform.config.options?.ble?.includes(this.device.deviceId)) { | ||
this.platform.log.warn('BLE DEVICE-REFRESH'); | ||
this.platform.debug('Motion BLE Device RefreshStatus'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
@@ -118,3 +114,3 @@ const Switchbot = require('node-switchbot'); | ||
.startScan({ | ||
mode: 'M', | ||
mode: 'S', | ||
id: bleMac, | ||
@@ -121,0 +117,0 @@ }) |
@@ -41,2 +41,3 @@ import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, Service, Characteristic } from 'homebridge'; | ||
private createPlug; | ||
private createIndoorCam; | ||
private createTV; | ||
@@ -43,0 +44,0 @@ private createFan; |
@@ -20,3 +20,2 @@ import { PlatformConfig } from 'homebridge'; | ||
credentials?: credentials; | ||
devicediscovery?: boolean; | ||
options?: options | Record<string, never>; | ||
@@ -31,3 +30,3 @@ } | ||
hide_device: string[]; | ||
debug?: boolean; | ||
debug?: string; | ||
bot?: bot; | ||
@@ -34,0 +33,0 @@ meter?: meter; |
{ | ||
"displayName": "Homebridge SwitchBot", | ||
"name": "@switchbot/homebridge-switchbot", | ||
"version": "0.1.2-beta.9", | ||
"version": "0.1.2-beta.10", | ||
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.", | ||
@@ -52,3 +52,3 @@ "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)", | ||
"rxjs": "^7.3.0", | ||
"node-switchbot": "^1.0.7", | ||
"node-switchbot": "^1.0.8", | ||
"@homebridge/plugin-ui-utils": "^0.0.19" | ||
@@ -55,0 +55,0 @@ }, |
@@ -75,3 +75,3 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'SwitchBot') | ||
.setCharacteristic(this.platform.Characteristic.Model, device.deviceType) | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-BULB-W1401400') | ||
.setCharacteristic(this.platform.Characteristic.SerialNumber, device.deviceId); | ||
@@ -78,0 +78,0 @@ |
@@ -71,3 +71,3 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'SwitchBot') | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-CONTACT-') | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-CONTACT-W1201500') | ||
.setCharacteristic(this.platform.Characteristic.SerialNumber, device.deviceId); | ||
@@ -129,3 +129,3 @@ | ||
if (this.platform.config.options?.ble?.includes(this.device.deviceId!)) { | ||
this.platform.log.warn('BLE DEVICE-REFRESH'); | ||
this.platform.debug('Contact BLE Device RefreshStatus'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
@@ -162,3 +162,3 @@ const Switchbot = require('node-switchbot'); | ||
.startScan({ | ||
mode: 'C', | ||
mode: 'D', | ||
id: bleMac, | ||
@@ -165,0 +165,0 @@ }) |
@@ -134,3 +134,3 @@ import { Service, PlatformAccessory, Units, CharacteristicValue, MacAddress } from 'homebridge'; | ||
}); | ||
this.platform.log.info(this.device.deviceName + ' current temperature: ' + this.CurrentTemperature + '\u2103'); | ||
//this.platform.log.info(this.device.deviceName + ' current temperature: ' + this.CurrentTemperature + '\u2103'); | ||
} else { | ||
@@ -162,3 +162,3 @@ if (this.platform.config.options?.debug) { | ||
}); | ||
this.platform.log.info(this.device.deviceName + ' current humidity: ' + this.CurrentRelativeHumidity + '%'); | ||
//this.platform.log.info(this.device.deviceName + ' current humidity: ' + this.CurrentRelativeHumidity + '%'); | ||
} else { | ||
@@ -228,3 +228,3 @@ if (this.platform.config.options?.debug) { | ||
if (this.platform.config.options?.ble?.includes(this.device.deviceId!)) { | ||
this.platform.log.warn('BLE DEVICE-REFRESH'); | ||
this.platform.debug('Meter BLE Device RefreshStatus'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
@@ -231,0 +231,0 @@ const Switchbot = require('node-switchbot'); |
@@ -72,3 +72,3 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'SwitchBot') | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-MOTION-') | ||
.setCharacteristic(this.platform.Characteristic.Model, 'SWITCHBOT-MOTION-W1101500') | ||
.setCharacteristic(this.platform.Characteristic.SerialNumber, device.deviceId); | ||
@@ -112,7 +112,4 @@ | ||
// Set Room Sensor State | ||
if (this.deviceStatus.body.moveDetected) { | ||
this.MotionDetected = true; | ||
} else { | ||
this.MotionDetected = false; | ||
} | ||
this.MotionDetected = Boolean(this.deviceStatus.body.moveDetected); | ||
this.platform.debug(`${this.accessory.displayName}, MotionDetected: ${this.MotionDetected}`); | ||
} | ||
@@ -125,3 +122,3 @@ | ||
if (this.platform.config.options?.ble?.includes(this.device.deviceId!)) { | ||
this.platform.log.warn('BLE DEVICE-REFRESH'); | ||
this.platform.debug('Motion BLE Device RefreshStatus'); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
@@ -158,3 +155,3 @@ const Switchbot = require('node-switchbot'); | ||
.startScan({ | ||
mode: 'M', | ||
mode: 'S', | ||
id: bleMac, | ||
@@ -161,0 +158,0 @@ }) |
@@ -25,3 +25,2 @@ import { PlatformConfig } from 'homebridge'; | ||
credentials?: credentials; | ||
devicediscovery?: boolean; | ||
options?: options | Record<string, never>; | ||
@@ -38,3 +37,3 @@ } | ||
hide_device: string[]; | ||
debug?: boolean; | ||
debug?: string; | ||
bot?: bot; | ||
@@ -41,0 +40,0 @@ meter?: meter; |
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 not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1103600
134
13699
Updatednode-switchbot@^1.0.8