dlarrick / hass-kumo

Home Assistant module interfacing with Mitsubishi mini-split units
MIT License
97 stars 21 forks source link

Out of data local cache #42

Closed tmchow closed 3 years ago

tmchow commented 3 years ago

I had issue where I had to reset all my units and re-add them to Kumo cloud since I connected them to a new SSID that's purely a 2Ghz wifi network due to network disconnects I was getting.

I then deleted the integration in Home Assistant, and re-added it. It used my old kumo_cache.json which had stale info in it, such as my old wifi network. In my logs I was getting all sorts of errors related to not being able to connect to the adapter, pull profiles, etc.

I deleted the integration again, deleted the old kumo_cache.json file and re-added it. This fixed everything.

So seems like there is a bug in refreshing that cache file when there are major changes to the config.

danielgoepp commented 3 years ago

As per #14 I believe @omriasta has described how this is expected to work currently. If the file exists, it will use it, if it doesn't it will create it. It doesn't sound like there is any sort of refresh / reload / verify / expire functionality. I'm not sure I would describe this as a bug, so much as just a limitation of the implementation. Frankly right now this can be a good thing since kumo appears to have stopped sending back the IP addresses from the cloud data, so you need to manually add them back in.

dlarrick commented 3 years ago

This behavior is indeed as expected. With prefer_cache set it will never re-fetch information from Kumo Cloud.

I'm closing this issue because with v0.2.7-beta released today there are a few ways out of this situation: