homebridge-multiple-switch 1.1.3 → 1.1.4
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/README.md +70 -17
- package/package.json +15 -2
package/README.md
CHANGED
|
@@ -1,17 +1,70 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
# homebridge-multiple-switch
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/homebridge-multiple-switch)
|
|
4
|
+
[](https://github.com/azadaydinli/homebridge-multiple-switch/issues)
|
|
5
|
+
[](https://github.com/azadaydinli/homebridge-multiple-switch/blob/master/LICENSE)
|
|
6
|
+
|
|
7
|
+
A lightweight Homebridge plugin that lets you create multiple customizable dummy switches (Outlet/Fan/Light/Switch) with different behavior modes including Independent, Master, and Single-Switch Mode.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## ✨ Features
|
|
12
|
+
|
|
13
|
+
- Multiple switches in a single accessory
|
|
14
|
+
- Each switch can be `switch`, `outlet`, `lightbulb`, or `fan`
|
|
15
|
+
- **Independent Mode** – all switches work separately
|
|
16
|
+
- **Master Mode** – adds a master switch that controls all other switches
|
|
17
|
+
- **Single Mode** – only one switch can be on at any time
|
|
18
|
+
- Auto turn-off (in milliseconds)
|
|
19
|
+
- Works seamlessly with HomeKit and Siri
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 📦 Installation
|
|
24
|
+
|
|
25
|
+
Install the plugin via the Homebridge UI:
|
|
26
|
+
|
|
27
|
+
1. Go to **Plugins**
|
|
28
|
+
2. Search for `homebridge-multiple-switch`
|
|
29
|
+
3. Click **Install**
|
|
30
|
+
|
|
31
|
+
Or use the command line:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install -g homebridge-multiple-switch
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## ⚙️ Configuration
|
|
40
|
+
|
|
41
|
+
You can configure the plugin directly via the Homebridge UI, or manually in config.json:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
{
|
|
45
|
+
"accessory": "MultipleSwitchAccessory",
|
|
46
|
+
"name": "My Multi Switch",
|
|
47
|
+
"switchCount": 3,
|
|
48
|
+
"type": "outlet",
|
|
49
|
+
"mode": "independent",
|
|
50
|
+
"autoTurnOff": 1000,
|
|
51
|
+
"defaultState": false,
|
|
52
|
+
"states": [
|
|
53
|
+
{ "type": "switch", "autoTurnOff": 3000 },
|
|
54
|
+
{ "type": "fan" },
|
|
55
|
+
{ "type": "lightbulb", "defaultState": true }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 🔧 Configuration Options
|
|
61
|
+
|
|
62
|
+
| Field | Type | Required | Description |
|
|
63
|
+
|---------------|---------|----------|-----------------------------------------------------------------------------|
|
|
64
|
+
| `name` | string | ✅ | Name of the accessory |
|
|
65
|
+
| `switchCount` | number | ✅ | Number of switches to create (max depends on HomeKit limits) |
|
|
66
|
+
| `type` | string | ❌ | Default type: `switch`, `outlet`, `lightbulb`, or `fan` |
|
|
67
|
+
| `mode` | string | ❌ | `independent`, `master`, or `single` |
|
|
68
|
+
| `autoTurnOff` | number | ❌ | Global auto-off in milliseconds |
|
|
69
|
+
| `defaultState`| boolean | ❌ | Default on/off state on restart |
|
|
70
|
+
| `states` | array | ❌ | Per-switch custom settings (overrides global config) |
|
package/package.json
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-multiple-switch",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Multiple switch accessory for Homebridge",
|
|
5
|
+
"homepage": "https://github.com/azadaydinli/homebridge-multiple-switch",
|
|
5
6
|
"main": "index.js",
|
|
6
7
|
"author": "Azad Aydınlı",
|
|
7
8
|
"license": "ISC",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/azadaydinli/homebridge-multiple-switch/issues"
|
|
11
|
+
},
|
|
8
12
|
"keywords": [
|
|
9
|
-
"homebridge-plugin"
|
|
13
|
+
"homebridge-plugin",
|
|
14
|
+
"homebridge",
|
|
15
|
+
"homekit",
|
|
16
|
+
"switch",
|
|
17
|
+
"outlet",
|
|
18
|
+
"lightbulb",
|
|
19
|
+
"fan",
|
|
20
|
+
"dummy",
|
|
21
|
+
"multiple",
|
|
22
|
+
"accessory"
|
|
10
23
|
],
|
|
11
24
|
"repository": {
|
|
12
25
|
"type": "git",
|