homebridge-kasa-python 2.0.0 → 2.1.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/README.md +2 -1
- package/config.schema.json +1 -76
- package/dist/config.d.ts +0 -8
- package/dist/config.js +0 -6
- package/dist/config.js.map +1 -1
- package/package.json +14 -14
- package/requirements.txt +3 -3
package/README.md
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
<a href="https://www.npmjs.com/package/homebridge-kasa-python"><img src="https://badgen.net/npm/dm/homebridge-kasa-python" alt="npm downloads monthly"></a>
|
|
18
18
|
<a href="https://www.paypal.me/ZeliardM/USD/"><img src="https://badgen.net/badge/donate/paypal/E69138" alt="donate"></a>
|
|
19
19
|
<a href="https://github.com/sponsors/ZeliardM"><img src="https://badgen.net/badge/donate/github/E69138" alt="donate"></a>
|
|
20
|
-
<a href="https://pypi.org/project/python-kasa/"><img src="https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue" alt="PyPI pyversions"></a>
|
|
20
|
+
<a href="https://pypi.org/project/python-kasa/"><img src="https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue" alt="PyPI pyversions"></a>
|
|
21
|
+
<a href="https://github.com/homebridge/homebridge/wiki/Verified-Plugins"><img src="https://badgen.net/badge/homebridge/verified/purple" alt="homebridge verified"></a>
|
|
21
22
|
</p>
|
|
22
23
|
|
|
23
24
|
<div align="center">
|
package/config.schema.json
CHANGED
|
@@ -44,43 +44,6 @@
|
|
|
44
44
|
"description": "How often to check device status in the background (seconds)",
|
|
45
45
|
"placeholder": "5"
|
|
46
46
|
},
|
|
47
|
-
"includeMacAddresses": {
|
|
48
|
-
"title": "Include MAC Addresses",
|
|
49
|
-
"description": "Allow-list of MAC Addresses to include. If specified will ignore other devices. Supports glob-style patterns",
|
|
50
|
-
"type": "array",
|
|
51
|
-
"items": {
|
|
52
|
-
"title": "MAC Address",
|
|
53
|
-
"type": "string",
|
|
54
|
-
"required": true
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"excludeMacAddresses": {
|
|
58
|
-
"title": "Exclude MAC Addresses",
|
|
59
|
-
"description": "Deny-list of MAC Addresses to exclude. Supports glob-style patterns",
|
|
60
|
-
"type": "array",
|
|
61
|
-
"items": {
|
|
62
|
-
"title": "MAC Address",
|
|
63
|
-
"type": "string",
|
|
64
|
-
"required": true
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"devices": {
|
|
68
|
-
"title": "Manual List of Devices",
|
|
69
|
-
"type": "array",
|
|
70
|
-
"items": {
|
|
71
|
-
"title": "Device",
|
|
72
|
-
"type": "object",
|
|
73
|
-
"properties": {
|
|
74
|
-
"host": {
|
|
75
|
-
"title": "Host",
|
|
76
|
-
"type": "string",
|
|
77
|
-
"required": true,
|
|
78
|
-
"placeholder": "192.168.1.1",
|
|
79
|
-
"format": "ipv4"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
47
|
"forceVenvRecreate": {
|
|
85
48
|
"title": "Force Venv Recreation",
|
|
86
49
|
"type": "boolean",
|
|
@@ -127,45 +90,7 @@
|
|
|
127
90
|
"description": "Customize device discovery",
|
|
128
91
|
"expandable": true,
|
|
129
92
|
"items": [
|
|
130
|
-
"pollingInterval"
|
|
131
|
-
{
|
|
132
|
-
"key": "includeMacAddresses",
|
|
133
|
-
"type": "array",
|
|
134
|
-
"buttonText": "Add MAC Address",
|
|
135
|
-
"items": {
|
|
136
|
-
"title": "Include MAC Address",
|
|
137
|
-
"type": "string",
|
|
138
|
-
"required": true
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"key": "excludeMacAddresses",
|
|
143
|
-
"type": "array",
|
|
144
|
-
"buttonText": "Add MAC Address",
|
|
145
|
-
"items": {
|
|
146
|
-
"title": "Exclude MAC Address",
|
|
147
|
-
"type": "string",
|
|
148
|
-
"required": true
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"type": "fieldset",
|
|
153
|
-
"title": "Manual Discovery",
|
|
154
|
-
"description": "If automatic discovery is not working, try this.",
|
|
155
|
-
"expandable": true,
|
|
156
|
-
"items": [
|
|
157
|
-
{
|
|
158
|
-
"key": "devices",
|
|
159
|
-
"type": "array",
|
|
160
|
-
"buttonText": "Add Device",
|
|
161
|
-
"items": ["devices[].host"]
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"type": "help",
|
|
165
|
-
"helpvalue": "Before resorting to manually specifying devices, try setting the broadcast address and check your router/switch/firewall configuration. You must assign static IP addresses to your devices to use this configuration."
|
|
166
|
-
}
|
|
167
|
-
]
|
|
168
|
-
}
|
|
93
|
+
"pollingInterval"
|
|
169
94
|
]
|
|
170
95
|
},
|
|
171
96
|
{
|
package/dist/config.d.ts
CHANGED
|
@@ -15,9 +15,6 @@ export interface KasaPythonConfigInput {
|
|
|
15
15
|
password?: string;
|
|
16
16
|
powerStrip?: boolean;
|
|
17
17
|
pollingInterval?: number;
|
|
18
|
-
includeMacAddress?: Array<string>;
|
|
19
|
-
excludeMacAddresses?: Array<string>;
|
|
20
|
-
devices?: Array<DeviceConfigInput>;
|
|
21
18
|
forceVenvRecreate?: boolean;
|
|
22
19
|
pythonExecutable?: string;
|
|
23
20
|
waitTimeUpdate?: number;
|
|
@@ -29,11 +26,6 @@ export type KasaPythonConfig = {
|
|
|
29
26
|
powerStrip: boolean;
|
|
30
27
|
discoveryOptions: {
|
|
31
28
|
pollingInterval: number;
|
|
32
|
-
includeMacAddress?: Array<string>;
|
|
33
|
-
excludeMacAddresses?: Array<string>;
|
|
34
|
-
devices?: Array<{
|
|
35
|
-
host: string;
|
|
36
|
-
}>;
|
|
37
29
|
};
|
|
38
30
|
forceVenvRecreate: boolean;
|
|
39
31
|
pythonExecutable?: string;
|
package/dist/config.js
CHANGED
|
@@ -41,9 +41,6 @@ export const defaultConfig = {
|
|
|
41
41
|
powerStrip: false,
|
|
42
42
|
discoveryOptions: {
|
|
43
43
|
pollingInterval: 5,
|
|
44
|
-
includeMacAddress: undefined,
|
|
45
|
-
excludeMacAddresses: undefined,
|
|
46
|
-
devices: undefined,
|
|
47
44
|
},
|
|
48
45
|
forceVenvRecreate: false,
|
|
49
46
|
pythonExecutable: undefined,
|
|
@@ -97,9 +94,6 @@ export function parseConfig(config) {
|
|
|
97
94
|
waitTimeUpdate: c.waitTimeUpdate ?? defaultConfig.waitTimeUpdate,
|
|
98
95
|
discoveryOptions: {
|
|
99
96
|
pollingInterval: (c.discoveryOptions.pollingInterval ?? defaultConfig.discoveryOptions.pollingInterval) * 1000,
|
|
100
|
-
includeMacAddress: c.discoveryOptions.includeMacAddress ?? defaultConfig.discoveryOptions.includeMacAddress,
|
|
101
|
-
excludeMacAddresses: c.discoveryOptions.excludeMacAddresses ?? defaultConfig.discoveryOptions.excludeMacAddresses,
|
|
102
|
-
devices: c.discoveryOptions.devices ?? defaultConfig.discoveryOptions.devices,
|
|
103
97
|
},
|
|
104
98
|
};
|
|
105
99
|
}
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,GAAoB,MAAM,KAAK,CAAC;AACvC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,IAAI,WAA6B,CAAC;AAElC,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAGhC;IACA;IAHT,YACE,OAAe,EACR,MAAuE,EACvE,YAAsB;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,WAAM,GAAN,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Aa,CAAC,cAAc;QAChE,gBAAgB,EAAE;YAChB,eAAe,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,CAAC,gBAAgB,CAAC,eAAe,CAAC,GAAG,IAAI;SAC/G;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Homebridge Kasa Python",
|
|
3
3
|
"name": "homebridge-kasa-python",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"description": "Plugin that uses Python-Kasa API to communicate with Kasa Devices.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "https://github.com/ZeliardM/homebridge-kasa-python/issues"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": "^18.20.4 || ^20.
|
|
16
|
+
"node": "^18.20.4 || ^20.18.0 || ^22.10.0 || ^23.1.0",
|
|
17
17
|
"homebridge": "^1.8.0 || ^2.0.0-beta.0",
|
|
18
18
|
"python": "^3.9.0"
|
|
19
19
|
},
|
|
@@ -47,21 +47,20 @@
|
|
|
47
47
|
],
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@eslint/eslintrc": "^3.1.0",
|
|
50
|
-
"@eslint/js": "^9.
|
|
51
|
-
"@stylistic/eslint-plugin": "^2.
|
|
50
|
+
"@eslint/js": "^9.13.0",
|
|
51
|
+
"@stylistic/eslint-plugin": "^2.10.0",
|
|
52
52
|
"@types/lodash.defaults": "^4.2.9",
|
|
53
|
-
"@types/node": "^22.
|
|
53
|
+
"@types/node": "^22.8.5",
|
|
54
54
|
"@types/semver": "^7.5.8",
|
|
55
|
-
"@typescript-eslint/parser": "^8.
|
|
56
|
-
"eslint": "^9.
|
|
57
|
-
"globals": "^15.
|
|
58
|
-
"homebridge": "^2.0.0-beta.
|
|
59
|
-
"nodemon": "^3.1.
|
|
55
|
+
"@typescript-eslint/parser": "^8.12.2",
|
|
56
|
+
"eslint": "^9.13.0",
|
|
57
|
+
"globals": "^15.11.0",
|
|
58
|
+
"homebridge": "^2.0.0-beta.23",
|
|
59
|
+
"nodemon": "^3.1.7",
|
|
60
60
|
"rimraf": "^6.0.1",
|
|
61
61
|
"shx": "^0.3.4",
|
|
62
62
|
"ts-node": "^10.9.2",
|
|
63
|
-
"typescript": "^
|
|
64
|
-
"typescript-eslint": "^8.0.1"
|
|
63
|
+
"typescript-eslint": "^8.12.2"
|
|
65
64
|
},
|
|
66
65
|
"homepage": "https://github.com/ZeliardM/homebridge-kasa-python#readme",
|
|
67
66
|
"funding": [
|
|
@@ -77,11 +76,12 @@
|
|
|
77
76
|
"dependencies": {
|
|
78
77
|
"ajv": "^8.17.1",
|
|
79
78
|
"ajv-formats": "^3.0.1",
|
|
80
|
-
"axios": "^1.7.
|
|
79
|
+
"axios": "^1.7.7",
|
|
81
80
|
"get-port": "^7.1.0",
|
|
82
81
|
"lodash.defaults": "^4.2.0",
|
|
83
82
|
"semver": "^7.6.3",
|
|
84
|
-
"ts-essentials": "^10.0.
|
|
83
|
+
"ts-essentials": "^10.0.2",
|
|
84
|
+
"typescript": "^5.6.3",
|
|
85
85
|
"util": "^0.12.5"
|
|
86
86
|
}
|
|
87
87
|
}
|
package/requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
eventlet==0.
|
|
1
|
+
eventlet==0.37.0
|
|
2
2
|
flask==3.0.3
|
|
3
|
-
flask_socketio==5.
|
|
4
|
-
python-kasa==0.7.
|
|
3
|
+
flask_socketio==5.4.1
|
|
4
|
+
python-kasa==0.7.6
|