homebridge-echonet-lite-plus 0.7.0 → 0.7.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.1
4
+
5
+ - Added a bilingual `NOTICE-MRA.md` identifying the ECHONET Consortium as the copyright holder and documenting the source of the bundled MRA data.
6
+ - Clarified that the plugin's MIT License does not alter the copyright, license, or other terms applicable to the MRA data.
7
+ - Hardened ECHONET Lite property-map parsing against malformed and duplicate EPC entries, based on findings from the separately developed ECHONET Lite engine/core implementation.
8
+ - Documented that this standalone package and Homebridge ECHONET Lite Engine Plus are mutually exclusive and must not be enabled together on the same Homebridge host.
9
+
3
10
  ## 0.7.0
4
11
 
5
12
  - Kept disabled devices out of Apple Home while retaining the complete discovered-device registry in the settings UI.
package/NOTICE-MRA.md ADDED
@@ -0,0 +1,29 @@
1
+ # Machine Readable Appendix (MRA) Notice
2
+
3
+ This package includes Machine Readable Appendix Version 1.4.0 data published by the ECHONET Consortium.
4
+
5
+ Copyright in the MRA data belongs to the ECHONET Consortium.
6
+
7
+ Source:
8
+
9
+ - [ECHONET Consortium — Machine Readable Appendix](https://echonet.jp/spec_mra_rr3/)
10
+
11
+ The MIT License of `homebridge-echonet-lite-plus` applies to the plugin source code. It does not alter the copyright, license, or other terms applicable to the MRA data.
12
+
13
+ The ECHONET Consortium is preparing general guidance for credit and license notices for secondary distribution. This project will review and update this notice if relevant official guidance is published.
14
+
15
+ ---
16
+
17
+ # Machine Readable Appendix(MRA)に関する表示
18
+
19
+ 本パッケージには、エコーネットコンソーシアムが公開するMachine Readable Appendix Version 1.4.0のデータを同梱しています。
20
+
21
+ MRAデータの著作権は、エコーネットコンソーシアムに帰属します。
22
+
23
+ 出典:
24
+
25
+ - [エコーネットコンソーシアム — Machine Readable Appendix](https://echonet.jp/spec_mra_rr3/)
26
+
27
+ `homebridge-echonet-lite-plus`のMITライセンスはプラグインのソースコードに適用されるものであり、MRAデータに適用される著作権、ライセンスその他の条件を変更するものではありません。
28
+
29
+ エコーネットコンソーシアムから二次配布時のクレジット・ライセンス表記に関する公式方針が公開された場合、本プロジェクトは内容を確認し、必要に応じて本表示を更新します。
package/README.md CHANGED
@@ -6,7 +6,7 @@ LAN内の ECHONET Lite 機器と直接通信し、HomeKit に公開するHomebri
6
6
 
7
7
  ECHONET ConsortiumのMachine Readable Appendix Version 1.4.0を同梱し、EPCの名称、アクセス規則、数値型、符号、倍率、状態enumの読書きをMRAから解決します。HomeKitサービスへの割当ては、MRAで変換したプロパティ名を使用します。
8
8
 
9
- MRAはECHONET Consortiumが公開する参考データです。本プラグインのMITライセンスはMRA自体の著作権や利用条件を変更するものではありません。
9
+ MRAデータの著作権はエコーネットコンソーシアムに帰属します。出典およびライセンス適用範囲の詳細は、同梱の[NOTICE-MRA.md](NOTICE-MRA.md)を参照してください。本プラグインのMITライセンスはMRAデータの著作権、ライセンスその他の条件を変更するものではありません。
10
10
 
11
11
  ## 動作要件とインストール
12
12
 
@@ -22,6 +22,19 @@ npm install -g homebridge-echonet-lite-plus
22
22
 
23
23
  インストール後、プラグイン設定を開いて対象ネットワークを確認し、Child Bridgeを再起動してください。既存バージョンから更新する場合も設定は引き継がれます。
24
24
 
25
+ ## Engine Plusとの排他的利用
26
+
27
+ 本パッケージは、ECHONET Liteの探索・通信からHomeKit公開までを単独で行うStandalone版です。
28
+
29
+ 別パッケージの`homebridge-echonet-lite-engine-plus`は、ECHONET Lite通信を共有Engineへ集約してメーカー別プラグイン等へ配信する構成です。両パッケージは同じ役割のECHONET Lite通信部分を持つため、排他的に選択してください。
30
+
31
+ - 同一Homebridgeホストで両方を同時に有効化しないでください。
32
+ - Standalone版を使用する場合は、Engine Plusおよびそれを利用する構成を無効化してください。
33
+ - Engine Plus構成へ移行する場合は、本Standalone版を停止してからEngine Plusを有効化してください。
34
+ - 両方を同時に動かすと、UDP/3610の待受け、機器探索、状態取得、操作要求が競合する可能性があります。
35
+
36
+ This package is the standalone implementation. It is mutually exclusive with `homebridge-echonet-lite-engine-plus`; do not enable both on the same Homebridge host.
37
+
25
38
  ## 対応方針
26
39
 
27
40
  ECHONET Liteの機器クラスとプロパティを、意味が一致するHomeKitサービスへ割り当てます。HomeKitに対応する型がない計測値を、照度や湿度など別の値へ偽装することはありません。
@@ -4,7 +4,7 @@
4
4
  "singular": true,
5
5
  "customUi": true,
6
6
  "customUiPath": "./homebridge-ui",
7
- "headerDisplay": "## ECHONET Lite Plus\nDirectly discovers ECHONET Lite devices on your LAN and exposes them to HomeKit. MQTT is not required. \nLAN内のECHONET Lite機器を直接探索し、HomeKitへ追加します。MQTTは不要です。",
7
+ "headerDisplay": "## ECHONET Lite Plus\nDirectly discovers ECHONET Lite devices on your LAN and exposes them to HomeKit. MQTT is not required. Do not enable this standalone plugin together with Homebridge ECHONET Lite Engine Plus on the same Homebridge host. \nLAN内のECHONET Lite機器を直接探索し、HomeKitへ追加します。MQTTは不要です。本単独版とHomebridge ECHONET Lite Engine Plusは排他的に使用し、同一Homebridge上で同時に有効化しないでください。",
8
8
  "footerDisplay": "Set **Log Level / ログレベル** to Debug only while troubleshooting, then return it to Info. \n問題調査時だけDebugへ変更し、確認後はInfoへ戻してください。",
9
9
  "schema": {
10
10
  "type": "object",
package/dist/platform.js CHANGED
@@ -273,7 +273,11 @@ class EchonetLitePlatform {
273
273
  this.api.updatePlatformAccessories([a]);
274
274
  }
275
275
  propertyRequests(map) {
276
- const bytes = map.match(/../g)?.map(v => parseInt(v, 16)) ?? [];
276
+ if (!/^(?:[0-9a-f]{2})+$/i.test(map))
277
+ return {};
278
+ const bytes = map.match(/../g)?.map(v => Number.parseInt(v, 16)) ?? [];
279
+ if (!bytes.length || bytes.some(Number.isNaN))
280
+ return {};
277
281
  const epcs = [];
278
282
  if (bytes[0] <= 15) {
279
283
  for (let i = 1; i <= bytes[0] && i < bytes.length; i++)
@@ -284,7 +288,7 @@ class EchonetLitePlatform {
284
288
  for (let bit = 0; bit < 8; bit++)
285
289
  if ((bytes[i + 1] ?? 0) & (1 << bit))
286
290
  epcs.push(((bit + 8) * 16 + i).toString(16));
287
- return Object.fromEntries(epcs.filter(epc => !['d6', '9d', '9e', '9f'].includes(epc)).map(epc => [epc, '']));
291
+ return Object.fromEntries([...new Set(epcs.map(epc => epc.toLowerCase()))].filter(epc => !['d6', '9d', '9e', '9f'].includes(epc)).map(epc => [epc, '']));
288
292
  }
289
293
  scheduleFacilitySync() {
290
294
  if (this.facilitySyncTimer)
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <link rel="stylesheet" href="style.css?v=0.7.0">
6
+ <link rel="stylesheet" href="style.css?v=0.7.1">
7
7
  </head>
8
8
  <body>
9
9
  <div class="elsp-shell">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-echonet-lite-plus",
3
- "version": "0.7.0",
4
- "description": "Expose ECHONET Lite devices directly to HomeKit",
3
+ "version": "0.7.1",
4
+ "description": "Standalone Homebridge plugin for ECHONET Lite devices",
5
5
  "author": "ECHONET Lite Plus contributors",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/sylpied/homebridge-echonet-lite-plus#readme",
@@ -20,6 +20,7 @@
20
20
  "README.md",
21
21
  "CHANGELOG.md",
22
22
  "LICENSE",
23
+ "NOTICE-MRA.md",
23
24
  "work/MRA_v1.4.0.zip"
24
25
  ],
25
26
  "keywords": [