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

Restart after connection lost #5

Open
chrisrock1984 opened this issue Feb 16, 2022 · 11 comments
Open

Restart after connection lost #5

chrisrock1984 opened this issue Feb 16, 2022 · 11 comments

Comments

@chrisrock1984
Copy link

Works great but when the WIFI2Serial bridge gets lost, I need to restart the container.
Is there an option like "restart: unless-stopped" but called "restart: on_connection-lost" ?

BR
Chris

@jshank
Copy link
Owner

jshank commented Feb 19, 2022

I just pushed a new version that includes more resilient behavior for the socat process. It's been running stable for over a month for me. Give it a try and let me know if that fixed the disconnects.

socat pty,link=/dev/hottub,b115200,raw,echo=0 tcp4:${BRIDGE_IP}:${BRIDGE_PORT},forever,interval=10,fork &

@chrisrock1984
Copy link
Author

chrisrock1984 commented Feb 22, 2022

thx -> testing it now. If it "survives" a day, it should be fine!

@chrisrock1984
Copy link
Author

still having problems

logs

D, discarding invalid data prior to message 7e 07 10 79 7e,
D, discarding invalid data prior to message 7e 05 0a bf 06 79 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 05 7e,
D, discarding invalid data prior to message 0a bf 06 79 7e,
D, discarding invalid data prior to message 7e 05 0a,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00 3e bf 06 79 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 00 7e,
D, discarding invalid data prior to message 7e 05 10 bf 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 06 5c 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11,
D, discarding invalid data prior to message 7e 00 00 3e 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 20 ff af 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 07 00 3e 7e,
D, discarding invalid data prior to message 7e 05 0a bf 06 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 07 10 79 7e,
D, discarding invalid data prior to message 7e 05 10 bf 06 5c bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 7e,
D, discarding invalid data prior to message 7e 05 1e 00 00 b7 7e,
D, discarding invalid data prior to message 0a bf 06 79 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 04 3c 06,
D, discarding invalid data prior to message 7e 05 10 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00 3e bf 06 5c 7e,
D, discarding invalid data prior to message 7e 05 10 bf 7e,
D, discarding invalid data prior to message 06 5c 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11,
D, discarding invalid data prior to message 7e 00 00 3e 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 05 10 bf 06 5c 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 3e 7e,
D, discarding invalid data prior to message 7e 07 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 05 0a bf 06 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 79 7e,
D, discarding invalid data prior to message 7e 00 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 05 10 bf 06 5c 05 fe bf 00 ac 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 7e,
D, discarding invalid data prior to message 7e 05 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 0a bf 06 79 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00,
D, discarding invalid data prior to message 7e 05 10 3e 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00 3e bf 06 5c 7e,
D, discarding invalid data prior to message 7e 05 10 bf 7e,
D, discarding invalid data prior to message 06 5c 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 3e 7e,
D, discarding invalid data prior to message 7e 00 00 00 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 05 0a bf 05 10 bf 06 5c 7e,
D, discarding invalid data prior to message 7e 20 ff af 06 79 7e,
D, discarding invalid data prior to message 7e 07 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 05 0a bf 06 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 79 7e,
D, discarding invalid data prior to message 7e 05 10 bf 06 5c 05 0a bf 06 79 7e,
D, discarding invalid data prior to message 7e 05 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 0a bf 06 79 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 05 10 3e 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c bf 06 5c 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00 3e 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 07 10 bf 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 02 00 11 00 00 3e 7e,
D, discarding invalid data prior to message 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 b7 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11,
D, discarding invalid data prior to message 7e 00 00 3e 7e,
D, discarding invalid data prior to message 7e 05 0a bf 07 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 07 06 79 7e,
D, discarding invalid data prior to message 7e 05 0a bf 06 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 05 10 bf 06 79 7e,
D, discarding invalid data prior to message 7e 5c 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 03 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 05 0a bf 06 79 7e,
D, discarding invalid data prior to message 7e 05 10 bf 06 5c 20 4c 00 00 00 1e 00 00 0e 7e,
D, discarding invalid data prior to message 7e 05 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 0a bf 06 79 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00 03 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 0e 7e,
D, discarding invalid data prior to message 7e 05 10 3e 7e,
D, discarding invalid data prior to message 7e 20 ff bf 06 5c 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00 3e af 13 00 03 4c 10 03 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 0e 7e,
D, discarding invalid data prior to message 7e 07 10 bf 7e,
D, discarding invalid data prior to message 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11,
D, discarding invalid data prior to message 7e 00 00 3e 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 03 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 07 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 05 0a bf 00 0e 7e,
D, discarding invalid data prior to message 7e 07 06 79 7e,
D, discarding invalid data prior to message 7e 05 10 bf 06 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 5c 7e,
D, discarding invalid data prior to message 7e 05 10 bf 06 5c 20 ff af 13 00 03 4c 10 03 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 0e 7e,
D, discarding invalid data prior to message 7e 05 7e,
D, discarding invalid data prior to message 7e 07 10 bf 11 00 00 10 bf 06 5c 7e,
D, discarding invalid data prior to message 7e 05 10 3e 7e,
D, discarding invalid data prior to message 7e 05 0a bf 06 79 bf 06 5c 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 03 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 7e,
D, discarding invalid data prior to message 7e 07 10 bf 1e 00 00 0e 7e,
D, discarding invalid data prior to message 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 10 03 00 04 3c 06 03 04 00 00 00 00 00 00 00,
D, discarding invalid data prior to message 7e 05 0a 01 20 4c 00 00 00 1e 00 00 0e 7e,
D, discarding invalid data prior to message 7e bf 06 79 7e,
D, discarding invalid data prior to message 7e 20 ff af 13 00 03 4c 07 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 05 0a bf 10 03 00 04 3c 06 03 04 00 00 00 00 00 00 00 01 20 4c 00 00 00 1e 00 00 0e 7e,
D, discarding invalid data prior to message 7e 07 06 79 7e,
D, discarding invalid data prior to message 10 bf 11 00 00 3e 7e,
D, discarding invalid data prior to message 7e 05 10 bf 06,
D, discarding invalid data prior to message 7e 5c 7e

