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

No detection of closed connection with ser2net #42

Open
droberg opened this issue Aug 22, 2022 · 2 comments
Open

No detection of closed connection with ser2net #42

droberg opened this issue Aug 22, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@droberg
Copy link

droberg commented Aug 22, 2022

Version of the AMSHAN

The version is 2022.4.0

Configuration

LGF E360 -> Homebrew adapter from hanporten.se -> Raspberry-pi with GPIO -> ser2net -> wifi -> Homeassistant OS in virtual machine -> Amshan v 2022.4.0

Describe the bug

After restart of the Rasperry pi it does not seem like the plugin detects that the connection is closed and does not start again (or the timeout is very long). A reload of the plugin fixes the issue.

@toreamun toreamun self-assigned this Oct 2, 2022
@toreamun toreamun added the bug Something isn't working label Oct 2, 2022
@ruant
Copy link

ruant commented Aug 9, 2023

I'm having a similar issue.
I have a MA304H3E by Kaifa.

I connect to it like this:
MA304H3E -> TTL to MBUS adapter (1) -> ESP32 GPIO -> streamserver (2) -> wifi -> HA with AMSHAM

It some times times out and a reload of the plugin fixes the issue.
I've tried to make some logic in node-red to detect when it happens but the reload integration part in HA through either node-red or directly to the api is really bad and doesn't work at all for me.
So what I have now is just a push notification to my phone, but it sucks getting woken up in the middle of the night because the connection has times out.

Would it be possible to implement some timeout watcher in AMSHAM?
If no messages has been received in X amount of time (10..20 seconds) AMSHAM tries to reconnect?

(1) https://s.click.aliexpress.com/e/_DBeSVDz
(2) https://github.com/oxan/esphome-stream-server

@droberg
Copy link
Author

droberg commented Aug 25, 2023

I tried solving it the same way but my experience is similar. I am using a timer to detect the problem but I have not found a good way to automatically reload.

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

3 participants