How to efficiently "flush" emulated hue? (Solved)

Thanks, that also worked for me for my two gen 1 echo’s.

Same for me, i dont have the hidden file in the .storage folder, si i can’t delete it 🥲

So I had removed a device from HA which is no longer there. The logs complained about the device not being there anymore. I deleted it from the emulated hue config. Then ik complained it coudl not be found. I deleted it from emulated_hue.ids and after restarting HA (an also in between all of the above steps), I get now:

Logger: homeassistant.components.emulated_hue.hue_api
Source: components/emulated_hue/hue_api.py:309
Integration: Emulated Hue (documentation, issues)
First occurred: 19:29:05 (3 occurrences)
Last logged: 19:29:37

Unknown entity number: 10 not found in emulated_hue_ids.json

Device 10 was indeed the last line in emulated_hue.ids file…

How to get rid of this log error?

Your echo devices cache all smart devices and this error is actually caused by your echos. The only way, unfortunately, is to turn off your emulated hue component, comment out the line in the config, restart home assistant, factory reset all your echo devices, register them on your account again, re-enable your emulated hue, check the api http://home_assistant_IP/api/v2/lights, make sure it shows the devices you have exposed and then do a discovery with your newly reset echos. It’s extremely annoying. Every time I have to change the exposed entities or alexa gets itself in trouble, I have to go through this painful process. For that I’m now considering Google Home… This is an utter joke from amazon!

2 Likes

There’s much to be said for having redundancy in your system - hence i use Googles and stuff. I today decided that frustration ought not be a feature of home automation so I removed the emulated hue config entirely (my HA log no longer shows 6000 recurring errors). I’ve repurposed my echo buttons and also realised that I don’t need a dozen ways to turn on each light. Mind you I’ve lost a good few Alexa tricks. But thank you for your advice above.

With 250 non-responsive entities in Alexa doing my head in I failed the nuke approach above and conclude that this garbage is kept in Alexa. My work round to start fresh was to deregister all the echos and clear the Alexa apps and register them to my partner’s account. (A bonus is that she’s not left helpless should I eg pass on).

In Home Assistant I now have this in configuration.yaml. I hope and pray that HA will never be allowed to let loose this entity bomb on the defenceless Alexa. There’s one entity exposed for posterity.

emulated_hue:
  host_ip: 192.168.1.xx
  listen_port: 80
#  off_maps_to_on_domains:
#      - script
  expose_by_default: false
#  exposed_domains:
  entities:
    light.kitchenceiling:
      name: "ceiling lights"
      hidden: false