Skip to content
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

Home Assistant does not automatically reconnect when Anthem has power unplugged #42

Open
eric opened this issue Jun 11, 2023 · 1 comment

Comments

@eric
Copy link

eric commented Jun 11, 2023

I've noticed an issue where if I yank the power cable from the receiver and plug it back in, Home Assistant stops communicating with the receiver until I restart the plugin.

It is something I am able to easily reproduce if there is a certain set of diagnostics or logs that would be helpful in tracking down what is happening.

@iain-cx
Copy link

iain-cx commented Aug 22, 2024

The PR mentioned above might help, as it includes a commit which does address reconnection.

I've recently created a new project - Anthem Proxy - which might also indirectly help. It's a proxy that sits in front of an Anthem device and addresses two concerns, the first of which probably doesn't affect you if you are already successfully using Home Assistant but the second of which might.

Firstly, an Anthem device won't respond to discovery requests from hosts not on the same subnet. By running the proxy on a multihomed host you can allow devices on other subnets to be discovered by, eg, the official Anthem app.

Secondly, an Anthem device will only retain one TCP connection at a time, so if you connect with, eg, Home Assistant, and later connect with, eg, the official app, the first connection will be silently dropped. The proxy accepts connections from multiple clients, writes commands sent by any of them to the target device, and writes status messages received back from the device to all connected clients.

The proxy will reconnect to the target device if its connection is closed, so if you put it in front of your real device and point Home Assistant at the proxy, you might (or might not, who knows) avoid the issue mentioned here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants