homebridge-easy-mqtt 2.2.0-beta.1 → 2.2.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/CHANGELOG.md CHANGED
@@ -2,10 +2,14 @@
2
2
 
3
3
  All notable changes to homebridge-easy-mqtt will be documented in this file.
4
4
 
5
- ## 2.2.0-beta.1 ()
5
+ ## 2.2.0 (2026-11-10)
6
6
 
7
7
  ### Added
8
- - [Irrigation System]() for properly grouping multiple valves ([#311](https://github.com/mpatfield/homebridge-easy-mqtt/issues/311))
8
+ - [Irrigation System](https://github.com/mpatfield/homebridge-easy-mqtt/wiki/IrrigationSystem) (Beta) for properly grouping multiple valves ([#311](https://github.com/mpatfield/homebridge-easy-mqtt/issues/311))
9
+ - Please [open a ticket](https://github.com/mpatfield/homebridge-easy-mqtt/issues/new/choose) if you notice any issues with this feature
10
+
11
+ ### Fixed
12
+ - Performance issue in config UI
9
13
 
10
14
  ### Changed
11
15
  - Updated dependencies
@@ -25,5 +25,5 @@
25
25
  <footer id="footer" class="text-center" style="display: none; font-style: italic; font-size: 0.9em;" i18n="required"></footer>
26
26
 
27
27
  <script>
28
- (()=>{var n={da:{accessory:"Tilbeh\xF8r",continue:"Forts\xE6t &rarr;",support:'For dokumentation og support bes\xF8g venligst <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"P\xE5kr\xE6vede felter er markeret med en stjerne (*)",thankYou:"Tak fordi du installerede Homebridge Easy MQTT",valve:"Valve"},de:{accessory:"Zubeh\xF6r",continue:"Setze &rarr; fort",support:'F\xFCr Dokumentation und Unterst\xFCtzung besuchen Sie bitte <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"Erforderliche Felder sind mit einem Sternchen (*) gekennzeichnet",thankYou:"Danke, dass Sie Homebridge Easy MQTT installiert haben",valve:"Valve"},en:{accessory:"Accessory",continue:"Continue &rarr;",support:'For documentation and support please visit <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"Required fields are marked with an asterisk (*)",thankYou:"Thank you for installing Homebridge Easy MQTT",valve:"Valve"},fr:{accessory:"Accessoire",continue:"Continuer &rarr;",support:'Pour la documentation et le support, veuillez visiter <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"Les champs obligatoires sont marqu\xE9s d'un ast\xE9risque (*)",thankYou:"Merci d'avoir install\xE9 Homebridge Easy MQTT",valve:"Valve"},it:{accessory:"Accessorio",continue:"Continua &rarr;",support:'Per documentazione e supporto visita <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"I campi obbligatori sono contrassegnati con un asterisco (*)",thankYou:"Grazie per aver installato Homebridge Easy MQTT",valve:"Valve"},ro:{accessory:"Accesoriu",continue:"Continu\u0103 &rarr;",support:'Pentru documenta\u021Bie \u0219i suport, v\u0103 rug\u0103m s\u0103 vizita\u021Bi <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"C\xE2mpurile obligatorii sunt marcate cu asterisc (*)",thankYou:"V\u0103 mul\u021Bumim c\u0103 a\u021Bi instalat Homebridge Easy MQTT",valve:"Valve"},vi:{accessory:"Thi\u1EBFt b\u1ECB",continue:"Ti\u1EBFp t\u1EE5c &rarr;",support:'Xem t\xE0i li\u1EC7u v\xE0 h\u1ED7 tr\u1EE3 t\u1EA1i <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"C\xE1c tr\u01B0\u1EDDng b\u1EAFt bu\u1ED9c \u0111\u01B0\u1EE3c \u0111\xE1nh d\u1EA5u b\u1EB1ng d\u1EA5u hoa th\u1ECB (*)",thankYou:"C\u1EA3m \u01A1n b\u1EA1n \u0111\xE3 c\xE0i \u0111\u1EB7t Homebridge Easy MQTT",valve:"Valve"}};function c(){try{return window.parent.document}catch{console.warn("Unable to access parent document (cross-origin). Some UI features disabled.");return}}function m(){document.querySelectorAll("[i18n]").forEach(e=>{let t=e.getAttribute("i18n");e.innerHTML=n[t]})}function d(){let e=c();if(!e)return;let t=Array.from(e.querySelectorAll("fieldset legend"));for(let r of t){let i=r.closest("fieldset")?.querySelector('input[type="text"][name="name"]');if(!i)continue;let a=r.textContent,s=i.value!==""?i.value:a===n.valve?n.valve:n.accessory;a!==s&&(r.textContent=s),i&&!i.dataset.accessoryNameListener&&(i.addEventListener("input",()=>d()),i.dataset.accessoryNameListener="true")}}function u(){if(typeof crypto<"u"){if(crypto.randomUUID)return crypto.randomUUID();if(crypto.getRandomValues)return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=crypto.getRandomValues(new Uint8Array(1))[0]&15;return(e==="x"?t:t&3|8).toString(16)})}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function g(e){let t=!1;e.accessories?.forEach(r=>{r.info&&!r.info.id&&(r.info.id=u(),t=!0),"valves"in r&&Array.isArray(r.valves)&&r.valves.forEach(o=>{o.id||(o.id=u(),t=!0)})}),t&&homebridge.updatePluginConfig([e])}function l(){document.getElementById("pageIntro").style.display="none",document.getElementById("support").style.display="block",document.getElementById("footer").style.display="block";let e=c();e&&new MutationObserver(()=>{d()}).observe(e.body,{childList:!0,subtree:!0}),homebridge.addEventListener("configChanged",t=>{let r=t.data;r.length&&g(r[0])}),homebridge.showSchemaForm(),homebridge.hideSpinner(),homebridge.enableSaveButton()}function b(){document.getElementById("introContinue").addEventListener("click",async()=>{l()}),document.getElementById("pageIntro").style.display="block",homebridge.hideSpinner()}homebridge.disableSaveButton(),homebridge.showSpinner();(async()=>{let e=await homebridge.i18nCurrentLang();n=e in n?n[e]:n.en,m(),(await homebridge.getPluginConfig()).length?l():(await homebridge.updatePluginConfig([{name:"Easy MQTT"}]),b())})();})();
28
+ (()=>{var r={da:{accessory:"Tilbeh\xF8r",continue:"Forts\xE6t &rarr;",support:'For dokumentation og support bes\xF8g venligst <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"P\xE5kr\xE6vede felter er markeret med en stjerne (*)",thankYou:"Tak fordi du installerede Homebridge Easy MQTT",valve:"Valve"},de:{accessory:"Zubeh\xF6r",continue:"Setze &rarr; fort",support:'F\xFCr Dokumentation und Unterst\xFCtzung besuchen Sie bitte <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"Erforderliche Felder sind mit einem Sternchen (*) gekennzeichnet",thankYou:"Danke, dass Sie Homebridge Easy MQTT installiert haben",valve:"Valve"},en:{accessory:"Accessory",continue:"Continue &rarr;",support:'For documentation and support please visit <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"Required fields are marked with an asterisk (*)",thankYou:"Thank you for installing Homebridge Easy MQTT",valve:"Valve"},fr:{accessory:"Accessoire",continue:"Continuer &rarr;",support:'Pour la documentation et le support, veuillez visiter <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"Les champs obligatoires sont marqu\xE9s d'un ast\xE9risque (*)",thankYou:"Merci d'avoir install\xE9 Homebridge Easy MQTT",valve:"Valve"},it:{accessory:"Accessorio",continue:"Continua &rarr;",support:'Per documentazione e supporto visita <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"I campi obbligatori sono contrassegnati con un asterisco (*)",thankYou:"Grazie per aver installato Homebridge Easy MQTT",valve:"Valve"},ro:{accessory:"Accesoriu",continue:"Continu\u0103 &rarr;",support:'Pentru documenta\u021Bie \u0219i suport, v\u0103 rug\u0103m s\u0103 vizita\u021Bi <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"C\xE2mpurile obligatorii sunt marcate cu asterisc (*)",thankYou:"V\u0103 mul\u021Bumim c\u0103 a\u021Bi instalat Homebridge Easy MQTT",valve:"Valve"},vi:{accessory:"Thi\u1EBFt b\u1ECB",continue:"Ti\u1EBFp t\u1EE5c &rarr;",support:'Xem t\xE0i li\u1EC7u v\xE0 h\u1ED7 tr\u1EE3 t\u1EA1i <a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/wiki">GitHub</a>',required:"C\xE1c tr\u01B0\u1EDDng b\u1EAFt bu\u1ED9c \u0111\u01B0\u1EE3c \u0111\xE1nh d\u1EA5u b\u1EB1ng d\u1EA5u hoa th\u1ECB (*)",thankYou:"C\u1EA3m \u01A1n b\u1EA1n \u0111\xE3 c\xE0i \u0111\u1EB7t Homebridge Easy MQTT",valve:"Valve"}};function c(){try{return window.parent.document}catch{console.warn("Unable to access parent document (cross-origin). Some UI features disabled.");return}}function m(){document.querySelectorAll("[i18n]").forEach(e=>{let t=e.getAttribute("i18n");e.innerHTML=r[t]})}function o(){let e=c();if(!e)return!1;let t=Array.from(e.querySelectorAll("fieldset legend")),n=!1;for(let a of t){let i=a.closest("fieldset")?.querySelector('input[type="text"][name="name"]');if(!i)continue;let s=a.textContent,u=i.value!==""?i.value:s===r.valve?r.valve:r.accessory;s!==u&&(a.textContent=u),i&&!i.dataset.accessoryNameListener&&(i.addEventListener("input",()=>o()),i.dataset.accessoryNameListener="true",n=!0)}return n}function d(){if(typeof crypto<"u"){if(crypto.randomUUID)return crypto.randomUUID();if(crypto.getRandomValues)return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=crypto.getRandomValues(new Uint8Array(1))[0]&15;return(e==="x"?t:t&3|8).toString(16)})}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function g(e){let t=!1;e.accessories?.forEach(n=>{n.info&&!n.info.id&&(n.info.id=d(),t=!0),"valves"in n&&Array.isArray(n.valves)&&n.valves.forEach(a=>{a.id||(a.id=d(),t=!0)})}),t&&homebridge.updatePluginConfig([e])}function l(){document.getElementById("pageIntro").style.display="none",document.getElementById("support").style.display="block",document.getElementById("footer").style.display="block";let e=c();if(e){let t=new MutationObserver(()=>{o()&&t.disconnect()});t.observe(e.body,{childList:!0,subtree:!0})}homebridge.addEventListener("configChanged",t=>{o();let n=t.data;n.length&&g(n[0])}),homebridge.showSchemaForm(),homebridge.hideSpinner(),homebridge.enableSaveButton()}function b(){document.getElementById("introContinue").addEventListener("click",async()=>{l()}),document.getElementById("pageIntro").style.display="block",homebridge.hideSpinner()}homebridge.disableSaveButton(),homebridge.showSpinner();(async()=>{let e=await homebridge.i18nCurrentLang();r=e in r?r[e]:r.en,m(),(await homebridge.getPluginConfig()).length?l():(await homebridge.updatePluginConfig([{name:"Easy MQTT"}]),b())})();})();
29
29
  </script>
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName": "Easy MQTT",
5
5
  "description": "Homebridge plugin for MQTT devices",
6
6
  "type": "module",
7
- "version": "2.2.0-beta.1",
7
+ "version": "2.2.0",
8
8
  "homepage": "https://github.com/mpatfield/homebridge-easy-mqtt#readme",
9
9
  "repository": {
10
10
  "type": "git",
@@ -29,9 +29,10 @@
29
29
  },
30
30
  "main": "dist/homebridge/index.js",
31
31
  "scripts": {
32
- "build": "rimraf ./dist ./schemas ./config.schema.json && tsc && npm run build:html && npm run build:schemas",
32
+ "build": "npm run cleanup && tsc && npm run build:html && npm run build:schemas",
33
33
  "build:html": "node --import tsx ./scripts/build-html.ts",
34
34
  "build:schemas": "node --import tsx ./scripts/build-schemas.ts",
35
+ "cleanup": "node -e \"for (const path of ['./dist', './schemas', './config.schema.json']) require('fs').rmSync(path, { recursive: true, force: true });\"",
35
36
  "i18n": "npm run i18n:merge && npm run i18n:clean && npm run i18n:missing",
36
37
  "i18n:clean": "node --import tsx ./scripts/i18n-clean.ts",
37
38
  "i18n:merge": "node --import tsx ./scripts/i18n-merge.ts",
@@ -73,7 +74,6 @@
73
74
  "@types/node-persist": "^3.1.8",
74
75
  "homebridge": "^2.0.0",
75
76
  "jiti": "^2.4.2",
76
- "rimraf": "^6.0.1",
77
77
  "tsx": "^4.21.0",
78
78
  "typescript-eslint": "^8.46.4"
79
79
  },