@switchbot/homebridge-switchbot 4.1.8-beta.7 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build.yml +1 -1
- package/CHANGELOG.md +18 -0
- package/config.schema.json +980 -106
- package/dist/device/blindtilt.js +1 -1
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.js +1 -1
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.js +1 -1
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.js +1 -1
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.js +1 -1
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.js +1 -1
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +19 -1
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.js +1 -1
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.js +1 -1
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.js +1 -1
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.js +1 -1
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.js +1 -1
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.js +1 -1
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.js +1 -1
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.js +1 -1
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/meterpro.js +2 -2
- package/dist/device/meterpro.js.map +1 -1
- package/dist/device/motion.js +1 -1
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.js +1 -1
- package/dist/device/plug.js.map +1 -1
- package/dist/device/relayswitch.d.ts +96 -0
- package/dist/device/relayswitch.d.ts.map +1 -0
- package/dist/device/relayswitch.js +650 -0
- package/dist/device/relayswitch.js.map +1 -0
- package/dist/device/robotvacuumcleaner.js +1 -1
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.js +1 -1
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/platform.d.ts +1 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +64 -0
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +12 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +2 -0
- package/dist/settings.js.map +1 -1
- package/docs/functions/default.html +1 -1
- package/package.json +12 -12
- package/src/device/blindtilt.ts +2 -2
- package/src/device/bot.ts +1 -1
- package/src/device/ceilinglight.ts +1 -1
- package/src/device/colorbulb.ts +1 -1
- package/src/device/contact.ts +1 -1
- package/src/device/curtain.ts +2 -2
- package/src/device/device.ts +20 -1
- package/src/device/fan.ts +1 -1
- package/src/device/hub.ts +1 -1
- package/src/device/humidifier.ts +1 -1
- package/src/device/iosensor.ts +1 -1
- package/src/device/lightstrip.ts +1 -1
- package/src/device/lock.ts +1 -1
- package/src/device/meter.ts +1 -1
- package/src/device/meterplus.ts +1 -1
- package/src/device/meterpro.ts +2 -2
- package/src/device/motion.ts +1 -1
- package/src/device/plug.ts +1 -1
- package/src/device/relayswitch.ts +733 -0
- package/src/device/robotvacuumcleaner.ts +1 -1
- package/src/device/waterdetector.ts +1 -1
- package/src/platform.ts +68 -3
- package/src/settings.ts +14 -1
- package/.github/npm-version-script.cjs +0 -81
package/dist/settings.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export interface options {
|
|
|
44
44
|
pushRate?: number;
|
|
45
45
|
logging?: string;
|
|
46
46
|
}
|
|
47
|
-
export type devicesConfig = botConfig | meterConfig | meterProConfig | indoorOutdoorSensorConfig | humidifierConfig | curtainConfig | blindTiltConfig | contactConfig | motionConfig | waterDetectorConfig | plugConfig | colorBulbConfig | stripLightConfig | ceilingLightConfig | lockConfig | hubConfig;
|
|
47
|
+
export type devicesConfig = botConfig | relaySwitch1Config | relaySwitch1PMConfig | meterConfig | meterProConfig | indoorOutdoorSensorConfig | humidifierConfig | curtainConfig | blindTiltConfig | contactConfig | motionConfig | waterDetectorConfig | plugConfig | colorBulbConfig | stripLightConfig | ceilingLightConfig | lockConfig | hubConfig;
|
|
48
48
|
export interface BaseDeviceConfig extends device {
|
|
49
49
|
bleMac?: string;
|
|
50
50
|
model: SwitchBotModel;
|
|
@@ -69,6 +69,7 @@ export interface BaseDeviceConfig extends device {
|
|
|
69
69
|
maxRetries?: number;
|
|
70
70
|
delayBetweenRetries?: number;
|
|
71
71
|
disableCaching?: boolean;
|
|
72
|
+
disablePlatformBLE?: boolean;
|
|
72
73
|
mqttURL?: string;
|
|
73
74
|
mqttOptions?: IClientOptions;
|
|
74
75
|
mqttPubOptions?: IClientOptions;
|
|
@@ -84,6 +85,16 @@ export interface botConfig extends BaseDeviceConfig {
|
|
|
84
85
|
allowPush?: boolean;
|
|
85
86
|
multiPress?: boolean;
|
|
86
87
|
}
|
|
88
|
+
export interface relaySwitch1Config extends BaseDeviceConfig {
|
|
89
|
+
configDeviceType: 'Relay Switch 1';
|
|
90
|
+
type: string;
|
|
91
|
+
allowPush?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface relaySwitch1PMConfig extends BaseDeviceConfig {
|
|
94
|
+
configDeviceType: 'Relay Switch 1PM';
|
|
95
|
+
type: string;
|
|
96
|
+
allowPush?: boolean;
|
|
97
|
+
}
|
|
87
98
|
export interface meterConfig extends BaseDeviceConfig {
|
|
88
99
|
configDeviceType: 'Meter' | 'MeterPlus';
|
|
89
100
|
hide_temperature?: boolean;
|
package/dist/settings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAKhD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,i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AY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD,gBAAgB,CAAC,EAAE,QAAQ,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"}
|
package/dist/settings.js
CHANGED
package/dist/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAA;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,iCAAiC,CAAA;AAkC3D,CAAC;
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAA;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,iCAAiC,CAAA;AAkC3D,CAAC;AA4CD,CAAC;AAMD,CAAC;AAMD,CAAC;AAOD,CAAC;AAQD,CAAC;AAOD,CAAC;AAOD,CAAC;AAcD,CAAC;AAeD,CAAC;AAQD,CAAC;AAOD,CAAC;AAMD,CAAC;AAID,CAAC;AAMD,CAAC;AAMD,CAAC;AAMD,CAAC;AAMD,CAAC;AAUD,CAAC;AAkCD,CAAC;AAKD,CAAC;AAYD,CAAC;AAKD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><style>body { visibility: hidden; }</style><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="IE=edge"><title>default | @switchbot/homebridge-switchbot</title><meta name="description" content="Documentation for @switchbot/homebridge-switchbot"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="../assets/style.css"><link rel="stylesheet" href="../assets/highlight.css"><script defer="" src="../assets/main.js"></script><script async="" src="../assets/icons.js" id="tsd-icons-script"></script><link rel="stylesheet" href="../assets/dmt/dmt-components.css"><link rel="stylesheet" href="../assets/dmt/dmt-theme.css"><script src="../assets/dmt/dmt-components.js" type="module"></script><noscript><style>body { visibility: visible; }</style></noscript></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";</script><div class="overlay"></div>
|
|
2
|
-
<main><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field" id="dmt-search-main"></div><div class="field" id="dmt-toolbar"><a href="../index.html" class="title">@switchbot/homebridge-switchbot</a></div></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main" tabindex="-1"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"></ul><div class="dmt-title-header-flex"><h1>Function default</h1></div></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="default" class="tsd-anchor"></a><span class="tsd-kind-call-signature">default</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">api</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">API</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">api</span>: <span class="tsd-signature-type">API</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/homebridge-switchbot/blob/
|
|
2
|
+
<main><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field" id="dmt-search-main"></div><div class="field" id="dmt-toolbar"><a href="../index.html" class="title">@switchbot/homebridge-switchbot</a></div></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main" tabindex="-1"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"></ul><div class="dmt-title-header-flex"><h1>Function default</h1></div></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="default" class="tsd-anchor"></a><span class="tsd-kind-call-signature">default</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">api</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">API</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">api</span>: <span class="tsd-signature-type">API</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/homebridge-switchbot/blob/abfe2c6dc7dc16c7c8535c49456cd274fb084561/src/index.ts#L11">index.ts:11</a></li></ul></aside></li></ul></section></div><div class="col-sidebar" tabindex="-1"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked=""><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu" tabindex="-1"><nav class="tsd-navigation"><a href="../modules.html">@switchbot/homebridge-switchbot</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"></ul></nav></div></div></div></main></body></html>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@switchbot/homebridge-switchbot",
|
|
3
3
|
"displayName": "SwitchBot",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.3.0",
|
|
6
6
|
"description": "The SwitchBot plugin allows you to access your SwitchBot device(s) from HomeKit.",
|
|
7
7
|
"author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",
|
|
8
8
|
"contributors": [
|
|
@@ -79,34 +79,34 @@
|
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@homebridge/plugin-ui-utils": "^2.0.
|
|
82
|
+
"@homebridge/plugin-ui-utils": "^2.0.1",
|
|
83
83
|
"async-mqtt": "^2.6.3",
|
|
84
84
|
"fakegato-history": "^0.6.5",
|
|
85
|
-
"homebridge-lib": "^7.1.
|
|
86
|
-
"node-switchbot": "^3.4.
|
|
85
|
+
"homebridge-lib": "^7.1.2",
|
|
86
|
+
"node-switchbot": "^3.4.9",
|
|
87
87
|
"rxjs": "^7.8.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@antfu/eslint-config": "^3.
|
|
90
|
+
"@antfu/eslint-config": "^3.16.0",
|
|
91
91
|
"@types/aes-js": "^3.1.4",
|
|
92
92
|
"@types/debug": "^4.1.12",
|
|
93
93
|
"@types/fs-extra": "^11.0.4",
|
|
94
94
|
"@types/mdast": "^4.0.4",
|
|
95
|
-
"@types/node": "^22.10.
|
|
95
|
+
"@types/node": "^22.10.7",
|
|
96
96
|
"@types/semver": "^7.5.8",
|
|
97
97
|
"@types/source-map-support": "^0.5.10",
|
|
98
98
|
"@typhonjs-typedoc/typedoc-theme-dmt": "^0.3.1",
|
|
99
|
-
"@vitest/coverage-v8": "^
|
|
100
|
-
"eslint": "^9.
|
|
101
|
-
"eslint-plugin-format": "^0.1
|
|
99
|
+
"@vitest/coverage-v8": "^3.0.0",
|
|
100
|
+
"eslint": "^9.18.0",
|
|
101
|
+
"eslint-plugin-format": "^1.0.1",
|
|
102
102
|
"homebridge": "^1.8.5",
|
|
103
|
-
"homebridge-config-ui-x": "4.
|
|
103
|
+
"homebridge-config-ui-x": "4.68.0",
|
|
104
104
|
"nodemon": "^3.1.9",
|
|
105
105
|
"shx": "^0.3.4",
|
|
106
106
|
"ts-node": "^10.9.2",
|
|
107
107
|
"typedoc": "^0.27.6",
|
|
108
|
-
"typescript": "^5.7.
|
|
109
|
-
"vitest": "^
|
|
108
|
+
"typescript": "^5.7.3",
|
|
109
|
+
"vitest": "^3.0.0"
|
|
110
110
|
},
|
|
111
111
|
"directories": {
|
|
112
112
|
"doc": "docs"
|
package/src/device/blindtilt.ts
CHANGED
|
@@ -484,7 +484,7 @@ export class BlindTilt extends deviceBase {
|
|
|
484
484
|
|
|
485
485
|
async registerPlatformBLE(): Promise<void> {
|
|
486
486
|
this.debugLog('registerPlatformBLE')
|
|
487
|
-
if (this.config.options?.BLE) {
|
|
487
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
488
488
|
this.debugLog('is listening to Platform BLE.')
|
|
489
489
|
try {
|
|
490
490
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
|
@@ -623,7 +623,7 @@ export class BlindTilt extends deviceBase {
|
|
|
623
623
|
this.debugLog('openAPIpushChanges')
|
|
624
624
|
const hasDifferentAndRelevantHorizontalTiltAngle
|
|
625
625
|
= this.mappingMode === BlindTiltMappingMode.UseTiltForDirection
|
|
626
|
-
|
|
626
|
+
&& this.WindowCovering.TargetHorizontalTiltAngle !== this.WindowCovering.CurrentHorizontalTiltAngle
|
|
627
627
|
if (this.WindowCovering.TargetPosition !== this.WindowCovering.CurrentPosition
|
|
628
628
|
|| hasDifferentAndRelevantHorizontalTiltAngle || this.device.disableCaching) {
|
|
629
629
|
const [direction, position] = this.mapHomekitValuesToDeviceValues(Number(this.WindowCovering.TargetPosition), Number(this.WindowCovering.TargetHorizontalTiltAngle))
|
package/src/device/bot.ts
CHANGED
|
@@ -400,7 +400,7 @@ export class Bot extends deviceBase {
|
|
|
400
400
|
|
|
401
401
|
async registerPlatformBLE(): Promise<void> {
|
|
402
402
|
this.debugLog('registerPlatformBLE')
|
|
403
|
-
if (this.config.options?.BLE) {
|
|
403
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
404
404
|
this.debugLog('is listening to Platform BLE.')
|
|
405
405
|
try {
|
|
406
406
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
|
@@ -310,7 +310,7 @@ export class CeilingLight extends deviceBase {
|
|
|
310
310
|
|
|
311
311
|
async registerPlatformBLE(): Promise<void> {
|
|
312
312
|
this.debugLog('registerPlatformBLE')
|
|
313
|
-
if (this.config.options?.BLE) {
|
|
313
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
314
314
|
this.debugLog('is listening to Platform BLE.')
|
|
315
315
|
try {
|
|
316
316
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/colorbulb.ts
CHANGED
|
@@ -345,7 +345,7 @@ export class ColorBulb extends deviceBase {
|
|
|
345
345
|
|
|
346
346
|
async registerPlatformBLE(): Promise<void> {
|
|
347
347
|
this.debugLog('registerPlatformBLE')
|
|
348
|
-
if (this.config.options?.BLE) {
|
|
348
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
349
349
|
this.debugLog('is listening to Platform BLE.')
|
|
350
350
|
try {
|
|
351
351
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/contact.ts
CHANGED
|
@@ -326,7 +326,7 @@ export class Contact extends deviceBase {
|
|
|
326
326
|
|
|
327
327
|
async registerPlatformBLE(): Promise<void> {
|
|
328
328
|
this.debugLog('registerPlatformBLE')
|
|
329
|
-
if (this.config.options?.BLE) {
|
|
329
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
330
330
|
this.debugLog('is listening to Platform BLE.')
|
|
331
331
|
try {
|
|
332
332
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/curtain.ts
CHANGED
|
@@ -333,7 +333,7 @@ export class Curtain extends deviceBase {
|
|
|
333
333
|
})
|
|
334
334
|
const motion: Service
|
|
335
335
|
= this.accessory.getService(this.hap.Service.MotionSensor)
|
|
336
|
-
|
|
336
|
+
|| this.accessory.addService(this.hap.Service.MotionSensor, 'Motion')
|
|
337
337
|
motion.addOptionalCharacteristic(this.platform.eve.Characteristics.LastActivation)
|
|
338
338
|
motion.getCharacteristic(this.platform.eve.Characteristics.LastActivation).onGet(() => {
|
|
339
339
|
const lastActivation = this.accessory.context.lastActivation
|
|
@@ -553,7 +553,7 @@ export class Curtain extends deviceBase {
|
|
|
553
553
|
|
|
554
554
|
async registerPlatformBLE(): Promise<void> {
|
|
555
555
|
this.debugLog('registerPlatformBLE')
|
|
556
|
-
if (this.config.options?.BLE) {
|
|
556
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
557
557
|
this.debugLog('is listening to Platform BLE.')
|
|
558
558
|
try {
|
|
559
559
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/device.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { MqttClient } from 'mqtt'
|
|
|
8
8
|
import type { ad, bodyChange, device, deviceStatus, deviceStatusRequest, pushResponse, SwitchBotBLE } from 'node-switchbot'
|
|
9
9
|
|
|
10
10
|
import type { SwitchBotPlatform } from '../platform.js'
|
|
11
|
-
import type { blindTiltConfig, botConfig, ceilingLightConfig, colorBulbConfig, contactConfig, curtainConfig, devicesConfig, hubConfig, humidifierConfig, indoorOutdoorSensorConfig, lockConfig, meterConfig, motionConfig, plugConfig, stripLightConfig, SwitchBotPlatformConfig, waterDetectorConfig } from '../settings.js'
|
|
11
|
+
import type { blindTiltConfig, botConfig, ceilingLightConfig, colorBulbConfig, contactConfig, curtainConfig, devicesConfig, hubConfig, humidifierConfig, indoorOutdoorSensorConfig, lockConfig, meterConfig, motionConfig, plugConfig, relaySwitch1Config, relaySwitch1PMConfig, stripLightConfig, SwitchBotPlatformConfig, waterDetectorConfig } from '../settings.js'
|
|
12
12
|
|
|
13
13
|
import { hostname } from 'node:os'
|
|
14
14
|
|
|
@@ -149,6 +149,7 @@ export abstract class deviceBase {
|
|
|
149
149
|
device.maxRetry !== 0 && { maxRetry: device.maxRetry },
|
|
150
150
|
device.webhook === true && { webhook: device.webhook },
|
|
151
151
|
device.connectionType !== '' && { connectionType: device.connectionType },
|
|
152
|
+
device.disablePlatformBLE !== false && { disablePlatformBLE: device.disablePlatformBLE },
|
|
152
153
|
device.external === true && { external: device.external },
|
|
153
154
|
device.mqttURL !== '' && { mqttURL: device.mqttURL },
|
|
154
155
|
device.mqttOptions && { mqttOptions: device.mqttOptions },
|
|
@@ -161,6 +162,12 @@ export abstract class deviceBase {
|
|
|
161
162
|
case 'Bot':
|
|
162
163
|
deviceSpecificConfig = device as botConfig
|
|
163
164
|
break
|
|
165
|
+
case 'Relay Switch 1':
|
|
166
|
+
deviceSpecificConfig = device as relaySwitch1Config
|
|
167
|
+
break
|
|
168
|
+
case 'Relay Switch 1PM':
|
|
169
|
+
deviceSpecificConfig = device as relaySwitch1PMConfig
|
|
170
|
+
break
|
|
164
171
|
case 'Meter':
|
|
165
172
|
case 'MeterPlus':
|
|
166
173
|
deviceSpecificConfig = device as meterConfig
|
|
@@ -445,6 +452,18 @@ export abstract class deviceBase {
|
|
|
445
452
|
bleModelName: SwitchBotBLEModelName.Bot,
|
|
446
453
|
bleModelFriendlyName: SwitchBotBLEModelFriendlyName.Bot,
|
|
447
454
|
},
|
|
455
|
+
'Relay Switch 1': {
|
|
456
|
+
model: SwitchBotModel.RelaySwitch1,
|
|
457
|
+
bleModel: SwitchBotBLEModel.RelaySwitch1,
|
|
458
|
+
bleModelName: SwitchBotBLEModelName.RelaySwitch1,
|
|
459
|
+
bleModelFriendlyName: SwitchBotBLEModelFriendlyName.RelaySwitch1,
|
|
460
|
+
},
|
|
461
|
+
'Relay Switch 1PM': {
|
|
462
|
+
model: SwitchBotModel.RelaySwitch1PM,
|
|
463
|
+
bleModel: SwitchBotBLEModel.RelaySwitch1PM,
|
|
464
|
+
bleModelName: SwitchBotBLEModelName.RelaySwitch1PM,
|
|
465
|
+
bleModelFriendlyName: SwitchBotBLEModelFriendlyName.RelaySwitch1PM,
|
|
466
|
+
},
|
|
448
467
|
'Meter': {
|
|
449
468
|
model: SwitchBotModel.Meter,
|
|
450
469
|
bleModel: SwitchBotBLEModel.Meter,
|
package/src/device/fan.ts
CHANGED
|
@@ -348,7 +348,7 @@ export class Fan extends deviceBase {
|
|
|
348
348
|
|
|
349
349
|
async registerPlatformBLE(): Promise<void> {
|
|
350
350
|
this.debugLog('registerPlatformBLE')
|
|
351
|
-
if (this.config.options?.BLE) {
|
|
351
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
352
352
|
this.debugLog('is listening to Platform BLE.')
|
|
353
353
|
try {
|
|
354
354
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/hub.ts
CHANGED
|
@@ -315,7 +315,7 @@ export class Hub extends deviceBase {
|
|
|
315
315
|
|
|
316
316
|
async registerPlatformBLE(): Promise<void> {
|
|
317
317
|
this.debugLog('registerPlatformBLE')
|
|
318
|
-
if (this.config.options?.BLE) {
|
|
318
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
319
319
|
this.debugLog('is listening to Platform BLE.')
|
|
320
320
|
try {
|
|
321
321
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/humidifier.ts
CHANGED
|
@@ -345,7 +345,7 @@ export class Humidifier extends deviceBase {
|
|
|
345
345
|
|
|
346
346
|
async registerPlatformBLE(): Promise<void> {
|
|
347
347
|
this.debugLog('registerPlatformBLE')
|
|
348
|
-
if (this.config.options?.BLE) {
|
|
348
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
349
349
|
this.debugLog('is listening to Platform BLE.')
|
|
350
350
|
try {
|
|
351
351
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/iosensor.ts
CHANGED
|
@@ -309,7 +309,7 @@ export class IOSensor extends deviceBase {
|
|
|
309
309
|
|
|
310
310
|
async registerPlatformBLE(): Promise<void> {
|
|
311
311
|
this.debugLog('registerPlatformBLE')
|
|
312
|
-
if (this.config.options?.BLE) {
|
|
312
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
313
313
|
this.debugLog('is listening to Platform BLE.')
|
|
314
314
|
try {
|
|
315
315
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -347,7 +347,7 @@ export class StripLight extends deviceBase {
|
|
|
347
347
|
|
|
348
348
|
async registerPlatformBLE(): Promise<void> {
|
|
349
349
|
this.debugLog('registerPlatformBLE')
|
|
350
|
-
if (this.config.options?.BLE) {
|
|
350
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
351
351
|
this.debugLog('is listening to Platform BLE.')
|
|
352
352
|
try {
|
|
353
353
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/lock.ts
CHANGED
|
@@ -351,7 +351,7 @@ export class Lock extends deviceBase {
|
|
|
351
351
|
|
|
352
352
|
async registerPlatformBLE(): Promise<void> {
|
|
353
353
|
this.debugLog('registerPlatformBLE')
|
|
354
|
-
if (this.config.options?.BLE) {
|
|
354
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
355
355
|
this.debugLog('is listening to Platform BLE.')
|
|
356
356
|
try {
|
|
357
357
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/meter.ts
CHANGED
|
@@ -306,7 +306,7 @@ export class Meter extends deviceBase {
|
|
|
306
306
|
|
|
307
307
|
async registerPlatformBLE(): Promise<void> {
|
|
308
308
|
this.debugLog('registerPlatformBLE')
|
|
309
|
-
if (this.config.options?.BLE) {
|
|
309
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
310
310
|
this.debugLog('is listening to Platform BLE.')
|
|
311
311
|
try {
|
|
312
312
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/meterplus.ts
CHANGED
|
@@ -310,7 +310,7 @@ export class MeterPlus extends deviceBase {
|
|
|
310
310
|
|
|
311
311
|
async registerPlatformBLE(): Promise<void> {
|
|
312
312
|
this.debugLog('registerPlatformBLE')
|
|
313
|
-
if (this.config.options?.BLE) {
|
|
313
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
314
314
|
this.debugLog('is listening to Platform BLE.')
|
|
315
315
|
try {
|
|
316
316
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/meterpro.ts
CHANGED
|
@@ -280,7 +280,7 @@ export class MeterPro extends deviceBase {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
// Battery Info
|
|
283
|
-
if ('battery' in this.
|
|
283
|
+
if ('battery' in this.deviceStatus) {
|
|
284
284
|
// BatteryLevel
|
|
285
285
|
this.Battery.BatteryLevel = this.deviceStatus.battery
|
|
286
286
|
this.debugLog(`BatteryLevel: ${this.Battery.BatteryLevel}`)
|
|
@@ -386,7 +386,7 @@ export class MeterPro extends deviceBase {
|
|
|
386
386
|
|
|
387
387
|
async registerPlatformBLE(): Promise<void> {
|
|
388
388
|
this.debugLog('registerPlatformBLE')
|
|
389
|
-
if (this.config.options?.BLE) {
|
|
389
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
390
390
|
this.debugLog('is listening to Platform BLE.')
|
|
391
391
|
try {
|
|
392
392
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/motion.ts
CHANGED
|
@@ -281,7 +281,7 @@ export class Motion extends deviceBase {
|
|
|
281
281
|
|
|
282
282
|
async registerPlatformBLE(): Promise<void> {
|
|
283
283
|
this.debugLog('registerPlatformBLE')
|
|
284
|
-
if (this.config.options?.BLE) {
|
|
284
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
285
285
|
this.debugLog('is listening to Platform BLE.')
|
|
286
286
|
try {
|
|
287
287
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|
package/src/device/plug.ts
CHANGED
|
@@ -206,7 +206,7 @@ export class Plug extends deviceBase {
|
|
|
206
206
|
|
|
207
207
|
async registerPlatformBLE(): Promise<void> {
|
|
208
208
|
this.debugLog('registerPlatformBLE')
|
|
209
|
-
if (this.config.options?.BLE) {
|
|
209
|
+
if (this.config.options?.BLE && !this.device.disablePlatformBLE) {
|
|
210
210
|
this.debugLog('is listening to Platform BLE.')
|
|
211
211
|
try {
|
|
212
212
|
const formattedDeviceId = formatDeviceIdAsMac(this.device.deviceId)
|