Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

[question] Possibility to connect to a TCP serial #243

Closed
wilmardo opened this issue Feb 6, 2020 · 6 comments
Closed

[question] Possibility to connect to a TCP serial #243

wilmardo opened this issue Feb 6, 2020 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@wilmardo
Copy link

wilmardo commented Feb 6, 2020

First of all, thanks for the awesome work on this!

At this moment I am running the software in a Kubernetes cluster with the container pinned on the node where the USB is plugged in. I would love to decouple the Zwave stick from the cluster(node) to be able todo failovers of the container.

I came across this section over at Zigbee2MQTT:
https://www.zigbee2mqtt.io/information/connecting_cc2530.html#via-an-esp8266

This inspired me an I ordered a Razberry Zwave module (https://z-wave.me/products/razberry/) and connected it to a esp-link flashed ESP8266 to be able to do serial over the network.

But when I tried to connect with tcp://192.168.1.10:23 as device string it would only error.
So I tried searching the codebase how the serial-port library is evoked but had a hard time finding it.

Could you shine some light over this? Should this work out of the box? Is there a code adaption needed, if so where should I start to look?

Thanks for the read! ❤️

@wilmardo wilmardo added the question Further information is requested label Feb 6, 2020
@robertsLando
Copy link
Member

@wilmardo AFAIK tcp isn't supported. But maybe @Fishwaldo (Openzwave author) can help you with this :) (I'm curious too)

@Fishwaldo
Copy link
Member

It wont work. OZW expects a Serial Device...

You could try configuring USB/IP on your kernel

@wilmardo
Copy link
Author

wilmardo commented Feb 7, 2020

@Fishwaldo Thanks for the clarification! USB/IP isn't suitable since it implements it's own protocol.

For future reference the two implementation of RFC2217 I am looking into at the moment are:

If I won't forget I will update the issue when I find on of the solutions viable :)

@robertsLando
Copy link
Member

Keep us updated!

@wilmardo
Copy link
Author

@robertsLando @Fishwaldo I wrote a blogpost on my progress so far since it was a long road, way to long to explain in a Github issue :)
https://lansible.com/2020/03/the-adventure-to-a-remote-z-wave-usb-part-1/

TLDR:
I got it somewhat working with a Z-Wave.me RaZberry and ttynvt for the connection to the ESP8266 running jeelabs/esp-link. But I am now running into dropped commands and the Z-Wave devices not switching.

2020-03-19T12:49:30.913Z z2m:Mqtt Message received on homeassistant/2/37/1/0/set
2020-03-19 12:49:32.352 Warning, Node002, WARNING: Checksum incorrect - sending NAK
2020-03-19 12:49:33.353 Warning, Node002, WARNING: Checksum incorrect - sending NAK
2020-03-19 12:49:41.276 Error, Node002, ERROR: Dropping command, expected response not received after 1 attempt(s). Command: "SwitchBinaryCmd_Get (Node=2): 0x01, 0x09, 0x00, 0x13, 0x02, 0x02, 0x25, 0x02, 0x25, 0x33, 0xd4"
2020-03-19T12:49:41.280Z z2m:Zwave Notification from node 2: Notification - TimeOut (1)

See the Hooking it up to Zwave2MQTT, second try heading for just the issues I am having now.

Does one of you have an idea how to troubleshoot this further?

@Fishwaldo
Copy link
Member

WARNING: Checksum incorrect - sending NAK

The data that OZW is receiving is corrupt. So it’s still something at your CUSE/ESP level. I’d go back to validating that really is passing packets etc without drops and so on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants