Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridged core and core cleanup #1048

Merged

Conversation

Shaquu
Copy link
Contributor

@Shaquu Shaquu commented Jun 25, 2024

♻️ Current situation

Describe the current situation. Explain current problems, if there are any. Be as descriptive as possible (e.g., including examples or code snippets).

  1. Current code holds incorrect deprecation date, 2022 seems like a little outdated
  2. There are some typos
  3. There are unhandled promises :)
  4. Forbidden char in Sprinkler example!

💡 Proposed solution

Describe the proposed solution and changes. How does it affect the project? How does it affect the internal structure (e.g., refactorings)?

  1. Current code holds incorrect deprecation date, 2022 seems like a little outdated
  2. I did some clean-up regarding deprecation warning
  3. I did handled promises!
  4. Removed forbidden chars

donavanbecker and others added 2 commits June 24, 2024 16:55
* AdaptiveLightingController on update should provide some data without the need to build it yourself

* Fix TypeError

* Fixed linting and test issues

* Typedoc fixes

* Updated examples

* Eslint fixes

---------

Co-authored-by: Donavan Becker <[email protected]>
@github-actions github-actions bot added the beta This is in some form related to the current beta release label Jun 25, 2024
@Shaquu Shaquu force-pushed the bridged-core-and-core-cleanup branch from d690782 to 54e87d7 Compare June 25, 2024 21:06
@coveralls
Copy link

coveralls commented Jun 25, 2024

Pull Request Test Coverage Report for Build 9669593296

Details

  • 0 of 8 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 64.86%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/BridgedCore.ts 0 4 0.0%
src/Core.ts 0 4 0.0%
Totals Coverage Status
Change from base Build 9655031976: 0.005%
Covered Lines: 7414
Relevant Lines: 10615

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 25, 2024

Pull Request Test Coverage Report for Build 9669634941

Details

  • 0 of 8 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 64.86%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/BridgedCore.ts 0 4 0.0%
src/Core.ts 0 4 0.0%
Totals Coverage Status
Change from base Build 9655031976: 0.005%
Covered Lines: 7414
Relevant Lines: 10615

💛 - Coveralls

Copy link
Contributor

@bwp91 bwp91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of comments.

i will always veer towards asking if any of the changes you have made could potentially breaking in any way

src/BridgedCore.ts Outdated Show resolved Hide resolved
src/BridgedCore.ts Show resolved Hide resolved
@Shaquu
Copy link
Contributor Author

Shaquu commented Jun 25, 2024

couple of comments.

i will always veer towards asking if any of the changes you have made could potentially breaking in any way

One potential break. I removed 💦 from Accessory and Service.
It was used in AccessoryInformation Characteristic.
But from what I see it was not used to generate UUID.

@coveralls
Copy link

coveralls commented Jun 25, 2024

Pull Request Test Coverage Report for Build 9669903686

Details

  • 0 of 8 (0.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.07%) to 64.79%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/BridgedCore.ts 0 4 0.0%
src/Core.ts 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
src/lib/Accessory.ts 3 89.29%
Totals Coverage Status
Change from base Build 9655031976: -0.07%
Covered Lines: 7411
Relevant Lines: 10615

💛 - Coveralls

@Shaquu Shaquu marked this pull request as ready for review June 25, 2024 21:36
donavanbecker
donavanbecker previously approved these changes Jun 25, 2024
@donavanbecker donavanbecker dismissed their stale review June 26, 2024 02:24

The merge-base changed after approval.

@coveralls
Copy link

coveralls commented Jun 26, 2024

Pull Request Test Coverage Report for Build 9676782347

Details

  • 0 of 8 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 64.79%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/BridgedCore.ts 0 4 0.0%
src/Core.ts 0 4 0.0%
Totals Coverage Status
Change from base Build 9673726680: 0.005%
Covered Lines: 7411
Relevant Lines: 10615

💛 - Coveralls

@Shaquu
Copy link
Contributor Author

Shaquu commented Jun 26, 2024

Ready to be merged?

@coveralls
Copy link

coveralls commented Jun 28, 2024

Pull Request Test Coverage Report for Build 9711844463

Details

  • 0 of 8 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.08%) to 64.86%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/BridgedCore.ts 0 4 0.0%
src/Core.ts 0 4 0.0%
Totals Coverage Status
Change from base Build 9690647033: 0.08%
Covered Lines: 7414
Relevant Lines: 10615

💛 - Coveralls

@donavanbecker donavanbecker merged commit e5383f8 into homebridge:beta-0.12.3 Jun 28, 2024
14 checks passed
donavanbecker pushed a commit that referenced this pull request Jun 28, 2024
* BridgedCore.ts and Core.ts cleanup (updated deprecation date from year 2022 to 2024).

* Removed not allowed char from Sprinkler accessory example

* Code review remarks
donavanbecker pushed a commit that referenced this pull request Jun 28, 2024
* BridgedCore.ts and Core.ts cleanup (updated deprecation date from year 2022 to 2024).

* Removed not allowed char from Sprinkler accessory example

* Code review remarks
@donavanbecker donavanbecker mentioned this pull request Jul 4, 2024
donavanbecker added a commit that referenced this pull request Jul 11, 2024
## v1.0.0 (2025-07-11)

### Breaking Changes

- **The minimum Node.js version required is now `v18`.**
- **Important notice:** Because of the cleanup of the Deprecated code, you will need to migrate you code base.
    - Remove the long-deprecated init().
    - Deprecate Core, BridgedCore, legacy Camera characteristics. (#1058) (@hjdhjd)
        - For deprecated `Core` and `BridgedCore` see: https://github.com/homebridge/HAP-NodeJS/wiki/Deprecation-of-Core-and-BridgeCore
    - Legacy code deprecation cleanup. (#1059) (@hjdhjd)
        - For deprecated `storagePath` switch to `HAPStorage.setCustomStoragePath`, `AudioCodec` switch to `AudioStreamingCodec`, `VideoCodec` switch to `H264CodecParameters`,`StreamAudioParams` switch to `AudioStreamingOptions`, `StreamVideoParams` switch to `VideoStreamingOptions`,`cameraSource` switch to `CameraController`.
    - Others deprecated code to highlight removed: `useLegacyAdvertiser`, `AccessoryLoader`,

### Fixed

- Fix: Build Issues (#1041) (@NorthernMan54)
- Fix: Ensure data is only transmitted on open and ready connections. (#1051) (@hjdhjd)
- Fix: Ensure we check names using the full UTF-8 character set. (#1052) (@hjdhjd)
- Fix: ConfiguredName (#1049) (@donavanbecker)
- Fix: Manufacturer looking at checkName but should look at checkValue. (#1053) (@donavanbecker)

### Other Changes

- Implement warning messages for invalid characters in names (#1009) (@NorthernMan54)
- Mitigate event emitter "memory leak" warnings when a significant number of camera streaming events occur simultaneously (#1037) (@hjdhjd)
- AdaptiveLightingController fix & improvement (#1038) (@Shaquu)
- Minor fixes to recording logging and one change in logging. (#1040) (@hjdhjd)
- Bridged core and core cleanup (#1048) (@Shaquu)
- Increase snapshot handler warning timeout to 8000ms. (#1055) (@hjdhjd)
- Cleanup and refactor getLocalNetworkInterface and address a potential edge case. (#1056) (@hjdhjd)
- Correct log spacing
- Updated and fixed `typedoc` config file
- Updated dependencies

### Homebridge Dependencies

- `@homebridge/ciao` @ `v1.3.0`
- `bonjour-hap` @ `v3.8.0`
donavanbecker added a commit that referenced this pull request Jul 11, 2024
- **The minimum Node.js version required is now `v18`.**
- **Important notice:** Because of the cleanup of the Deprecated code, you will need to migrate you code base.
    - Remove the long-deprecated init().
    - Deprecate Core, BridgedCore, legacy Camera characteristics. (#1058) (@hjdhjd)
        - For deprecated `Core` and `BridgedCore` see: https://github.com/homebridge/HAP-NodeJS/wiki/Deprecation-of-Core-and-BridgeCore
    - Legacy code deprecation cleanup. (#1059) (@hjdhjd)
        - For deprecated `storagePath` switch to `HAPStorage.setCustomStoragePath`, `AudioCodec` switch to `AudioStreamingCodec`, `VideoCodec` switch to `H264CodecParameters`,`StreamAudioParams` switch to `AudioStreamingOptions`, `StreamVideoParams` switch to `VideoStreamingOptions`,`cameraSource` switch to `CameraController`.
    - Others deprecated code to highlight removed: `useLegacyAdvertiser`, `AccessoryLoader`.
- Fix: Naming for Characteristic.ProgramMode has been corrected from `PROGRAM_SCHEDULED_MANUAL_MODE_` to `PROGRAM_SCHEDULED_MANUAL_MODE`

- Fix: Build Issues (#1041) (@NorthernMan54)
- Fix: Ensure data is only transmitted on open and ready connections. (#1051) (@hjdhjd)
- Fix: Ensure we check names using the full UTF-8 character set. (#1052) (@hjdhjd)
- Fix: ConfiguredName (#1049) (@donavanbecker)
- Fix: Manufacturer looking at checkName but should look at checkValue. (#1053) (@donavanbecker)

- Implement warning messages for invalid characters in names (#1009) (@NorthernMan54)
- Mitigate event emitter "memory leak" warnings when a significant number of camera streaming events occur simultaneously (#1037) (@hjdhjd)
- AdaptiveLightingController fix & improvement (#1038) (@Shaquu)
- Minor fixes to recording logging and one change in logging. (#1040) (@hjdhjd)
- Bridged core and core cleanup (#1048) (@Shaquu)
- Increase snapshot handler warning timeout to 8000ms. (#1055) (@hjdhjd)
- Cleanup and refactor getLocalNetworkInterface and address a potential edge case. (#1056) (@hjdhjd)
- Correct log spacing
- Updated and fixed `typedoc` config file
- Updated dependencies

- `@homebridge/ciao` @ `v1.3.0`
- `bonjour-hap` @ `v3.8.0`
donavanbecker added a commit that referenced this pull request Jul 11, 2024
## v1.0.0 (2024-07-10)

### Breaking Changes

- **The minimum Node.js version required is now `v18`.**
- **Important notice:** Because of the cleanup of the Deprecated code,
you will need to migrate you code base.
    - Remove the long-deprecated init().
- Deprecate Core, BridgedCore, legacy Camera characteristics. (#1058)
(@hjdhjd)
- For deprecated `Core` and `BridgedCore` see:
https://github.com/homebridge/HAP-NodeJS/wiki/Deprecation-of-Core-and-BridgeCore
    - Legacy code deprecation cleanup. (#1059) (@hjdhjd)
- For deprecated `storagePath` switch to
`HAPStorage.setCustomStoragePath`, `AudioCodec` switch to
`AudioStreamingCodec`, `VideoCodec` switch to
`H264CodecParameters`,`StreamAudioParams` switch to
`AudioStreamingOptions`, `StreamVideoParams` switch to
`VideoStreamingOptions`,`cameraSource` switch to `CameraController`.
- Others deprecated code to highlight removed: `useLegacyAdvertiser`,
`AccessoryLoader`.
- Fix: Naming for Characteristic.ProgramMode has been corrected from
`PROGRAM_SCHEDULED_MANUAL_MODE_` to `PROGRAM_SCHEDULED_MANUAL_MODE`

### Fixed

- Fix: Build Issues (#1041) (@NorthernMan54)
- Fix: Ensure data is only transmitted on open and ready connections.
(#1051) (@hjdhjd)
- Fix: Ensure we check names using the full UTF-8 character set. (#1052)
(@hjdhjd)
- Fix: ConfiguredName (#1049) (@donavanbecker)
- Fix: Manufacturer looking at checkName but should look at checkValue.
(#1053) (@donavanbecker)

### Other Changes

- Implement warning messages for invalid characters in names (#1009)
(@NorthernMan54)
- Mitigate event emitter "memory leak" warnings when a significant
number of camera streaming events occur simultaneously (#1037) (@hjdhjd)
- AdaptiveLightingController fix & improvement (#1038) (@Shaquu)
- Minor fixes to recording logging and one change in logging. (#1040)
(@hjdhjd)
- Bridged core and core cleanup (#1048) (@Shaquu)
- Increase snapshot handler warning timeout to 8000ms. (#1055) (@hjdhjd)
- Cleanup and refactor getLocalNetworkInterface and address a potential
edge case. (#1056) (@hjdhjd)
- Correct log spacing
- Updated and fixed `typedoc` config file
- Updated dependencies

### Homebridge Dependencies

- `@homebridge/ciao` @ `v1.3.0`
- `bonjour-hap` @ `v3.8.0`
@bwp91 bwp91 mentioned this pull request Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta This is in some form related to the current beta release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants