Remoting a Z-Wave Stick

Posted on
Fri Feb 08, 2019 7:05 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Remoting a Z-Wave Stick

Asconasny wrote:
...sadly the network socket or rfc2217 is not implemented in the rfxcom plugin. only usb.
So no luck getting that to work.

Au contraire... You can map the socket connection to a device in/dev. Check out socat.

Posted on
Fri Feb 08, 2019 7:12 am
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: Remoting a Z-Wave Stick

wait..what!

there goes my weekend :D

Posted on
Fri Feb 08, 2019 10:08 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Remoting a Z-Wave Stick

berkinet wrote:
I found the source of the problem. In IndigoPluginHost.app/Contents/Resources/PlugIns/serialinterface.py, at line 501 writeTimeout is set to 2.0. Setting it to None resolves the issue with rfc2217 connections. However, I am not suggesting this change is the fix, it may well cause other issues, I just wanted to report that I had found the root of the problem

To summarize, the exception only occurs with rfc2217 connections because pyserial currently never handles non-None writeTimeout values for that connection type, correct? If so, then I will add a condition to that code in serialinterface so that None is passed (but only for rfc2217 connections). Does that sound reasonable, and will they be helpful for you?

Image

Posted on
Fri Feb 08, 2019 10:13 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Remoting a Z-Wave Stick

matt (support) wrote:
berkinet wrote:
I found the source of the problem. In IndigoPluginHost.app/Contents/Resources/PlugIns/serialinterface.py, at line 501 writeTimeout is set to 2.0. Setting it to None resolves the issue with rfc2217 connections. However, I am not suggesting this change is the fix, it may well cause other issues, I just wanted to report that I had found the root of the problem

To summarize, the exception only occurs with rfc2217 connections because pyserial currently never handles non-None writeTimeout values for that connection type, correct? If so, then I will add a condition to that code in serialinterface so that None is passed (but only for rfc2217 connections). Does that sound reasonable, and will they be helpful for you?

Matt:

That sounds quite reasonable. As to the degree of help it will bring. I am not sure. In theory rfc2217 offers options for an application to automatically configure a serial over IP connection. That would be a potentially good thing, if supported by the client and server. However, I am not really sure to what extent that is true. I think ser2net will do that on its end, and since pyserial offers rfc2217 support, it should do that too. However, I have not figured out how to really test it. I'll see what I can do.

OTOH, if you don't do the fix, then there is really no point in continuing to offer rfc2217 support for Z-Wave, since it is a non-starter.

Sorry for such a long response to a simple question.

Posted on
Fri Feb 08, 2019 10:19 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Remoting a Z-Wave Stick

Got it – thanks for doing the research and I'll get the change put into the next release.

Image

Posted on
Fri Feb 08, 2019 1:33 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Remoting a Z-Wave Stick

berkinet wrote:
Asconasny wrote:
...sadly the network socket or rfc2217 is not implemented in the rfxcom plugin. only usb.
So no luck getting that to work.

Au contraire... You can map the socket connection to a device in/dev. Check out socat.

Hmmm. This may not work on recent MacOSs. It seems they have cracked down on the ability to create arbitrarily named devices in /dev. Since, HighSierra, and maybe Sierra, Apple has really limited user access to os internals. So symlinking a /dev/xxx device to a name indigo.server.serialPort will recognize is possibly no longer possible from the terminal.

Since since RFXCOM plugin uses for its list of possible interfaces, you can't map some remote service into that space. I am looking into a work-around.

Posted on
Fri Feb 08, 2019 2:35 pm
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: Remoting a Z-Wave Stick

thanks for confirming this.
Been struggelig trying to get this working, even tried to turn off the System Integrity Protection. (SIP) no luck
A work-around would be much appreciated. :)

Posted on
Fri Feb 08, 2019 2:44 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Remoting a Z-Wave Stick

Asconasny wrote:
thanks for confirming this.
Been struggelig trying to get this working, even tried to turn off the System Integrity Protection. (SIP) no luck
A work-around would be much appreciated. :)

BTW, one thing you need to do, though it won't help this situation, is go to System Preferences ->Security & Privacy -> Privacy and select Full Disk Access in the left column and then add (+) Terminal.

Posted on
Fri Feb 08, 2019 2:50 pm
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: Remoting a Z-Wave Stick

already done. :D
First thing i tried when i had trouble with this.
and like you said, didnt help.

Posted on
Fri Feb 08, 2019 2:51 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Remoting a Z-Wave Stick

Asconasny wrote:
already done. :D
First thing i tried when i had trouble with this.
and like you said, didnt help.

FYI

Posted on
Fri Feb 08, 2019 3:52 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Remoting a Z-Wave Stick

Asconasny wrote:
already done. :D
First thing i tried when i had trouble with this.
and like you said, didnt help.

BTW, you might give https://virtualhere.com a try. It has trouble with some os-x serial devices, but, might also work... and solve your problem. Works fine on the R-Pi, though the config can be a little confusing. It is free for one device.

Who is online

Users browsing this forum: No registered users and 9 guests