home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.97k stars 29.62k forks source link

Newly added Tasmota devices lack Control entities until HA restart #113040

Closed slashbeast closed 1 month ago

slashbeast commented 5 months ago

The problem

Newly discovered Tasmota devices though MQTT does not show controls entities up until home assistant is restarted.

Steps to reproduce:

I have looked more into the MQTT and the discovery config topic does not change, meaning before and after restart of HA the content is the same. Also restarting the Tasmota device itself does not bring the controls, only restart of entire HA does.

While searching the web I found a few other reports of controls missing, with each having different solution like changing MQTT topic prefix and others replying that this did not worked for them unlike OP. What I suspect is happening here is that in all those cases between the Tasmota controls being missing and the problem being resovled for them the users did in fact restarted HA, and this is how they got it working, not what they claim in there.

Example cases:

What version of Home Assistant Core has the issue?

core-2024.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tasmota

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tasmota/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I am running HomeAssistant as container and Mosquito as MQTT server, both with network of host type which makes container do not create its own network and therefore share loopback too, meaning HA can connect to MQTT over 127.0.0.1 IP.

The docker compose

version: '3.5'
services:
  homeassistant:
    container_name: homeassistant
    restart: unless-stopped
    image: ghcr.io/home-assistant/home-assistant:stable
    network_mode: host
    privileged: true
    environment:
      - TZ=Europe/Warsaw
    volumes:
      - ./homeassistant/config:/config
    depends_on:
      - mosquitto
  mosquitto:
    restart: unless-stopped
    image: eclipse-mosquitto
    network_mode: host
    volumes:
      - ./mosquitto/config:/mosquitto/config
      - ./mosquitto/data:/mosquitto/data
      - ./mosquitto/log:/mosquitto/log
home-assistant[bot] commented 5 months ago

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

Code owner commands Code owners of `tasmota` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tasmota` Removes the current integration label and assignees on the issue, 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 issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tasmota documentation tasmota source (message by IssueLinks)

lucasdellasantina commented 4 months ago

image

After an update the names of the topics change, as shown in the image. you have to update them and enjoy

slashbeast commented 4 months ago

@lucasdellasantina Can you share some more details what you mean about the names of the topics? How is that related to the need to restart entire HA for it to pick up controls on Tasmota devices? A Tasmota device discovered on a new version lack controls until after HA is restarted.

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.