homebridge-savantlightingcn 1.0.2 → 1.0.6
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/LICENSE +21 -0
- package/config.schema.json +32 -0
- package/index.js +3 -3
- package/package.json +5 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 rickyangkai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginAlias": "savant",
|
|
3
|
+
"pluginType": "platform",
|
|
4
|
+
"singular": true,
|
|
5
|
+
"headerDisplay": "Homebridge Savant Lighting CN 插件配置",
|
|
6
|
+
"schema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"title": "名称",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"default": "SavantLighting",
|
|
13
|
+
"required": true
|
|
14
|
+
},
|
|
15
|
+
"port": {
|
|
16
|
+
"title": "Web 配置界面端口",
|
|
17
|
+
"type": "integer",
|
|
18
|
+
"default": 9899,
|
|
19
|
+
"required": true,
|
|
20
|
+
"description": "插件自带 Web 配置界面的访问端口"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"layout": [
|
|
25
|
+
{
|
|
26
|
+
"type": "help",
|
|
27
|
+
"helpvalue": "<h5>Savant Lighting CN 插件配置说明</h5><p>本插件提供独立的 Web 配置界面。请点击保存以启用插件,然后访问:http://your-homebridge-ip:9899 进行设备管理。</p>"
|
|
28
|
+
},
|
|
29
|
+
"name",
|
|
30
|
+
"port"
|
|
31
|
+
]
|
|
32
|
+
}
|
package/index.js
CHANGED
|
@@ -1424,7 +1424,7 @@ function HomebridgeHomeAssistant(homebridge) {
|
|
|
1424
1424
|
HomeAssistantAlarmControlPanel = require('./accessories/alarm_control_panel')(Service, Characteristic, communicationError);
|
|
1425
1425
|
|
|
1426
1426
|
// 将配件添加到Homebridge平台
|
|
1427
|
-
homebridge.registerPlatform('homebridge-
|
|
1427
|
+
homebridge.registerPlatform('homebridge-savantlightingcn', 'savant', HomeAssistantPlatform, false);
|
|
1428
1428
|
};
|
|
1429
1429
|
//初始化配置文件
|
|
1430
1430
|
// var configFile = '/var/lib/homebridge/config.json';
|
|
@@ -1488,7 +1488,7 @@ function getConfigDevices() {
|
|
|
1488
1488
|
var deviceInfo = null;
|
|
1489
1489
|
for (let index = 0; index < data.platforms.length; index++) {
|
|
1490
1490
|
const platform = data.platforms[index];
|
|
1491
|
-
if (platform.
|
|
1491
|
+
if (platform.platform == "savant") {
|
|
1492
1492
|
deviceInfo = platform.deviceInfo;
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
@@ -1533,7 +1533,7 @@ function initializationConfig() {
|
|
|
1533
1533
|
var data = JSON.parse(strData);
|
|
1534
1534
|
for (let index = 0; index < data.platforms.length; index++) {
|
|
1535
1535
|
var platform = data.platforms[index];
|
|
1536
|
-
if (platform.
|
|
1536
|
+
if (platform.platform == "savant") {
|
|
1537
1537
|
if (!platform.port) {
|
|
1538
1538
|
platform.port = 9899;
|
|
1539
1539
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-savantlightingcn",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"displayName": "Savant Lighting CN",
|
|
4
|
+
"version": "1.0.6",
|
|
5
|
+
"description": "Integrate Savant Smart Home System with HomeKit via Homebridge. Supports Lights, HVAC, Curtains, Sensors and more.",
|
|
6
|
+
"homepage": "https://github.com/rickyangkai/homebridge-savantlightingcn#readme",
|
|
5
7
|
"license": "MIT",
|
|
6
8
|
"keywords": [
|
|
7
9
|
"homebridge-plugin",
|
|
10
|
+
"homebridge",
|
|
8
11
|
"savant",
|
|
9
12
|
"savantsmarthome",
|
|
10
13
|
"scene",
|