Skip to content

Commit

Permalink
Add device cleanup as a new feature (#754)
Browse files Browse the repository at this point in the history
* Initial

* Bump @types/node from 22.2.0 to 22.6.2 (#716)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.2.0 to 22.6.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump nodemon from 3.1.4 to 3.1.7 (#713)

Bumps [nodemon](https://github.com/remy/nodemon) from 3.1.4 to 3.1.7.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](remy/nodemon@v3.1.4...v3.1.7)

---
updated-dependencies:
- dependency-name: nodemon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/jest from 29.5.12 to 29.5.13 (#707)

Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.12 to 29.5.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump typescript from 5.5.3 to 5.6.2 (#705)

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.3 to 5.6.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.5.3...v5.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump debug from 4.3.5 to 4.3.7 (#704)

Bumps [debug](https://github.com/debug-js/debug) from 4.3.5 to 4.3.7.
- [Release notes](https://github.com/debug-js/debug/releases)
- [Commits](debug-js/debug@4.3.5...4.3.7)

---
updated-dependencies:
- dependency-name: debug
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ts-jest from 29.2.2 to 29.2.5 (#698)

Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.2.2 to 29.2.5.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v29.2.2...v29.2.5)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump semver from 7.6.2 to 7.6.3 (#677)

Bumps [semver](https://github.com/npm/node-semver) from 7.6.2 to 7.6.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.6.2...v7.6.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Dependencies

* Initial build

* WIP

* Restructure and add lint

* Trial

* Working

* Fix latency issue

* Changelog

* WIP

* WIP

* Routines

* deviceCleanup

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
NorthernMan54 and dependabot[bot] authored Dec 16, 2024
1 parent 79fb995 commit 453df2b
Show file tree
Hide file tree
Showing 38 changed files with 7,737 additions and 13,479 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ alexaDiscovery.json
tools/after.json
tools/output.txt

gh-md-toc
gh-md-toc
/test/hbConfig/accessories
/test/hbConfig/backups
/test/hbConfig/persist
test/hbConfig/config.json
test/hbConfig/homebridge-alexa-discovery.json
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ README.md.toc.*
tools/*
publish.sh
beta.sh

test/*
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).

## 0.8.0 (2024-12-24)

## [Version 0.8.0](https://github.com/northernman54/homebridge-alexa/compare/v0.7.1...v0.8.0)

#### Changes

- Changed behaviour for missing devices, and have updated the plugin inform Alexa about some missing devices so they can be automatically deleted. Feature is enabled with the config option `deviceCleanup`. Currently only removes devices when it detects that the homebridge instance / child bridge associated with the device is no longer available.

- Improved performance on `Alexa turn off all the lights`

## 0.7.1 (2024-09-24)

## [Version 0.7.1](https://github.com/northernman54/homebridge-alexa/compare/v0.7.0...v0.7.1)
Expand Down
16 changes: 0 additions & 16 deletions beta.sh

This file was deleted.

7 changes: 7 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
"placeholder": false,
"description": "Enable beta test environment. Only available by invitation."
},
"deviceCleanup": {
"title": "<b>Cleanup of Not Responding Devices</b>",
"type": "boolean",
"default": true,
"description": "Enables cleanup of devices that are not responding. This will remove devices from Alexa that are not responding. Defaults to true."
},
"refresh": {
"title": "<b>Accessory Cache Refresh Interval</b>",
"type": "integer",
Expand Down Expand Up @@ -255,6 +261,7 @@
"items": [
"pin",
"routines",
"deviceCleanup",
"debug",
"thermostatTurnOn",
"enhancedSkip",
Expand Down
34 changes: 34 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** @type {import('eslint').FlatConfig[]} */
import pluginJs from "@eslint/js";
import pluginJest from "eslint-plugin-jest";
import globals from "globals";


export default [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs", // This is necessary to parse imports/exports
globals: {
...globals.browser,
...globals.es2021,
...globals.jest, // Add Jest globals
},
},
// Add any other specific rules here
},
pluginJs.configs.recommended,
{
plugins: {
jest: pluginJest,
},
rules: {
...pluginJest.configs.recommended.rules,
"no-unused-vars": "warn", // Change no-unused-vars to a warning
},
},
{
// Exclude test, tools, and lib directories from linting
ignores: ["test/**/*", "tools/**/*js"], // Exclude these files from linting
}
];
197 changes: 0 additions & 197 deletions lib/alexaLocal.js

This file was deleted.

Loading

0 comments on commit 453df2b

Please sign in to comment.