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

Add a custom panel for KNX with a group monitor #92355

Merged
merged 12 commits into from May 10, 2023
Merged

Add a custom panel for KNX with a group monitor #92355

merged 12 commits into from May 10, 2023

Conversation

farmio
Copy link
Contributor

@farmio farmio commented May 2, 2023

Proposed change

This adds a custom panel for the KNX integration which allows to upload a project file (.knxproj) and offers a group monitor for live bus diagnostics.

More features shall follow later - this was our idea of a MVP for a custom KNX panel.

New requirements

xknxproject - the project data parser https://github.com/XKNX/xknxproject/
knx-frontend - the package containing the panels frontend code https://github.com/XKNX/knx-frontend/

Screenshots

Project information and uploader

Bildschirmfoto 2023-05-02 um 10 45 32

Group monitor

Bildschirmfoto 2023-05-02 um 10 48 42

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented May 2, 2023

Hey there @Julius2342, @marvin-w, mind taking a look at this pull request as it has been labeled with an integration (knx) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of knx can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign knx Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@elupus
Copy link
Contributor

elupus commented May 5, 2023

This is really cool and i'd love to see this in. Is panel_custom is the right way to go? Seems to be very little use of that inside HA. Panels tend to be added directly to the frontend repo.

@farmio
Copy link
Contributor Author

farmio commented May 5, 2023

That was Paulus' suggestion. Afaik it's only used for Insteon currently, and there is an open PR for Dynalite doing the same.

I guess only selected / wider used integrations get to go directly into the frontend repo.

Copy link
Contributor

@elupus elupus left a comment

Choose a reason for hiding this comment

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

Looks quite good. Would be good with some other eyes on it too.

homeassistant/components/knx/project.py Outdated Show resolved Hide resolved
homeassistant/components/knx/project.py Outdated Show resolved Hide resolved
homeassistant/components/knx/project.py Show resolved Hide resolved
homeassistant/components/knx/project.py Outdated Show resolved Hide resolved
homeassistant/components/knx/websocket.py Outdated Show resolved Hide resolved
@farmio farmio added the noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label May 5, 2023
Copy link
Contributor

@marvin-w marvin-w left a comment

Choose a reason for hiding this comment

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

Nice! Looks good. Tested again locally and working flawlessly. Since I was involved in the coding I'd rather not merge this on my own. This should be reviewed by ha/core.

@elupus elupus added the second-opinion-wanted Add this label when a reviewer needs a second opinion from another member. label May 6, 2023
Copy link
Contributor

@elupus elupus left a comment

Choose a reason for hiding this comment

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

I think this looks good. A second opinion from somebody with more knowledge of custom_panel would be good.

@teharris1
Copy link
Contributor

I think this looks good. A second opinion from somebody with more knowledge of custom_panel would be good.

I built the Insteon side panel and this LGTM.

@marvin-w
Copy link
Contributor

I'm gonna merge this since we have three approving reviews on this. Thank you all!

@marvin-w marvin-w merged commit 6250b0a into dev May 10, 2023
52 checks passed
@marvin-w marvin-w deleted the knx-panel branch May 10, 2023 22:13
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
by-code-owner cla-signed has-tests integration: knx new-feature noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) Quality Scale: platinum second-opinion-wanted Add this label when a reviewer needs a second opinion from another member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants