home-assistant.io icon indicating copy to clipboard operation
home-assistant.io copied to clipboard

Split august and yale integrations

Open bdraco opened this issue 1 year ago • 11 comments

Proposed change

Yale and August product lines have split into two separate companies and the APIs, authentication methods, servers, and systems are diverging enough that the integration needs to be split into two.

Pre-merge Plan

May 2024

  • [x] WebSocket API now available, redesign begins.

June 2024

  • [x] Move more code to the lib https://github.com/bdraco/yalexs/releases/tag/v4.0.0
  • [x] library and integration updates to be able to split https://github.com/home-assistant/core/pull/119178 https://github.com/home-assistant/core/pull/119321 https://github.com/home-assistant/core/pull/119912 https://github.com/home-assistant/core/pull/119929 https://github.com/home-assistant/core/pull/119934 https://github.com/home-assistant/core/pull/119931 https://github.com/home-assistant/core/pull/119910 https://github.com/home-assistant/core/pull/119938 https://github.com/home-assistant/core/pull/119941 https://github.com/home-assistant/core/pull/119944 https://github.com/home-assistant/core/pull/119942 https://github.com/home-assistant/core/pull/119950 https://github.com/home-assistant/core/pull/119987https://github.com/home-assistant/core/pull/120248 https://github.com/home-assistant/core/pull/120428

