Skip to content

Improvement idea regarding availability #47

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

Closed
dm82m opened this issue Dec 22, 2022 · 3 comments
Closed

Improvement idea regarding availability #47

dm82m opened this issue Dec 22, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@dm82m
Copy link
Contributor

dm82m commented Dec 22, 2022

hey guys,

I am working with mode: both and observing the issue that sometimes the availability of wemportal.com breaks. If this is the case the value of the sensors provided by wemportal.com switches to unavailable and is not reconnecting - even if wemportal will be back online. The only way getting new data is restarting my Home Assistant instance.

Could there be any "observation" be implemented in the component itself that will reconnect in these cases?

Or is someone having any alternative in mind? Like creating an automation that observers the status of the sensor and restarts the component in case the sensor is unavailable?

Best,
Dirk

@erikkastelec
Copy link
Owner

The component stays unavailable only if the wemportal is down when Home Assistant is starting. I think that Home Assistant retries to setup component if exception is raised during setup, but exceptions are currently only logged and not passed back from the wemportalapi part of the integration. Solving this would probable fix this issue.

If this does not work, I will implement config flow, which makes it possible to reload the integration from UI. This would also make finding available entities easier, as we discussed in #28

@erikkastelec erikkastelec added the bug Something isn't working label Dec 22, 2022
@erikkastelec
Copy link
Owner

I implemented config flow (Ability to add integration inside Home Assistant GUI) and improved handling of timeouts/failed requests. Retries are implemented natively and should handle this problem. Component can also be manually reloaded inside Home Assistant integrations if all else fails.

If anyone is interested in testing:

  • Put all the files from /custom_conponents/wemportal/ that are in dev branch into homeassistat_config/custom_components/wemportal folder on your server.
  • Add new integration inside Home Assistant frontend (yaml support is deprecated)

@erikkastelec
Copy link
Owner

Closing as this is fixed in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants