From 36f5bc43d6dbb6f02091c71b1ff8e9bfb0b8dc46 Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Fri, 21 Jan 2022 17:44:51 -0600 Subject: [PATCH] v1.10.0 (#218) ## [Version 1.10.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.10.0) (2022-01-21) ## What's Changed * Add option `pushOn`, this will allow the `On` commands to be sent along side `Status` change commands. * Housekeeping and updated dependencies. **Full Changelog**: https://github.com/OpenWonderLabs/homebridge-switchbot/compare/v1.9.0...v1.10.0 --- .eslintrc | 4 +- .github/ISSUE_TEMPLATE/bug-report.yml | 6 +- .github/ISSUE_TEMPLATE/feature-request.yml | 4 +- .github/ISSUE_TEMPLATE/support-request.yml | 6 +- .../PULL_REQUEST_TEMPLATE/pull_requests.md | 27 - .github/labeler.yml | 2 +- .github/workflows/codeql-analysis.yml | 58 +- .github/workflows/nodejs-beta.yml | 2 +- .github/workflows/prerelease-beta.js | 2 +- .github/workflows/stale.yml | 2 +- .prettierrc | 9 + .vscode/settings.json | 14 +- CHANGELOG.md | 8 + README.md | 199 +++---- SECURITY.md | 4 +- config.schema.json | 8 + homebridge-ui/public/index.html | 476 ++++++++------- homebridge-ui/server.js | 6 +- nodemon.json | 6 +- package-lock.json | 560 +++++++++++++++--- package.json | 16 +- src/devices/bots.ts | 403 +++++++------ src/devices/colorbulb.ts | 174 +++--- src/devices/contact.ts | 163 ++--- src/devices/curtains.ts | 287 ++++----- src/devices/humidifiers.ts | 299 +++++----- src/devices/meters.ts | 149 ++--- src/devices/motion.ts | 165 +++--- src/devices/plugs.ts | 58 +- src/irdevices/airconditioners.ts | 150 +++-- src/irdevices/airpurifiers.ts | 45 +- src/irdevices/cameras.ts | 37 +- src/irdevices/fans.ts | 52 +- src/irdevices/lights.ts | 38 +- src/irdevices/others.ts | 37 +- src/irdevices/tvs.ts | 74 ++- src/irdevices/vacuumcleaners.ts | 38 +- src/irdevices/waterheaters.ts | 52 +- src/platform.ts | 65 +- src/settings.ts | 28 +- 40 files changed, 2121 insertions(+), 1612 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_requests.md create mode 100644 .prettierrc diff --git a/.eslintrc b/.eslintrc index 8aba6c95..f42b2dbe 100644 --- a/.eslintrc +++ b/.eslintrc @@ -68,7 +68,9 @@ "ignoreEOLComments": true } ], - "no-trailing-spaces": ["warn"], + "no-trailing-spaces": [ + "warn" + ], "lines-between-class-members": [ "warn", "always", diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 534ea6d7..32c4544c 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,6 +1,6 @@ name: Bug-Report description: Report a Bug to help us improve -title: "Bug: " +title: 'Bug: ' labels: [bug] assignees: 'donavanbecker' body: @@ -64,7 +64,7 @@ body: label: Node.js Version placeholder: v14.17.6 validations: - required: true + required: true - type: input attributes: label: NPM Version @@ -88,7 +88,7 @@ body: label: Homebridge Config UI X Plugin Version placeholder: v4.41.2 validations: - required: false + required: false - type: input attributes: label: Operating System diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index f388762f..bcfc646a 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -1,6 +1,6 @@ name: Feature Request description: Suggest an idea for this project -title: "Feature Request: " +title: 'Feature Request: ' labels: [enhancement] assignees: 'donavanbecker' body: @@ -15,7 +15,7 @@ body: - type: input attributes: label: Problem - placeholder: A clear and concise description of what the problem is. Ex. I am always frustrated when [...] + placeholder: A clear and concise description of what the problem is. Ex. I am always frustrated when [...] validations: required: false - type: input diff --git a/.github/ISSUE_TEMPLATE/support-request.yml b/.github/ISSUE_TEMPLATE/support-request.yml index ade8f997..11d91f66 100644 --- a/.github/ISSUE_TEMPLATE/support-request.yml +++ b/.github/ISSUE_TEMPLATE/support-request.yml @@ -1,6 +1,6 @@ name: Support Request description: Need help? -title: "Support Request: " +title: 'Support Request: ' labels: [question] assignees: 'donavanbecker' body: @@ -52,7 +52,7 @@ body: label: Node.js Version placeholder: v14.17.6 validations: - required: true + required: true - type: input attributes: label: NPM Version @@ -76,7 +76,7 @@ body: label: Homebridge Config UI X Plugin Version placeholder: v4.41.2 validations: - required: false + required: false - type: input attributes: label: Operating System diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_requests.md b/.github/PULL_REQUEST_TEMPLATE/pull_requests.md deleted file mode 100644 index 1f947314..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/pull_requests.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Enhancement -about: Contribute to Plugin through Pull Request -title: '' -labels: 'enhancement' -assignees: 'donavanbecker' ---- - -**Is your enhancement related to a problem? Please describe.** - - - -**Describe the solution you are addding** - - - -**Changes Proposed in this Pull Request** - - - -**Describe alternatives you've considered** - - - -**Additional context** - - diff --git a/.github/labeler.yml b/.github/labeler.yml index 442bcba1..d2f5577d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -10,4 +10,4 @@ enhancement: # Add 'workflow' to any changes within 'workflow' folder or any subfolders workflow: - - .github/workflows/* \ No newline at end of file + - .github/workflows/* diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 960cfc35..f175565e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,14 +9,14 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: 'CodeQL' on: push: - branches: [ beta ] + branches: [beta] pull_request: # The branches below must be a subset of the branches above - branches: [ beta ] + branches: [beta] schedule: - cron: '39 20 * * 5' @@ -32,40 +32,40 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] + language: ['javascript'] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/nodejs-beta.yml b/.github/workflows/nodejs-beta.yml index 1097f6a1..cb2856e1 100644 --- a/.github/workflows/nodejs-beta.yml +++ b/.github/workflows/nodejs-beta.yml @@ -40,6 +40,6 @@ jobs: - run: npm ci - run: node .github/workflows/prerelease-beta.js - run: npm --no-git-tag-version version prerelease --preid=beta - - run: npm publish --tag=beta + - run: npm publish --tag=beta env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/prerelease-beta.js b/.github/workflows/prerelease-beta.js index bcc620af..67692a32 100644 --- a/.github/workflows/prerelease-beta.js +++ b/.github/workflows/prerelease-beta.js @@ -31,4 +31,4 @@ const publishTag = semver.gt(package.version, latestNpmTag, { // save the package.json package.version = publishTag; -fs.writeFileSync('package.json', JSON.stringify(package, null, 4)); \ No newline at end of file +fs.writeFileSync('package.json', JSON.stringify(package, null, 4)); diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1cd0acb0..190ecbe8 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -25,4 +25,4 @@ jobs: exempt-pr-labels: 'awaiting-approval,work-in-progress' remove-stale-when-updated: true close-issue-message: 'This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.' - close-pr-message: 'This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.' \ No newline at end of file + close-pr-message: 'This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.' diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..f025085b --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": true, + "singleQuote": true, + "bracketSameLine": true, + "printWidth": 150, + "tabWidth": 2, + "trailingComma": "all", + "useTabs": false +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 89854079..8dd1b6ee 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,17 @@ { "files.eol": "\n", + "prettier.requireConfig": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "typescript.format.enable": true, "editor.rulers": [ 150 ], @@ -11,5 +20,8 @@ { "mode": "auto" } - ] + ], + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 816aea08..857809e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/) +## [Version 1.10.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.10.0) (2022-01-21) + +## What's Changed +* Add option `pushOn`, this will allow the `On` commands to be sent along side `Status` change commands. +* Housekeeping and updated dependencies. + +**Full Changelog**: https://github.com/OpenWonderLabs/homebridge-switchbot/compare/v1.9.0...v1.10.0 + ## [Version 1.9.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.9.0) (2022-01-20) ## What's Changed diff --git a/README.md b/README.md index 56f86c0b..80046831 100644 --- a/README.md +++ b/README.md @@ -19,29 +19,29 @@ plugin allows you to access your SwitchBot Device(s) from HomeKit with 1. Search for "SwitchBot" on the plugin screen of [Homebridge Config UI X](https://github.com/oznu/homebridge-config-ui-x) 2. Find: `@switchbot/homebridge-switchbot` - - See noble [prerequisites](https://github.com/homebridge/noble#prerequisites) for your OS. (This is used for BLE connection.) + - See noble [prerequisites](https://github.com/homebridge/noble#prerequisites) for your OS. (This is used for BLE connection.) 3. Click **Install** ## Configuration -* ### If using OpenAPI Connection - 1. Download SwitchBot App on App Store or Google Play Store - 2. Register a SwitchBot account and log in into your account - 3. Generate an Open Token within the App - - Click Bottom Profile Tab - - Click Preference - - Click App version 10 Times, this will enable Developer Options - - Click Developer Options - - Click Copy to Clipboard - 4. Input your `openToken` into the config paramter -* ### If using BLE Connection - 1. Download SwitchBot App on App Store or Google Play Store - 2. Register a SwitchBot account and log in into your account - 3. Click on Device wanting to connect too plugin - - Click the Settings Gear - - Click Device Info - - Copy BLE Mac aka `deviceId` - 4. Input your `deviceId` into the Device Config +- ### If using OpenAPI Connection + 1. Download SwitchBot App on App Store or Google Play Store + 2. Register a SwitchBot account and log in into your account + 3. Generate an Open Token within the App + - Click Bottom Profile Tab + - Click Preference + - Click App version 10 Times, this will enable Developer Options + - Click Developer Options + - Click Copy to Clipboard + 4. Input your `openToken` into the config paramter +- ### If using BLE Connection + 1. Download SwitchBot App on App Store or Google Play Store + 2. Register a SwitchBot account and log in into your account + 3. Click on Device wanting to connect too plugin + - Click the Settings Gear + - Click Device Info + - Copy BLE Mac aka `deviceId` + 4. Input your `deviceId` into the Device Config

@@ -52,99 +52,100 @@ plugin allows you to access your SwitchBot Device(s) from HomeKit with ## Supported SwitchBot Devices - [SwitchBot Humidifier](https://www.switch-bot.com/products/switchbot-smart-humidifier) - - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections - - Can Push Updates over OpenAPI - - Can Receive Udpates over BLE and OpenAPI + - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections + - Can Push Updates over OpenAPI + - Can Receive Udpates over BLE and OpenAPI - [SwitchBot Meter](https://www.switch-bot.com/products/switchbot-meter) - - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections - - If using OpenAPI: - - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required - - Enable Cloud Services for Device on SwitchBot App - - If using Bluetooth Low Energy (BLE) only: - - Must supply `deviceId` & `deviceName` to Device Config - - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config + - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections + - If using OpenAPI: + - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required + - Enable Cloud Services for Device on SwitchBot App + - If using Bluetooth Low Energy (BLE) only: + - Must supply `deviceId` & `deviceName` to Device Config + - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config - [SwitchBot Motion Sensor](https://www.switch-bot.com/products/motion-sensor) - - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections - - If using OpenAPI: - - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required - - Enable Cloud Services for Device on SwitchBot App - - If using Bluetooth Low Energy (BLE) only: - - Must supply `deviceId` & `deviceName` to Device Config - - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config + - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections + - If using OpenAPI: + - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required + - Enable Cloud Services for Device on SwitchBot App + - If using Bluetooth Low Energy (BLE) only: + - Must supply `deviceId` & `deviceName` to Device Config + - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config - [SwitchBot Contact Sensor](https://www.switch-bot.com/products/contact-sensor) - - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections - - If using OpenAPI: - - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required - - Enable Cloud Services for Device on SwitchBot App - - If using Bluetooth Low Energy (BLE) only: - - Must supply `deviceId` & `deviceName` to Device Config - - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config + - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections + - If using OpenAPI: + - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required + - Enable Cloud Services for Device on SwitchBot App + - If using Bluetooth Low Energy (BLE) only: + - Must supply `deviceId` & `deviceName` to Device Config + - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config - [SwitchBot Curtain](https://www.switch-bot.com/products/switchbot-curtain) - - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections - - If using OpenAPI: - - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required - - Enable Cloud Services for Device on SwitchBot App - - If using Bluetooth Low Energy (BLE) only: - - Must supply `deviceId` & `deviceName` to Device Config - - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config + - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections + - If using OpenAPI: + - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required + - Enable Cloud Services for Device on SwitchBot App + - If using Bluetooth Low Energy (BLE) only: + - Must supply `deviceId` & `deviceName` to Device Config + - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config - [SwitchBot Bulb](https://www.switch-bot.com/products/switchbot-color-bulb) - - Supports OpenAPI Connection Only - - If using OpenAPI: - - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required - - Enable Cloud Services for Device on SwitchBot App + - Supports OpenAPI Connection Only + - If using OpenAPI: + - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required + - Enable Cloud Services for Device on SwitchBot App - [SwitchBot Bot](https://www.switch-bot.com/products/switchbot-bot) - - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections - - If using OpenAPI: - - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required - - Enable Cloud Services for Device on SwitchBot App - - You must set your Bot's Device ID in the Press Mode or Switch Mode Bot Settings (Advanced Settings > Device Settings > Bot Settings) - - Press Mode - Turns on then instantly turn it off - - Switch Mode - Turns on and keep it on until it is turned off - - This can get out of sync, since API doesn't give me a status - - To Correct you must go into the SwitchBot App and correct the status of either `On` or `Off` - - If using Bluetooth Low Energy (BLE) only: - - Must supply `deviceId` & `deviceName` to Device Config - - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config + - Supports OpenAPI & Bluetooth Low Energy (BLE) Connections + - If using OpenAPI: + - [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) or [SwitchBot Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) Required + - Enable Cloud Services for Device on SwitchBot App + - You must set your Bot's Device ID in the Press Mode or Switch Mode Bot Settings (Advanced Settings > Device Settings > Bot Settings) + - Press Mode - Turns on then instantly turn it off + - Switch Mode - Turns on and keep it on until it is turned off + - This can get out of sync, since API doesn't give me a status + - To Correct you must go into the SwitchBot App and correct the status of either `On` or `Off` + - If using Bluetooth Low Energy (BLE) only: + - Must supply `deviceId` & `deviceName` to Device Config + - Check `Enable Bluetooth Low Energy (BLE) Connection` on Device Config - SwitchBot Plug - - Supports OpenAPI Connection Only + - Supports OpenAPI Connection Only ## Supported IR Devices + ### _(All IR Devices require [Hub Plus](https://www.switch-bot.com/products/switchbot-hub-plus) or [Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini))_ - TV - - Allows for On/Off and Volume Controls - - Optional Disable Sending Power Command + - Allows for On/Off and Volume Controls + - Optional Disable Sending Power Command - Projector (Displayed as TV) - - Allows for On/Off and Volume Controls -- Set Top Box (Displayed as Set Top Box) - - Allows for On/Off and Volume Controls -- DVD (Displayed as Set Top Box) - - Allows for On/Off and Volume Controls -- Streamer (Displayed as Streaming Stick) - - Allows for On/Off and Volume Controls -- Speaker (Displayed as Speaker) - - Allows for On/Off and Volume Controls + - Allows for On/Off and Volume Controls +- Set Top Box (Displayed as Set Top Box) + - Allows for On/Off and Volume Controls +- DVD (Displayed as Set Top Box) + - Allows for On/Off and Volume Controls +- Streamer (Displayed as Streaming Stick) + - Allows for On/Off and Volume Controls +- Speaker (Displayed as Speaker) + - Allows for On/Off and Volume Controls - Fans - - Allows for On/Off Controls - - Optional Rotation Speed - - Optional Swing Mode -- Lights - - Allows for On/Off Controls + - Allows for On/Off Controls + - Optional Rotation Speed + - Optional Swing Mode +- Lights + - Allows for On/Off Controls - Air Purifiers - - Allows for On/Off Controls + - Allows for On/Off Controls - Air Conditioners - - Allows for On/Off, Tempeture, and Mode Controls - - Optional Disable Auto Mode -- Cameras - - Allows for On/Off Controls -- Vacuum Cleaners - - Allows for On/Off Controls -- Water Heaters - - Allows for On/Off Controls -- Others - - Option to Dispaly as differenet Device Type - - Supports Fan Device Type - - Allows for On/Off Controls + - Allows for On/Off, Tempeture, and Mode Controls + - Optional Disable Auto Mode +- Cameras + - Allows for On/Off Controls +- Vacuum Cleaners + - Allows for On/Off Controls +- Water Heaters + - Allows for On/Off Controls +- Others + - Option to Dispaly as differenet Device Type + - Supports Fan Device Type + - Allows for On/Off Controls ## SwitchBotAPI @@ -153,6 +154,6 @@ plugin allows you to access your SwitchBot Device(s) from HomeKit with ## Community -* [SwitchBot (Official website)](https://www.switch-bot.com/) -* [Facebook @SwitchBotRobot](https://www.facebook.com/SwitchBotRobot/) -* [Twitter @SwitchBot](https://twitter.com/switchbot) +- [SwitchBot (Official website)](https://www.switch-bot.com/) +- [Facebook @SwitchBotRobot](https://www.facebook.com/SwitchBotRobot/) +- [Twitter @SwitchBot](https://twitter.com/switchbot) diff --git a/SECURITY.md b/SECURITY.md index f3bcd13f..2959ba83 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,8 +7,8 @@ currently being supported with security updates. | Version | Supported | | ------- | ------------------ | -| 1.0.x | :white_check_mark: | -| < 0.1.0 | :x: | +| 1.9.x | :white_check_mark: | +| < 1.8.2 | :x: | ## Reporting a Vulnerability diff --git a/config.schema.json b/config.schema.json index 4168153c..b71ec104 100644 --- a/config.schema.json +++ b/config.schema.json @@ -701,6 +701,13 @@ "condition": { "functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].configRemoteType === 'Air Conditioner' || model.options.irdevices[arrayIndices].configRemoteType === 'DIY Air Conditioner') && model.options.irdevices[arrayIndices].deviceId);" } + }, + "pushOn": { + "title": "Push On Changes", + "type": "boolean", + "condition": { + "functionBody": "return (model.options && model.options.irdevices && !model.options.irdevices[arrayIndices].hide_device && (model.options.irdevices[arrayIndices].configRemoteType === 'Air Conditioner' || model.options.irdevices[arrayIndices].configRemoteType === 'DIY Air Conditioner') && model.options.irdevices[arrayIndices].deviceId);" + } } } }, @@ -956,6 +963,7 @@ "options.irdevices[].hide_device", "options.irdevices[].configRemoteType", "options.irdevices[].irair.hide_automode", + "options.irdevices[].irair.pushOn", "options.irdevices[].irfan.rotation_speed", "options.irdevices[].irfan.swing_mode", "options.irdevices[].irfan.set_minStep", diff --git a/homebridge-ui/public/index.html b/homebridge-ui/public/index.html index 7461d502..2dfa15c8 100644 --- a/homebridge-ui/public/index.html +++ b/homebridge-ui/public/index.html @@ -1,253 +1,239 @@

- homebridge-switchbot logo + homebridge-switchbot logo

- -