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
73.66k stars 30.8k forks source link

Emulated Hue still being discovered after removal #34811

Closed derspion318 closed 3 years ago

derspion318 commented 4 years ago

The problem

I setup emulated hue originally as seen below:

emulated_hue:
  listen_port: 80
  expose_by_default: false
  exposed_domains:
    - switch
  entities:
    switch.coffee_cabinet_lights:
      name: "Coffee Cabinet Lights"
      hidden: false
    switch.stove_cabinet_lights:
      name: "Stove Cabinet Lights"
      hidden: false

For some reason the alexa environment still picked up EVERYTHING in hassio. Since this was not the expected outcome I then removed it from configuration.yaml, restarted hassio, "Forget All" on alexa webGUI, "Discover" on alexa webGUI, everything still populated from hassio.

I went in and verified it was deleted from the configuration.yaml file, deleted the emulated hue json file, rebooted my hassio host, "Forget All" on alexa webGUI, "Discover" on alexa webGUI, everything still populated from hassio.

I'm not exactly sure what is going on at this point to cause everything to keep populating from hassio. Per the HassIO Emulated Hue integration page, I went to http://HA_IP_Address:80/api/pi/lights and got a "This site can't be reached" error. I then went to http://HA_IP_Address:80/description.xml and got the same results. From this I would think it is not broadcasting devices, but alexa still finds them and says "This device isn't responding....." when attempting to control them.

I also went to the developer tools -> info tab to find "alexa" in the list of integrations. I have nothing alexa related in my configuration.yaml or in the integrations page. Not sure why that is there.

Environment

Problem-relevant configuration.yaml

As you can see below, I have completely removed the emulated_hue component and there is nothing alexa related contained in my configuration.yaml


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
homeassistant:
  customize: !include customize.yaml

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
  base_url: !secret base_url
  ssl_certificate: !secret ssl_path
  ssl_key: !secret ssl_key

# Text to speech
tts:
  - platform: google_translate

frontend:
  themes: !include_dir_merge_named themes

shelly: 
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
alarm_control_panel: !include alarm.yaml
mysensors: !include mysensors.yaml
sensor: !include sensors.yaml
switch: !include switches.yaml
device_tracker: !include device_tracker.yaml
#binary_sensor: !include binary_sensors.yaml

input_boolean:
  alarm_recording:
    initial: off
    icon: mdi:record-rec

panel_iframe:
  tasmoadmin:
    title: TasmoAdmin
    icon: mdi:lightbulb-on
    url: **removed**

august:
  login_method: !secret august_login_method
  username: !secret august_user
  password: !secret august_pass

notify:
  - name: FireTablet7
    platform: lannouncer
    host: **removed**

# zoneminder: 
  # host: !secret zmhost
  # path: /zm/
  # path_zms: /zm/cgi-bin/nph-zms
  # username: !secret zmuser
  # password: !secret zmpasswd
camera: !include cameras.yaml
  # - platform: zoneminder
  # - platform: nwsradar
    # station: SHV
  # - platform: nwsradar
    # station: SHV
    # type: N0S

Traceback/Error logs

Additional information

balloob commented 4 years ago

Did you restart your Alexa after forgetting all and asking it to discover devices? Maybe it has cached something.

derspion318 commented 4 years ago

Did you restart your Alexa after forgetting all and asking it to discover devices? Maybe it has cached something.

I just tried that this morning. "Forget All", power down all alexa devices in my home, power just one back up, same thing.

pmd5700 commented 4 years ago

Did you restart your Alexa after forgetting all and asking it to discover devices? Maybe it has cached something.

I just tried that this morning. "Forget All", power down all alexa devices in my home, power just one back up, same thing.

I'm having a similar problem. I'm trying to add just a few specific items but I think it keeps finding all my items from when I initially used discover devices without hiding any.

merdok commented 4 years ago

This has nothing to do with the integration. Alexa keeps the devices cached. What i always do to clear the cache is remove all devices manually one by one (Forget all does not seem to work) and then restart Alexa.

azelinc commented 4 years ago

i have the same problem, trying to let is sleep for a night or two (with emulated hue taken out), see if it helps.

jyavenard commented 4 years ago

You can check if HA is still reporting the lights are being available. go to: http://IP_ADDRESS_OF_HA:80/api/js/ligths

this will return a json ; search it to see if the light that should be gone is still there. You'll likely find that it's gone.

If the json doesn't contain the lights ; then the issue will be your amazon echo or whatever alexa device you have on your network that have cached the list of available devices. You need to de-register it from your account and re-register it. You need to do that for all echo devices on your network as they all cache the content.

This will fix your issues

yajrendrag commented 3 years ago

i can confirm that this process indeed works. 1 note... i had both echo devices and fire tv devices; the fire tv devices cannot be deregistered from the alexa app, however, they can be deregistered from amazon's web site - just click the devices and content link and then select the devices tab, click into your firetv devices and deregister them. thankfully reregistering them didn't require re-entering application passwords...

mediacowboy commented 3 years ago

So I am having the same issue. I don't think it is an issue with Home Assistant but and issue with Alexa. I was looking at other threads that are have the same issue with different smart home products.

yajrendrag commented 3 years ago

tend to agree... while the process worked to clear the echo device caches and then alexa discovered all the devices, it still doesn't group them properly (it picks different devices than i pick when i group them together in the alexa app)... that to me is clearly an alexa issue. i switched to google assistant (have both devices) and it works fine..

danielo515 commented 3 years ago

What deregistering the devices mean in terms of configurations and light groups? Will I be required to re-create groups and scenes?

danielo515 commented 3 years ago

Ok, I can confirm that the described procedure works as expected. Nothing is lost (at least not on echo dot devices). It is a bit painful process to just add a new device, but I guess you don't do it that often after certain point.

github-actions[bot] commented 3 years 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.