July 2024

  • [x] library and integration updates to be able to split https://github.com/home-assistant/core/pull/121392 https://github.com/home-assistant/core/pull/121467 https://github.com/home-assistant/core/pull/122251 https://github.com/home-assistant/core/pull/122804
  • [x] Copy the august integration to yale and change all the names. (https://github.com/home-assistant/core/pull/122253)
  • [x] Finish library updates to yalexs for the split

August 2024

  • [x] Compat fixes https://github.com/home-assistant/core/pull/123408 https://github.com/home-assistant/core/pull/123739 https://github.com/home-assistant/core/pull/123817 https://github.com/home-assistant/core/pull/124303 https://github.com/home-assistant/core/pull/124425 https://github.com/home-assistant/core/pull/124492 https://github.com/home-assistant/core/pull/124520 https://github.com/home-assistant/core/pull/124553 https://github.com/home-assistant/core/pull/124593 https://github.com/home-assistant/core/pull/124672
  • [x] Replace config flow with Oauth (uses account link) https://github.com/home-assistant/core/pull/123806
  • [x] Add protection in the library to prevent reloading the integration too frequently and effectively denial of service attacking Yale servers to prevent the new key from getting blocked as well (new as of August 22, this will cause a bit of a delay while we figure out how to do this)
  • [x] Update library to give Yale a better way to avoid potential unintended denial of service by misuse of the library. (new as of August 22, this will cause a bit of a delay while we figure out how to do this)
  • [x] Library updates to support the new websocket https://github.com/bdraco/yalexs/pull/165 (currently blocked by an auth issue)
  • [x] Replace pubnub push with the new websocket from Yale Global
  • [x] Bump library in HA https://github.com/home-assistant/core/pull/124672
  • [x] Any changes to use the new websocket in HA https://github.com/home-assistant/core/pull/124675
  • [x] Merge back to dev https://github.com/home-assistant/core/pull/124677
  • [x] Brands (Yale Home -> Yale) https://github.com/home-assistant/brands/pull/5808

After yale merge

August 2024

  • [x] Change the Yale Home virtual integration to point to the new Yale integration https://github.com/home-assistant/core/pull/124817
  • [ ] Add a repair issue to august to point users to the new integration
  • [ ] Remove Yale Global locks from august docs and docs created in this PR

Type of change

  • [ ] Spelling, grammar or other readability improvements (current branch).
  • [ ] Adjusted missing or incorrect information in the current documentation (current branch).
  • [x] Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • [ ] Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • [ ] Removed stale or deprecated documentation.

Additional information

  • Link to parent pull request in the codebase: https://github.com/home-assistant/core/pull/124677
  • Link to parent pull request in the Brands repository: https://github.com/home-assistant/brands/pull/5808
  • This PR fixes or closes issue: fixes #https://github.com/home-assistant/core/issues/124460

Checklist

  • [ ] This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • [ ] The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • New Features

    • Introduced the yale integration, allowing seamless control of various Yale devices (smart locks, doorbells, cameras) within Home Assistant.
    • Enhanced user experience with a comprehensive configuration flow for easy setup of Yale devices.
    • Added support for presence detection and local control over compatible Yale locks via Bluetooth.
  • Documentation

    • Provided detailed instructions for integrating Yale devices and troubleshooting guidance for offline key updates.

bdraco avatar Jul 20 '24 13:07 bdraco

Deploy Preview for home-assistant-docs ready!

Name Link
Latest commit c4e52a0cba0bb8744d5bfb5ae8cfd8706ae14fbf
Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/66cfa4297fbf95000862aba4
Deploy Preview https://deploy-preview-33890--home-assistant-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jul 20 '24 13:07 netlify[bot]

@bdraco, is this ready for review? https://github.com/home-assistant/core/pull/122253 seems to be merged.

c0ffeeca7 avatar Jul 31 '24 14:07 c0ffeeca7

Once the Merge back to dev step is done on I'll mark this ready. There will be multiple PRs to the integration branch next week before we should merge this.

Thanks for checking

bdraco avatar Jul 31 '24 15:07 bdraco

Thanks for figuring this out, following.

danieljowitsch avatar Aug 23 '24 20:08 danieljowitsch

Hi @bdraco I wanna thank you for taking care of this. I'm disabled and your integration with Yale has helped me in so many ways by automating certain things like my alarm turning off when I unlock the door. It's really frustrating that Yale blocked it instead of developing a solution in the meantime. Since the integration stopped working 3 days ago I've had so many frustrating experiences. I am crossing my fingers that you're able to figure this out quickly and implement the necessary change and hope Yale will assist you throughout the process. For people like myself with a disability Home Assistant is much more than just a home automation tool, it's like having an arm when you are missing one and it makes life a lot easier to deal with. Best of luck!

Majestic7979 avatar Aug 24 '24 13:08 Majestic7979

automating certain things like my alarm turning off when I unlock the door.

I'm doing the same. Problem is that I need to have information about how the door was unlocked, because I don't want to disarm the alarmsystem if the door was opened manually from the inside!

The August integration has the "operator" entry that tells if it was unlocked by a person or manually from the inside, unfortunately neither the bluetooth or the SmartThings integration provides that info.

MortenVinding avatar Aug 25 '24 20:08 MortenVinding

Walkthrough

Walkthrough

The yale integration has been introduced for Home Assistant, allowing the integration of various Yale devices, including smart locks and doorbells. It supports multiple device types and features a comprehensive configuration flow. The integration includes a list of known working devices, functionalities, limitations, and support for Yale Access Bluetooth. Key functionalities encompass sensor entities for doorbell and lock operations, presence detection, and troubleshooting guidance for offline key updates.

Changes

Files Change Summary
source/_integrations/yale.markdown New integration yale added with properties including title, description, supported platforms, and configuration details. AI-generated summary of changes documenting the integration's features and user guidance.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Aug 28 '24 02:08 coderabbitai[bot]

Once the Merge back to dev step is done on I'll mark this ready. There will be multiple PRs to the integration branch next week before we should merge this.

Thanks for checking

so now we're waiting for 124677?

c0ffeeca7 avatar Aug 28 '24 06:08 c0ffeeca7

Once the Merge back to dev step is done on I'll mark this ready. There will be multiple PRs to the integration branch next week before we should merge this. Thanks for checking

so now we're waiting for 124677?

Yes 👍

bdraco avatar Aug 28 '24 06:08 bdraco

We should document how to obtain the oauth2 application credentials.

MartinHjelmare avatar Aug 28 '24 20:08 MartinHjelmare

We should document how to obtain the oauth2 application credentials.

e970e3fcf30d6bdf95a90e60a002641c27498628

bdraco avatar Aug 28 '24 21:08 bdraco

@bdraco I have a small request. I'm incredibly appreciative of your efforts and plan to contribute to your Maui Food Bank regardless, but I wanted to ask if there's any chance you could add support for the Unity Entrance Locks we have here in Australia? These locks include a deadlock function in addition to the standard lock feature. I've already submitted a feature request, but I thought it might be worth reaching out directly to see if this is something that could be implemented.

Thanks again for all you do!

cloudbr34k84 avatar Aug 29 '24 06:08 cloudbr34k84

@bdraco I have a small request. I'm incredibly appreciative of your efforts and plan to contribute to your Maui Food Bank regardless, but I wanted to ask if there's any chance you could add support for the Unity Entrance Locks we have here in Australia? These locks include a deadlock function in addition to the standard lock feature. I've already submitted a feature request, but I thought it might be worth reaching out directly to see if this is something that could be implemented.

Thanks again for all you do!

Hi @cloudbr34k84 These locks aren't available in the US where I'm located. Adding support for features like that has relied on devs who have the lock to add these features, or users who have donated test hardware to me.

bdraco avatar Aug 29 '24 07:08 bdraco

to

Hey mate, thanks for getting back to me. Does it matter that this function is only controlled by the app? You can't actually deadlock on the physical lock? It's all done through the Yale home app and you hold down. You hold down the the Yale yap when it's on the red circle and it. Then it goes to a red, a red square

cloudbr34k84 avatar Aug 29 '24 07:08 cloudbr34k84

to

Hey mate, thanks for getting back to me. Does it matter that this function is only controlled by the app? You can't actually deadlock on the physical lock? It's all done through the Yale home app and you hold down. You hold down the the Yale yap when it's on the red circle and it. Then it goes to a red, a red square

I would need a few hours/days with the hardware in hand to implement support for that.

bdraco avatar Aug 29 '24 17:08 bdraco

Cheers mate. I do have a spare unit but I don't know. I don't know if it's worthwhile. Sending all the way over to the states for you. They're headed under warranty from the first unit I got that seem to be buggy but yeah now thanks for thanks for getting back to me mate. Cheers and thanks for getting the Yale app sorted out

cloudbr34k84 avatar Aug 29 '24 22:08 cloudbr34k84

I tested the new version, and I noticed the status of my lock is not reporting correctly. It reports as unlocked, even though the official app says Locked. I have a Conexis L1 with the Wifi Module.

For some reason, the entity state is:

entity: lock.front_door
name: Front Door
state: unlocked
attributes:
  changed_by: Manual Lock
  battery_level: 96
  friendly_name: Front Door
  supported_features: 0

Used to work well before, even though sometimes it would lag behind the official app.

marcuscps avatar Aug 30 '24 17:08 marcuscps

Please open an issue and provide debug logs and diagnostics https://www.home-assistant.io/docs/configuration/troubleshooting/#debug-logs-and-diagnostics

bdraco avatar Aug 30 '24 18:08 bdraco