-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
[feat] Add socat/remote zwave device option #2345
Comments
@vlycop Did you consider using ser2net ? |
No, because at risk of saying something complety wrong, it is the same ? But you mentioning it again made me look at it and found all of those resolved issue so i've search for ser2net or
Did i miss something obvious ? |
@vlycop in the serlport input you can manually write the tcp url in the format |
Oh, Cool ! i didn't found that in the doc and the last issue did hint about it. I'll try to see if this work with a socat server, but it should. for exemple my socat look like this right now
I believe having a s2 secured zwave network end up silly if all communication go through unencrypted in the network. |
I think this is something that would require changes also on zwave-js level cc @AlCalzone |
To keep thing safe for now, i'm double bouncing with ease
The driver don't seam to timeout and retry if the serial port is closed when it start. |
Actually, I have no clue what's necessary to connect to a secure socat instance. The network connection is just a simple TCP socket. Regarding the automatic reconnection, there seems to be something broken: |
Thank you for the doc, I'll read it tomorrow. No promises tho. |
If this is about the secure connection, As for the reconnection:
|
Would it be possible to use https://nodejs.org/docs/latest-v17.x/api/tls.html instead of https://nodejs.org/docs/latest-v17.x/api/net.html when cert are provided ? |
i am surprised to not see a connectListener here https://github.com/zwave-js/node-zwave-js/blob/966e51fc81eb7a1686f9ac94971a06bab5ed26f1/packages/serial/src/ZWaveSocket.ts#L17 in the connect section, but i don't know much about JS syntax
|
Its the callback to The missing |
@AlCalzone Can I move this to zwavejs? |
|
i'll close this and iopen another one if/when new config field are needed for ssl. |
@robertsLando out of curiosity, what does the restart on failed ? If this is a managed in the front end, then it might be more an issue for here than for AICalzone ? Edit: I think i've seen the issue in zwavejs, the error is never emitted and i've read that you use that error to know when to restart. |
Exactly |
Is your feature request related to a problem? Please describe.
I am slowly moving to docker to make it easier to manage for my relative.
The docker instance in on a virtual environment where i cannot pass usb device directly
Because of this, i use ssl socat server on a raspberry A who's only job is to provide device to VM
Because of docker/for-linux#77, i can't use the "device" option to mount my zwave device, and have to use the "volume" as a work around.
This have the huge drawback that if the connection is restarted between the raspberry and the VM (because the vm migrated, because timed out, because the router cleaned up state) the device in the zwavejs container will "freeze" and report I/O error.
This isn't seen by the /health endpoint, so i cannot restart the container, but to be fair i would prefer not to anyway.
With the actual capability, a lost in network connection break the docker service, and that breakage isn't reported in the /health endpoint so Zwave will be unavailable until a user realize and restart it manually.
Describe the solution you'd like
I would like to be able to specify an IP and a port of a socat server instead of a /dev/XXX device, maybe with a cert and a CA to keep SSL. That way the connection can be restarted when detected closed from inside the docker images, not forcing a full network restart and not forcing user action
Describe alternatives you've considered
Additional context
i've look into any issue already closed to make sure you didn't already excluded that usecase, but didn't find anything.
I don't know if i am the only one with that use-case, but Home assistant droping OpenZwave (Good !) mean i have to make this project work now and i didn't find an alternative to socat.
The text was updated successfully, but these errors were encountered: