From 92a84b966ff0b7710d9d3e5c46a625f2e38d4866 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Wed, 5 Apr 2023 22:14:43 +0100 Subject: [PATCH] prep 6.0.1 --- .github/ISSUE_TEMPLATE/config.yml | 6 +-- CHANGELOG.md | 7 ++- README.md | 14 +++--- lib/platform.js | 9 +--- lib/utils/lang-en.js | 14 +----- package-lock.json | 83 ++++++++++++++++--------------- package.json | 6 +-- 7 files changed, 64 insertions(+), 75 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 17e1c2a..e884e3a 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - - name: 🌍 My Discord Server - url: https://discord.gg/cMGhNtZ3tW - about: Join my personal Discord server where you can post messages in the plugin channels or message me directly. This is often easier and quicker than creating an issue on here. + - name: 🌍 Homebridge Discord Server + url: https://discord.gg/bHjKNkN + about: Please ask and answer questions here. diff --git a/CHANGELOG.md b/CHANGELOG.md index 183d10e..005e7b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,12 @@ All notable changes to homebridge-wemo will be documented in this file. -## BETA +## 6.0.1 (2023-04-05) + +### Changed + +- Simplify log welcome messages +- Bump `node` recommended versions to v16.20.0 or v18.15.0 ### Fixed diff --git a/README.md b/README.md index 942ede1..213e80b 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,11 @@ Homebridge plugin to integrate Wemo devices into HomeKit -[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins) -[![hoobs-certified](https://badgen.net/badge/HOOBS/certified/yellow)](https://plugins.hoobs.org/plugin/homebridge-wemo) - [![npm](https://img.shields.io/npm/v/homebridge-wemo/latest?label=latest)](https://www.npmjs.com/package/homebridge-wemo) +[![npm](https://img.shields.io/npm/v/homebridge-wemo/latest?label=latest)](https://www.npmjs.com/package/homebridge-wemo) [![npm](https://img.shields.io/npm/v/homebridge-wemo/beta?label=beta)](https://github.com/bwp91/homebridge-wemo/wiki/Beta-Version) - [![npm](https://img.shields.io/npm/dt/homebridge-wemo)](https://www.npmjs.com/package/homebridge-wemo) -[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) - [![Discord](https://img.shields.io/discord/784827113378676736?color=728ED5&logo=discord&label=bwp91-discord)](https://discord.com/channels/784827113378676736/784827113378676739) +[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins) +[![hoobs-certified](https://badgen.net/badge/HOOBS/certified/yellow?label=hoobs)](https://plugins.hoobs.org/plugin/homebridge-wemo) +[![npm](https://img.shields.io/npm/dt/homebridge-wemo)](https://www.npmjs.com/package/homebridge-wemo) [![Discord](https://img.shields.io/discord/432663330281226270?color=728ED5&logo=discord&label=hb-discord)](https://discord.com/channels/432663330281226270/742733745743855627) @@ -28,8 +26,8 @@ Homebridge plugin to integrate Wemo devices into HomeKit ### Prerequisites - To use this plugin, you will need to already have: - - [Homebridge](https://homebridge.io): v1.6 or [HOOBS](https://hoobs.org): v4.3 installed - refer to the links for more information and installation instructions. - - Node: latest version of v16 or v18 - any other major version is not supported. + - [Node](https://nodejs.org): latest version of v16 or v18 - any other major version is not supported. + - [Homebridge](https://homebridge.io): v1.6 - refer to link for more information and installation instructions. - For the UPnP connection, make sure your Homebridge instance has an allocated IP from the same IP network or VLAN as your Wemo devices. Otherwise, you should disable the UPnP connection to avoid connection errors. ### Setup diff --git a/lib/platform.js b/lib/platform.js index bc125a5..556e51e 100644 --- a/lib/platform.js +++ b/lib/platform.js @@ -469,13 +469,8 @@ export default class { ssdpClient = new ssdp(this.config.wemoClient.discover_opts); } - // Log that the plugin setup has been successful with a welcome message - const randIndex = Math.floor(Math.random() * platformLang.zWelcome.length); - - // Set a small timeout so the message should appear after the listener port log entry - setTimeout(() => { - this.log('%s. %s', platformLang.complete, platformLang.zWelcome[randIndex]); - }, 2000); + // Setup successful + this.log('%s. %s', platformLang.complete, platformLang.welcome); // Perform the first discovery run and set up the interval for subsequent runs this.discoverDevices(); diff --git a/lib/utils/lang-en.js b/lib/utils/lang-en.js index 059555a..2dc3d55 100644 --- a/lib/utils/lang-en.js +++ b/lib/utils/lang-en.js @@ -121,17 +121,5 @@ export default { upnpFail: 'upnp error (will be re-attempted)', upnpGood: 'upnp has been established', viaAL: 'via adaptive lighting', - zWelcome: [ - 'Don\'t forget to ☆ this plugin on GitHub if you\'re finding it useful!', - 'Have a feature request? Visit https://bit.ly/hbwemo-issues to ask!', - 'Interested in sponsoring this plugin? https://github.com/sponsors/bwp91', - 'Join the plugin\'s Discord community! https://discord.gg/cMGhNtZ3tW', - 'Thanks for using this plugin, I hope you find it helpful!', - 'This plugin has been made with ♥ by bwp91 from the UK!', - 'Check out my other Homebridge plugins! https://github.com/bwp91', - 'Have time to give this plugin a review? https://bit.ly/hbwemo-review', - 'This plugin currently has a 5☆ rating on HOOBS! https://bit.ly/hbwemo-review', - 'Want to see this plugin in your own language? Let me know!', - 'Want to beta test Homebridge 2.0? https://github.com/homebridge/homebridge/wiki/Homebridge-Beta-Testing', - ], + welcome: 'This plugin has been made with ♥ by bwp91, please consider a ☆ on GitHub if you are finding it useful!', }; diff --git a/package-lock.json b/package-lock.json index bd1d89e..87d5494 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "license": "MIT", "dependencies": { "@homebridge/plugin-ui-utils": "^0.0.19", - "axios": "^1.3.4", + "axios": "^1.3.5", "ip": "^2.0.0", "node-ssdp": "^4.0.1", "p-queue": "^7.3.4", @@ -36,7 +36,7 @@ "xmlbuilder": "^15.1.1" }, "devDependencies": { - "eslint": "^8.36.0", + "eslint": "^8.37.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-import-newlines": "^1.3.1", @@ -44,13 +44,13 @@ }, "engines": { "homebridge": "^1.6.0 || 2.0.0-beta.0", - "node": "^16.19.1 || ^18.15.0" + "node": "^16.20.0 || ^18.15.0" } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz", - "integrity": "sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" @@ -63,23 +63,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", - "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", - "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.0", + "espree": "^9.5.1", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -95,9 +95,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", - "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz", + "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -343,9 +343,9 @@ } }, "node_modules/axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.5.tgz", + "integrity": "sha512-glL/PvG/E+xCWwV8S6nCHcrfg1exGx7vxyUIivIA1iL7BIh6bePylCfVHwp6k13ao7SATxB6imau2kqY+I67kw==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -626,15 +626,15 @@ } }, "node_modules/eslint": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", - "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", + "version": "8.37.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz", + "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.1", - "@eslint/js": "8.36.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.37.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -645,8 +645,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.5.0", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -835,23 +835,26 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", - "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1560,9 +1563,9 @@ "dev": true }, "node_modules/js-sdsl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", - "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", + "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", "dev": true, "funding": { "type": "opencollective", @@ -1978,12 +1981,12 @@ } }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.11.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, diff --git a/package.json b/package.json index cd56416..d166219 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ }, "engines": { "homebridge": "^1.6.0 || 2.0.0-beta.0", - "node": "^16.19.1 || ^18.15.0" + "node": "^16.20.0 || ^18.15.0" }, "repository": { "type": "git", @@ -55,7 +55,7 @@ ], "dependencies": { "@homebridge/plugin-ui-utils": "^0.0.19", - "axios": "^1.3.4", + "axios": "^1.3.5", "ip": "^2.0.0", "node-ssdp": "^4.0.1", "p-queue": "^7.3.4", @@ -67,6 +67,6 @@ "eslint-plugin-import": "^2.27.5", "eslint-plugin-import-newlines": "^1.3.1", "eslint-plugin-sort-exports": "^0.8.0", - "eslint": "^8.36.0" + "eslint": "^8.37.0" } }