From 8fa0dff53a6fe07d8c0320bbc26d9539a653e4cc Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Thu, 5 Dec 2024 14:57:20 -0500 Subject: [PATCH 1/9] Simple setup --- .gitignore | 3 +++ .vscode/settings.json | 8 +++++--- nodemon.json | 4 ++-- test/hbConfig/.uix-dashboard.json | 1 + test/hbConfig/.uix-secrets | 1 + test/hbConfig/auth.json | 10 ++++++++++ test/hbConfig/config.json | 31 +++++++++++++++++++++++++++++++ 7 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 test/hbConfig/.uix-dashboard.json create mode 100644 test/hbConfig/.uix-secrets create mode 100644 test/hbConfig/auth.json create mode 100644 test/hbConfig/config.json diff --git a/.gitignore b/.gitignore index 351dd9a..a70d3e8 100644 --- a/.gitignore +++ b/.gitignore @@ -122,3 +122,6 @@ dist # Webstorm .idea +/test/hbConfig/accessories +/test/hbConfig/backups +/test/hbConfig/persist diff --git a/.vscode/settings.json b/.vscode/settings.json index b3cfbe8..80ee8cc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,10 @@ { "files.eol": "\n", "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, - "editor.rulers": [140], + "editor.rulers": [ + 140 + ], "eslint.enable": true -} +} \ No newline at end of file diff --git a/nodemon.json b/nodemon.json index 467d7fa..806708a 100644 --- a/nodemon.json +++ b/nodemon.json @@ -4,9 +4,9 @@ ], "ext": "ts", "ignore": [], - "exec": "tsc && homebridge -I -D", + "exec": "tsc && homebridge -U ./test/hbConfig -I -D", "signal": "SIGTERM", "env": { "NODE_OPTIONS": "--trace-warnings" } -} +} \ No newline at end of file diff --git a/test/hbConfig/.uix-dashboard.json b/test/hbConfig/.uix-dashboard.json new file mode 100644 index 0000000..f2c4361 --- /dev/null +++ b/test/hbConfig/.uix-dashboard.json @@ -0,0 +1 @@ +[{"component":"HomebridgeStatusWidgetComponent","x":0,"y":7,"cols":5,"rows":7,"mobileOrder":10,"hidePort":true,"hideOnMobile":false,"draggable":true},{"component":"ChildBridgeWidgetComponent","x":15,"y":9,"cols":5,"rows":5,"mobileOrder":35,"hideOnMobile":false,"draggable":true},{"component":"CpuWidgetComponent","x":5,"y":8,"cols":5,"rows":3,"mobileOrder":40,"hideOnMobile":false,"draggable":true},{"component":"MemoryWidgetComponent","x":5,"y":11,"cols":5,"rows":3,"mobileOrder":50,"hideOnMobile":false,"draggable":true},{"component":"NetworkWidgetComponent","x":10,"y":11,"cols":5,"rows":3,"mobileOrder":55,"hideOnMobile":false,"draggable":true},{"component":"UptimeWidgetComponent","x":10,"y":8,"cols":5,"rows":3,"mobileOrder":60,"hideOnMobile":false,"draggable":true},{"component":"SystemInfoWidgetComponent","x":15,"y":0,"cols":5,"rows":9,"mobileOrder":70,"hideOnMobile":false,"draggable":true},{"component":"HapQrcodeWidgetComponent","x":0,"y":0,"cols":5,"rows":7,"mobileOrder":100,"hideOnMobile":false,"draggable":true},{"component":"HomebridgeLogsWidgetComponent","x":5,"y":0,"cols":10,"rows":8,"mobileOrder":1000,"hideOnMobile":true,"draggable":true}] diff --git a/test/hbConfig/.uix-secrets b/test/hbConfig/.uix-secrets new file mode 100644 index 0000000..20a2581 --- /dev/null +++ b/test/hbConfig/.uix-secrets @@ -0,0 +1 @@ +{"secretKey":"de1a0f965770285a6dec91739fc725a91d6e0cb91a4aaae8116e8f140d44edc3"} diff --git a/test/hbConfig/auth.json b/test/hbConfig/auth.json new file mode 100644 index 0000000..8ae211f --- /dev/null +++ b/test/hbConfig/auth.json @@ -0,0 +1,10 @@ +[ + { + "id": 1, + "username": "test", + "name": "test", + "hashedPassword": "df121e72b850a058bd68f3d05b1f94dc985821a3885b5da38e263654f29843f98bb6d8e594f6042ff871a424602a9bff50dffa97f258bdc1dca4c79e87bac20c", + "salt": "64085e70da64670349f042d4c3d3cac75b20233ffeb71db68399973f60da077d", + "admin": true + } +] diff --git a/test/hbConfig/config.json b/test/hbConfig/config.json new file mode 100644 index 0000000..8f10741 --- /dev/null +++ b/test/hbConfig/config.json @@ -0,0 +1,31 @@ +{ + "bridge": { + "name": "Heisenberg", + "username": "AA:BB:CC:DD:FF:FF", + "port": 51826, + "pin": "031-45-154" + }, + "description": "HomeBridge HTTP Status Control", + "plugins": [ + "homebridge-plugin-name", + "homebridge-config-ui-x" + ], + "platforms": [ + { + "name": "Config", + "port": 8581, + "auth": "none", + "theme": "auto", + "tempUnits": "c", + "lang": "auto", + "sudo": false, + "platform": "config", + "debug": false + }, + { + "name": "homebridge-plugin-name", + "platform": "ExampleHomebridgePlugin" + } + ], + "accessories": [] +} \ No newline at end of file From d1159464efcac0aa8e0673ea563b22d5a2a286b9 Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:18:03 -0500 Subject: [PATCH 2/9] Working --- README.md | 2 +- package-lock.json | 119 +++++++++++++++++---------------- package.json | 3 + src/@types/homebridge-lib.d.ts | 11 +++ src/platform.ts | 16 +++++ src/platformAccessory.ts | 9 ++- 6 files changed, 100 insertions(+), 60 deletions(-) create mode 100644 src/@types/homebridge-lib.d.ts diff --git a/README.md b/README.md index 94141fe..1b69f2b 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ homebridge -D ### Watch For Changes and Build Automatically -If you want to have your code compile automatically as you make changes, and restart Homebridge automatically between changes, you first need to add your plugin as a platform in `~/.homebridge/config.json`: +If you want to have your code compile automatically as you make changes, and restart Homebridge automatically between changes, you first need to add your plugin as a platform in `./test/hbConfig/config.json`: ``` { ... diff --git a/package-lock.json b/package-lock.json index e2266f3..11c9de0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,9 @@ "name": "homebridge-plugin-name", "version": "1.0.0", "license": "Apache-2.0", + "dependencies": { + "homebridge-lib": "^7.1.0" + }, "devDependencies": { "@eslint/js": "^9.14.0", "@types/eslint__js": "^8.42.3", @@ -333,7 +336,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", - "dev": true, "license": "MIT" }, "node_modules/@nodelib/fs.scandir": { @@ -790,7 +792,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.5", @@ -807,14 +808,12 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-3.0.0.tgz", "integrity": "sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA==", - "dev": true, "license": "MIT" }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, "license": "MIT", "dependencies": { "possible-typed-array-names": "^1.0.0" @@ -850,7 +849,6 @@ "version": "3.8.0", "resolved": "https://registry.npmjs.org/bonjour-hap/-/bonjour-hap-3.8.0.tgz", "integrity": "sha512-l/Ptvrt/pjN2pCgiVyyA0EkE0uVoXXYZ4DW4xhL4kDVBaw0w54/3Jhdhzn5EyT1Z8YhNXiNhSX0uW6xz2zSxqQ==", - "dev": true, "license": "MIT", "dependencies": { "array-flatten": "^3.0.0", @@ -894,7 +892,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -1056,7 +1053,6 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.0", @@ -1096,7 +1092,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -1114,7 +1109,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", @@ -1142,7 +1136,6 @@ "version": "5.6.1", "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", - "dev": true, "license": "MIT", "dependencies": { "@leichtgewicht/ip-codec": "^2.0.1" @@ -1176,7 +1169,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" @@ -1189,7 +1181,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1199,7 +1190,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -1539,7 +1529,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "license": "MIT", "dependencies": { "is-callable": "^1.1.3" @@ -1603,7 +1592,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1613,7 +1601,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1633,7 +1620,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -1729,7 +1715,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" @@ -1778,7 +1763,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1798,7 +1782,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" @@ -1811,7 +1794,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1824,7 +1806,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1837,7 +1818,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -1853,7 +1833,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -1897,6 +1876,64 @@ "node": "^18.15.0 || ^20.7.0 || ^22" } }, + "node_modules/homebridge-lib": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/homebridge-lib/-/homebridge-lib-7.1.0.tgz", + "integrity": "sha512-L8CH9Bmt/2uTUX0O4yxT3bIK+X29zwj5DP9h1BHglh1JoctoISyxGfXpM4NgJ8uE3TYWZFpvu8DnEs3afY8AVQ==", + "license": "Apache-2.0", + "dependencies": { + "@homebridge/plugin-ui-utils": "~1.0.3", + "hb-lib-tools": "~2.1.2" + }, + "bin": { + "hap": "cli/hap.js", + "json": "cli/json.js", + "sysinfo": "cli/sysinfo.js", + "upnp": "cli/upnp.js" + }, + "engines": { + "homebridge": "^1.8.5||^2.0.0-beta", + "node": "22.11.0||^22||^20||^18" + } + }, + "node_modules/homebridge-lib/node_modules/@homebridge/plugin-ui-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@homebridge/plugin-ui-utils/-/plugin-ui-utils-1.0.3.tgz", + "integrity": "sha512-p2S/czGYNRnRtMICxBUk4Uar+KCezfyxjqfStfxKgykD2082SNayVDncYUK1xRai78EGHCbif9eoyrmDweh4tQ==", + "license": "MIT" + }, + "node_modules/homebridge-lib/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/homebridge-lib/node_modules/hb-lib-tools": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/hb-lib-tools/-/hb-lib-tools-2.1.2.tgz", + "integrity": "sha512-I0UJOG/oABrnArZWft2JIlWpTazbs84OYJ8+RBXfnBEZ2EeqpdmphXjYrMea3KzBCdlrpIqeYiYlc4b5qtolkQ==", + "license": "Apache-2.0", + "dependencies": { + "bonjour-hap": "^3.8.0", + "chalk": "^5.3.0", + "semver": "^7.6.3" + }, + "bin": { + "hap": "cli/hap.js", + "json": "cli/json.js", + "sysinfo": "cli/sysinfo.js", + "upnp": "cli/upnp.js" + }, + "engines": { + "node": "22.11.0||^22||^20||^18" + } + }, "node_modules/homebridge/node_modules/chalk": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", @@ -1958,7 +1995,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -1973,7 +2009,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -1990,7 +2025,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -2007,7 +2041,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, "license": "MIT", "dependencies": { "has-bigints": "^1.0.1" @@ -2033,7 +2066,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -2050,7 +2082,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2063,7 +2094,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" @@ -2112,7 +2142,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2135,7 +2164,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" @@ -2151,7 +2179,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -2168,7 +2195,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2181,7 +2207,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7" @@ -2197,7 +2222,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" @@ -2213,7 +2237,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" @@ -2229,7 +2252,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2242,7 +2264,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", @@ -2259,7 +2280,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, "license": "MIT" }, "node_modules/isexe": { @@ -2484,7 +2504,6 @@ "version": "7.2.5", "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", - "dev": true, "license": "MIT", "dependencies": { "dns-packet": "^5.2.2", @@ -2498,7 +2517,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", "integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==", - "dev": true, "license": "MIT" }, "node_modules/natural-compare": { @@ -2585,7 +2603,6 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2598,7 +2615,6 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", @@ -2615,7 +2631,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2625,7 +2640,6 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.5", @@ -2777,7 +2791,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2869,7 +2882,6 @@ "version": "1.5.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", @@ -2981,7 +2993,6 @@ "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -2994,7 +3005,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", @@ -3012,7 +3022,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", @@ -3051,7 +3060,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", @@ -3130,7 +3138,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", - "dev": true, "license": "MIT", "dependencies": { "internal-slot": "^1.0.4" @@ -3298,7 +3305,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", - "dev": true, "license": "MIT" }, "node_modules/to-regex-range": { @@ -3507,7 +3513,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, "license": "MIT", "dependencies": { "is-bigint": "^1.0.1", @@ -3524,7 +3529,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, "license": "MIT", "dependencies": { "is-map": "^2.0.3", @@ -3543,7 +3547,6 @@ "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", diff --git a/package.json b/package.json index 20202ae..d72ff55 100644 --- a/package.json +++ b/package.json @@ -40,5 +40,8 @@ "ts-node": "^10.9.2", "typescript": "^5.6.3", "typescript-eslint": "^8.12.2" + }, + "dependencies": { + "homebridge-lib": "^7.1.0" } } diff --git a/src/@types/homebridge-lib.d.ts b/src/@types/homebridge-lib.d.ts new file mode 100644 index 0000000..136c519 --- /dev/null +++ b/src/@types/homebridge-lib.d.ts @@ -0,0 +1,11 @@ +declare module 'homebridge-lib/EveHomeKitTypes' { + export class EveHomeKitTypes { + constructor(homebridge: any); + + Characteristics: Record; + Services: Record; + } +} + +declare module 'homebridge-lib' { +} diff --git a/src/platform.ts b/src/platform.ts index 0b287d8..c274385 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -3,6 +3,9 @@ import type { API, Characteristic, DynamicPlatformPlugin, Logging, PlatformAcces import { ExamplePlatformAccessory } from './platformAccessory.js'; import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js'; +// This is only required when using Custom Services and Characteristics not support by HomeKit +import { EveHomeKitTypes } from 'homebridge-lib/EveHomeKitTypes'; + /** * HomebridgePlatform * This class is the main constructor for your plugin, this is where you should @@ -16,6 +19,9 @@ export class ExampleHomebridgePlatform implements DynamicPlatformPlugin { public readonly accessories: Map = new Map(); public readonly discoveredCacheUUIDs: string[] = []; + public readonly CustomServices: any; + public readonly CustomCharacteristics: any; + constructor( public readonly log: Logging, public readonly config: PlatformConfig, @@ -24,6 +30,10 @@ export class ExampleHomebridgePlatform implements DynamicPlatformPlugin { this.Service = api.hap.Service; this.Characteristic = api.hap.Characteristic; + // This is only required when using Custom Services and Characteristics not support by HomeKit + this.CustomServices = new EveHomeKitTypes(this.api).Services; + this.CustomCharacteristics = new EveHomeKitTypes(this.api).Characteristics; + this.log.debug('Finished initializing platform:', this.config.name); // When this event is fired it means Homebridge has restored all cached accessories from disk. @@ -66,6 +76,12 @@ export class ExampleHomebridgePlatform implements DynamicPlatformPlugin { exampleUniqueId: 'EFGH', exampleDisplayName: 'Kitchen', }, + { + // This is an example of a device which uses a Custom Service + exampleUniqueId: 'IJKL', + exampleDisplayName: 'Backyard', + CustomService: 'AirPressureSensor', + }, ]; // loop over the discovered devices and register each one if it has not already been registered diff --git a/src/platformAccessory.ts b/src/platformAccessory.ts index dfd9223..9634978 100644 --- a/src/platformAccessory.ts +++ b/src/platformAccessory.ts @@ -31,7 +31,14 @@ export class ExamplePlatformAccessory { // get the LightBulb service if it exists, otherwise create a new LightBulb service // you can create multiple services for each accessory - this.service = this.accessory.getService(this.platform.Service.Lightbulb) || this.accessory.addService(this.platform.Service.Lightbulb); + + if (accessory.context.device.CustomService) { + // This is only required when using Custom Services and Characteristics not support by HomeKit + this.service = this.accessory.getService(this.platform.CustomServices[accessory.context.device.CustomService]) || this.accessory.addService(this.platform.CustomServices[accessory.context.device.CustomService]); + this.platform.log.debug('this.service', this.service); + } else { + this.service = this.accessory.getService(this.platform.Service.Lightbulb) || this.accessory.addService(this.platform.Service.Lightbulb); + } // set the service name, this is what is displayed as the default name on the Home app // in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method. From 1bfcbaa183b5908ac8bee382397a58f12f16d1e0 Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:21:21 -0500 Subject: [PATCH 3/9] Lint fixes --- src/@types/homebridge-lib.d.ts | 3 +++ src/platform.ts | 3 +++ src/platformAccessory.ts | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/@types/homebridge-lib.d.ts b/src/@types/homebridge-lib.d.ts index 136c519..f19366a 100644 --- a/src/@types/homebridge-lib.d.ts +++ b/src/@types/homebridge-lib.d.ts @@ -1,8 +1,11 @@ declare module 'homebridge-lib/EveHomeKitTypes' { export class EveHomeKitTypes { + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(homebridge: any); + // eslint-disable-next-line @typescript-eslint/no-explicit-any Characteristics: Record; + // eslint-disable-next-line @typescript-eslint/no-explicit-any Services: Record; } } diff --git a/src/platform.ts b/src/platform.ts index c274385..3e1c27d 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -19,7 +19,10 @@ export class ExampleHomebridgePlatform implements DynamicPlatformPlugin { public readonly accessories: Map = new Map(); public readonly discoveredCacheUUIDs: string[] = []; + // This is only required when using Custom Services and Characteristics not support by HomeKit + // eslint-disable-next-line @typescript-eslint/no-explicit-any public readonly CustomServices: any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any public readonly CustomCharacteristics: any; constructor( diff --git a/src/platformAccessory.ts b/src/platformAccessory.ts index 9634978..3d76012 100644 --- a/src/platformAccessory.ts +++ b/src/platformAccessory.ts @@ -34,7 +34,8 @@ export class ExamplePlatformAccessory { if (accessory.context.device.CustomService) { // This is only required when using Custom Services and Characteristics not support by HomeKit - this.service = this.accessory.getService(this.platform.CustomServices[accessory.context.device.CustomService]) || this.accessory.addService(this.platform.CustomServices[accessory.context.device.CustomService]); + this.service = this.accessory.getService(this.platform.CustomServices[accessory.context.device.CustomService]) || + this.accessory.addService(this.platform.CustomServices[accessory.context.device.CustomService]); this.platform.log.debug('this.service', this.service); } else { this.service = this.accessory.getService(this.platform.Service.Lightbulb) || this.accessory.addService(this.platform.Service.Lightbulb); From aa33eb5f789d873419e274b4544d77b57b7d3bfd Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:22:05 -0500 Subject: [PATCH 4/9] Update nodemon.json --- nodemon.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodemon.json b/nodemon.json index 806708a..ec0017b 100644 --- a/nodemon.json +++ b/nodemon.json @@ -4,7 +4,7 @@ ], "ext": "ts", "ignore": [], - "exec": "tsc && homebridge -U ./test/hbConfig -I -D", + "exec": "tsc && homebridge -U ./test/hbConfig -D", "signal": "SIGTERM", "env": { "NODE_OPTIONS": "--trace-warnings" From 960941b5379fc3f3a65b2ed2f9d821f0a11625b3 Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:27:41 -0500 Subject: [PATCH 5/9] Update platformAccessory.ts --- src/platformAccessory.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/platformAccessory.ts b/src/platformAccessory.ts index 3d76012..cdd872a 100644 --- a/src/platformAccessory.ts +++ b/src/platformAccessory.ts @@ -36,7 +36,6 @@ export class ExamplePlatformAccessory { // This is only required when using Custom Services and Characteristics not support by HomeKit this.service = this.accessory.getService(this.platform.CustomServices[accessory.context.device.CustomService]) || this.accessory.addService(this.platform.CustomServices[accessory.context.device.CustomService]); - this.platform.log.debug('this.service', this.service); } else { this.service = this.accessory.getService(this.platform.Service.Lightbulb) || this.accessory.addService(this.platform.Service.Lightbulb); } From e931fce0f7c11c7a2cbdd3e8dbd7c89bf35b697b Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:39:46 -0500 Subject: [PATCH 6/9] Update config.json --- test/hbConfig/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/hbConfig/config.json b/test/hbConfig/config.json index 8f10741..3a69db3 100644 --- a/test/hbConfig/config.json +++ b/test/hbConfig/config.json @@ -1,7 +1,7 @@ { "bridge": { - "name": "Heisenberg", - "username": "AA:BB:CC:DD:FF:FF", + "name": "PluginTemplate", + "username": "AA:BB:CC:DD:EE:FF", "port": 51826, "pin": "031-45-154" }, From 47c747db99205c872df5b6e9c39cd61694423375 Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:51:18 -0500 Subject: [PATCH 7/9] Remove credentials --- test/hbConfig/.uix-dashboard.json | 1 - test/hbConfig/.uix-secrets | 1 - 2 files changed, 2 deletions(-) delete mode 100644 test/hbConfig/.uix-dashboard.json delete mode 100644 test/hbConfig/.uix-secrets diff --git a/test/hbConfig/.uix-dashboard.json b/test/hbConfig/.uix-dashboard.json deleted file mode 100644 index f2c4361..0000000 --- a/test/hbConfig/.uix-dashboard.json +++ /dev/null @@ -1 +0,0 @@ -[{"component":"HomebridgeStatusWidgetComponent","x":0,"y":7,"cols":5,"rows":7,"mobileOrder":10,"hidePort":true,"hideOnMobile":false,"draggable":true},{"component":"ChildBridgeWidgetComponent","x":15,"y":9,"cols":5,"rows":5,"mobileOrder":35,"hideOnMobile":false,"draggable":true},{"component":"CpuWidgetComponent","x":5,"y":8,"cols":5,"rows":3,"mobileOrder":40,"hideOnMobile":false,"draggable":true},{"component":"MemoryWidgetComponent","x":5,"y":11,"cols":5,"rows":3,"mobileOrder":50,"hideOnMobile":false,"draggable":true},{"component":"NetworkWidgetComponent","x":10,"y":11,"cols":5,"rows":3,"mobileOrder":55,"hideOnMobile":false,"draggable":true},{"component":"UptimeWidgetComponent","x":10,"y":8,"cols":5,"rows":3,"mobileOrder":60,"hideOnMobile":false,"draggable":true},{"component":"SystemInfoWidgetComponent","x":15,"y":0,"cols":5,"rows":9,"mobileOrder":70,"hideOnMobile":false,"draggable":true},{"component":"HapQrcodeWidgetComponent","x":0,"y":0,"cols":5,"rows":7,"mobileOrder":100,"hideOnMobile":false,"draggable":true},{"component":"HomebridgeLogsWidgetComponent","x":5,"y":0,"cols":10,"rows":8,"mobileOrder":1000,"hideOnMobile":true,"draggable":true}] diff --git a/test/hbConfig/.uix-secrets b/test/hbConfig/.uix-secrets deleted file mode 100644 index 20a2581..0000000 --- a/test/hbConfig/.uix-secrets +++ /dev/null @@ -1 +0,0 @@ -{"secretKey":"de1a0f965770285a6dec91739fc725a91d6e0cb91a4aaae8116e8f140d44edc3"} From 1914af86ea23a1d2e8ed0c4d9fe01a7398560757 Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:52:15 -0500 Subject: [PATCH 8/9] Update .npmignore --- .npmignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.npmignore b/.npmignore index 5ab2834..7376bdb 100644 --- a/.npmignore +++ b/.npmignore @@ -132,3 +132,5 @@ web_modules/ .yarn/unplugged .yarn/build-state.yml .pnp.* + +test/ \ No newline at end of file From 0920a764367b29c5d1c4bf3a208580cffbb2a323 Mon Sep 17 00:00:00 2001 From: Northern Man <19808920+NorthernMan54@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:53:10 -0500 Subject: [PATCH 9/9] Update .gitignore --- .gitignore | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a70d3e8..c82215d 100644 --- a/.gitignore +++ b/.gitignore @@ -122,6 +122,5 @@ dist # Webstorm .idea -/test/hbConfig/accessories -/test/hbConfig/backups -/test/hbConfig/persist + +/test/hbConfig