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

Revert "Allow MQTT device based auto discovery" #118746

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

jbouwh
Copy link
Contributor

@jbouwh jbouwh commented Jun 3, 2024

Reverts #109030 which introduced a new schema for MQTT discovery

The main benefit of the new schema is that discovery of many (1800+) MQTT entities is more reliable, simply thanks to the reduction of discovery messages by roughly a factor of 10.

However, there were some unresolved questions:

  • Home Assistant subscribes to the discovery topic with QoS 0 which does not guarantee delivery of messages. We should investigate how the system behaves if we subscribe with QoS 1.
  • The performance gain on a more modest system than the NUC i7 used when benchmarking Allow MQTT device based auto discovery #109030 should be known
  • We need to come up with a way for services such as z2m which have retained discovery messages to migrate from the old to the new schema without risking destructive behavior where multiple Home Assistant instances destroy each other's entities

@home-assistant
Copy link

home-assistant bot commented Jun 3, 2024

Hey there @emontnemery, @bdraco, mind taking a look at this pull request as it has been labeled with an integration (mqtt) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of mqtt 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 mqtt Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@emontnemery emontnemery added this to the 2024.6.0 milestone Jun 3, 2024
@jbouwh jbouwh marked this pull request as ready for review June 3, 2024 20:27
@jbouwh jbouwh merged commit 39f5f30 into dev Jun 3, 2024
36 checks passed
@jbouwh jbouwh deleted the revert-109030-jbouwh-mqtt-device-discovery branch June 3, 2024 20:30
jbouwh added a commit that referenced this pull request Jun 3, 2024
@@ -91,13 +82,6 @@ def async_log_discovery_origin_info(
message: str, discovery_payload: MQTTDiscoveryPayload, level: int = logging.INFO
) -> None:
"""Log information about the discovery and origin."""
# We only log origin info once per device discovery
if not _LOGGER.isEnabledFor(level):
Copy link
Member

Choose a reason for hiding this comment

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

We should remerge this in a separate pr



@callback
def _replace_all_abbreviations(discovery_payload: Any | dict[str, Any]) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

There are some good improvements here that we could split into another PR as well while this is being reworked

@bdraco
Copy link
Member

bdraco commented Jun 3, 2024

#118757 is the rework

jbouwh added a commit that referenced this pull request Jun 3, 2024
frenck pushed a commit that referenced this pull request Jun 4, 2024
Revert "Allow MQTT device based auto discovery (#109030)"

This reverts commit 585892f.
dgomes pushed a commit to dgomes/home-assistant that referenced this pull request Jun 4, 2024
Revert "Allow MQTT device based auto discovery (home-assistant#109030)"

This reverts commit 585892f.
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants