homebridge-easy-mqtt 1.5.7-beta.1 → 1.5.8-beta.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,20 +2,25 @@
2
2
 
3
3
  All notable changes to homebridge-dummy will be documented in this file.
4
4
 
5
- ## 1.5.7-beta.1 (2026-01-07)
5
+ ## 1.5.8-beta.0 (2026-01-19)
6
6
 
7
7
  ### Help Requested
8
8
  I recently created a new [Wiki](https://github.com/mpatfield/homebridge-easy-mqtt/wiki/Migrating-from-MQTTThing) to provide config examples for users migrating from MQTTThing. If you have an example of old/new config you'd be willing to share, please [post a message on Discord](https://discord.gg/E7RdAbYVWk) or [open a ticket](https://github.com/mpatfield/homebridge-easy-mqtt/issues/new/choose).
9
9
 
10
+ ### Fixed
11
+ - Checkboxes in config UI not reflecting correct state in ([#168](https://github.com/mpatfield/homebridge-easy-mqtt/issues/168))
12
+
13
+ ### Notes
14
+ Would you like to see Homebridge Easy MQTT in your language? Please consider [getting involved](https://github.com/mpatfield/homebridge-easy-mqtt/issues/4). No coding experience required!
15
+
16
+ ## 1.5.7 (2026-01-16)
17
+
10
18
  ### Added
11
19
  - MQTT option `minPublishIntervalMs` to separate multiple messages published to the same topic by at least this number of milliseconds
12
20
 
13
21
  ### Changed
14
22
  - Debounce slider values to prevent excess MQTT publishing ([#164](https://github.com/mpatfield/homebridge-easy-mqtt/issues/164#issuecomment-3720881007))
15
23
 
16
- ### Notes
17
- Would you like to see Homebridge Easy MQTT in your language? Please consider [getting involved](https://github.com/mpatfield/homebridge-easy-mqtt/issues/4). No coding experience required!
18
-
19
24
  ## 1.5.6 (2025-12-17)
20
25
 
21
26
  ### Added
@@ -24,4 +24,4 @@
24
24
 
25
25
  <footer id="footer" class="text-center" style="display: none; font-style: italic; font-size: 0.9em;" i18n="required"></footer>
26
26
 
27
- <script src="ui.js?v=1.5.7-beta.1"></script>
27
+ <script src="ui.js?v=1.5.8-beta.0"></script>
@@ -1 +1 @@
1
- "use strict";(()=>{var l={arrow:"&rarr;",easy_mqtt:"Easy MQTT",github:'<a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/">GitHub</a>'};function S(n){document.querySelectorAll("[i18n]").forEach(t=>{let o=t.getAttribute("i18n"),r=n.config[o],e=t.getAttribute("i18n_replace");e&&(r=r.replace("%s",l[e])),t.innerHTML=r})}function m(n){let t=["span","label","legend","option","p"];Array.from(window.parent.document.querySelectorAll(t.join(","))).sort((r,e)=>t.indexOf(r.tagName.toLowerCase())-t.indexOf(e.tagName.toLowerCase())).forEach(r=>{let e=r.innerHTML;e=e.replaceAll(/\$\{config\.(title|description|enumNames)\.([^}]+)\}/g,(d,i,a)=>n.config[i]&&typeof n.config[i]=="object"&&a in n.config[i]?n.config[i][a]:d),r.innerHTML!==e&&(r.innerHTML=e)})}function u(n){let t=Array.from(window.parent.document.querySelectorAll("fieldset legend"));for(let o of t){let e=o.closest("fieldset")?.querySelector('input[type="text"][name="name"]');e&&o.textContent!==(e.value||n.config.title.accessory)&&(o.textContent=e.value!==""?e.value:n.config.title.accessory),e&&!e.dataset.accessoryNameListener&&(e.addEventListener("input",()=>u(n)),e.dataset.accessoryNameListener="true")}}function f(){if(typeof crypto<"u"){if(crypto.randomUUID)return crypto.randomUUID();if(crypto.getRandomValues)return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{let t=crypto.getRandomValues(new Uint8Array(1))[0]&15;return(n==="x"?t:t&3|8).toString(16)})}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{let t=Math.random()*16|0;return(n==="x"?t:t&3|8).toString(16)})}function x(n){let t=!1;n.accessories?.forEach(o=>{if(o.info.id===void 0){let r=f();o.info.id=r,t=!0}}),t&&homebridge.updatePluginConfig([n])}async function s(n){let t=!1;for(let o of n)for(let r of o.accessories??[]){if(r.info.type!=="LockMechanism")continue;let e=r;e.topicGetLockCurrentState!==void 0&&(e.topicGetCurrentLockState=e.topicGetLockCurrentState,e.topicGetLockCurrentState=void 0,t=!0),e.topicGetLockTargetState!==void 0&&(e.topicGetTargetLockState=e.topicGetLockTargetState,e.topicGetLockTargetState=void 0,t=!0),e.topicSetTargetState!==void 0&&(e.topicSetTargetLockState=e.topicSetTargetState,e.topicSetTargetState=void 0,t=!0)}t&&await homebridge.updatePluginConfig(n)}function g(n){document.getElementById("pageIntro").style.display="none",document.getElementById("support").style.display="block",document.getElementById("footer").style.display="block",new MutationObserver(()=>{m(n),u(n)}).observe(window.parent.document.body,{childList:!0,subtree:!0}),homebridge.addEventListener("configChanged",o=>{let r=o.data;r.length&&x(r[0])}),homebridge.showSchemaForm(),homebridge.hideSpinner(),homebridge.enableSaveButton()}function p(n){document.getElementById("introContinue").addEventListener("click",async()=>{g(n)}),document.getElementById("pageIntro").style.display="block",homebridge.hideSpinner()}homebridge.disableSaveButton(),homebridge.showSpinner();(async()=>{let n=await homebridge.i18nCurrentLang(),t=await homebridge.request("i18n",n);S(t);let o=await homebridge.getPluginConfig();o.length?(await s(o),g(t)):(await homebridge.updatePluginConfig([{name:l.easy_mqtt}]),p(t))})();})();
1
+ "use strict";(()=>{var S={arrow:"&rarr;",easy_mqtt:"Easy MQTT",github:'<a target="_blank" href="https://github.com/mpatfield/homebridge-easy-mqtt/">GitHub</a>'};function s(n){document.querySelectorAll("[i18n]").forEach(e=>{let o=e.getAttribute("i18n"),r=n.config[o],t=e.getAttribute("i18n_replace");t&&(r=r.replace("%s",S[t])),e.innerHTML=r})}function p(n){let e=["span","label","legend","option","p"],o=Array.from(window.parent.document.querySelectorAll(e.join(","))).sort((t,i)=>e.indexOf(t.tagName.toLowerCase())-e.indexOf(i.tagName.toLowerCase())),r=/\$\{config\.(title|description|enumNames)\.([^}]+)\}/g;o.forEach(t=>{let i=window.parent.document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null);for(;i.nextNode();){let l=i.currentNode,u=l.nodeValue||"",d=u.replace(r,(x,a,g)=>n.config[a]&&typeof n.config[a]=="object"&&g in n.config[a]?n.config[a][g]:x);u!==d&&(l.nodeValue=d)}})}function m(n){let e=Array.from(window.parent.document.querySelectorAll("fieldset legend"));for(let o of e){let t=o.closest("fieldset")?.querySelector('input[type="text"][name="name"]');t&&o.textContent!==(t.value||n.config.title.accessory)&&(o.textContent=t.value!==""?t.value:n.config.title.accessory),t&&!t.dataset.accessoryNameListener&&(t.addEventListener("input",()=>m(n)),t.dataset.accessoryNameListener="true")}}function L(){if(typeof crypto<"u"){if(crypto.randomUUID)return crypto.randomUUID();if(crypto.getRandomValues)return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{let e=crypto.getRandomValues(new Uint8Array(1))[0]&15;return(n==="x"?e:e&3|8).toString(16)})}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{let e=Math.random()*16|0;return(n==="x"?e:e&3|8).toString(16)})}function D(n){let e=!1;n.accessories?.forEach(o=>{if(o.info.id===void 0){let r=L();o.info.id=r,e=!0}}),e&&homebridge.updatePluginConfig([n])}async function b(n){let e=!1;for(let o of n)for(let r of o.accessories??[]){if(r.info.type!=="LockMechanism")continue;let t=r;t.topicGetLockCurrentState!==void 0&&(t.topicGetCurrentLockState=t.topicGetLockCurrentState,t.topicGetLockCurrentState=void 0,e=!0),t.topicGetLockTargetState!==void 0&&(t.topicGetTargetLockState=t.topicGetLockTargetState,t.topicGetLockTargetState=void 0,e=!0),t.topicSetTargetState!==void 0&&(t.topicSetTargetLockState=t.topicSetTargetState,t.topicSetTargetState=void 0,e=!0)}e&&await homebridge.updatePluginConfig(n)}function f(n){document.getElementById("pageIntro").style.display="none",document.getElementById("support").style.display="block",document.getElementById("footer").style.display="block",new MutationObserver(()=>{p(n),m(n)}).observe(window.parent.document.body,{childList:!0,subtree:!0}),homebridge.addEventListener("configChanged",o=>{let r=o.data;r.length&&D(r[0])}),homebridge.showSchemaForm(),homebridge.hideSpinner(),homebridge.enableSaveButton()}function T(n){document.getElementById("introContinue").addEventListener("click",async()=>{f(n)}),document.getElementById("pageIntro").style.display="block",homebridge.hideSpinner()}homebridge.disableSaveButton(),homebridge.showSpinner();(async()=>{let n=await homebridge.i18nCurrentLang(),e=await homebridge.request("i18n",n);s(e);let o=await homebridge.getPluginConfig();o.length?(await b(o),f(e)):(await homebridge.updatePluginConfig([{name:S.easy_mqtt}]),T(e))})();})();
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName": "Homebridge Easy MQTT",
5
5
  "description": "Homebridge plugin for MQTT devices",
6
6
  "type": "module",
7
- "version": "1.5.7-beta.1",
7
+ "version": "1.5.8-beta.0",
8
8
  "homepage": "https://github.com/mpatfield/homebridge-easy-mqtt#readme",
9
9
  "repository": {
10
10
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "main": "dist/homebridge/index.js",
21
21
  "scripts": {
22
22
  "build": "rimraf ./dist && tsc && npm run build:html && npm run build:ui",
23
- "build:html": "node --loader ts-node/esm ./scripts/build-html.ts",
23
+ "build:html": "node --import tsx ./scripts/build-html.ts",
24
24
  "build:ui": "esbuild src/homebridge-ui/ui.ts --bundle --outfile=dist/homebridge-ui/public/ui.js --minify",
25
25
  "lint": "eslint . --max-warnings=0",
26
26
  "prepublishOnly": "npm run lint && npm run build"
@@ -61,7 +61,7 @@
61
61
  "homebridge": "^2.0.0-beta.29",
62
62
  "jiti": "^2.4.2",
63
63
  "rimraf": "^6.0.1",
64
- "ts-node": "^10.9.2",
64
+ "tsx": "^4.21.0",
65
65
  "typescript": "^5.9.3",
66
66
  "typescript-eslint": "^8.46.4"
67
67
  },