@jshank
Copy link
Owner

jshank commented Feb 22, 2022

That's a different issue. The socat changes address if you lose the TCP connection to your RS-485 to ethernet device. That actually looks like a normal debug with the new enhanced logging. It's every byte up until it gets a complete message. Thus the first 20-30 bytes could be "invalid date prior to message" right up until you get the last byte of the message. What is the symptom?

@chrisrock1984
Copy link
Author

At some point in time I am not able to control the whirlpool, using the home assistant control entities.
Also the temperature entity is not updating.
I check it by turning on the led light. If the switch goes back to off, the whirlpool cannot be controlled anymore.
When I restart the container within portainer it is working again....for some time at least.

Any ideas what I can do or provide to you to help finding the bug?

Thx a lot for your help

My System
X86
Debian Linux
Home Assistant Supervised
Installed your docker container using docker compose
Home Assistant is showing a warning for an unsupported software installed beside Home Assistant

@jshank
Copy link
Owner

jshank commented Mar 6, 2022

I'm running into the same thing. It's acting a bit like an overflow or memory leak. Your best bet would be to rule out my docker container and install balboa worldwide app directly and see if the problem persists. If it does, open an issue against the project with relevant logs, if not, let me know and I'll keep digging into the docker image. I just have a cron job that restarts the container nightly for now until I have more time to troubleshot.

@funks81
Copy link

funks81 commented May 11, 2023

Just wondering if you ever got to the bottom of this? Have managed to get it set up and running - but after a while seems to become unresponsive until I restart the container within portioner.

@da2001
Copy link

da2001 commented May 20, 2023

same here. connection drops after a while

@jshank
Copy link
Owner

jshank commented Jun 26, 2023

I've released a new version that uses a more stable connection method. Give version 2023.06 a try and see if that improves things for you. I've gone a week without needing to restart the container.

Thanks to @supersebbo for the suggestion and research to address this.

@da2001
Copy link

da2001 commented Jun 27, 2023

thanks a lot! i have already updated and give it a try

@funks81
Copy link

funks81 commented Jul 7, 2023

sorry - very newbie user here - my docker-compose file has following:

services:
bwalink:
image: ghcr.io/jshank/bwalink:latest
container_name: bwalink

does this mean it should have already updated to the above image?

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

4 participants