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

Fix RFC2217 for Zigbee #661

Merged
merged 1 commit into from
Oct 2, 2021
Merged

Fix RFC2217 for Zigbee #661

merged 1 commit into from
Oct 2, 2021

Conversation

dschall
Copy link
Contributor

@dschall dschall commented Jul 8, 2021

This change skips enumerating all available COM ports when rfc2217 is used.
It also adds a call to flush() to both write() methods to make remote connections work.
Finally, it refactors some of the exception handling to take into account that some calls may fail without bringing down the whole connection.

Signed-off-by: Daniel Schall <[email protected]>
@dschall
Copy link
Contributor Author

dschall commented Jul 8, 2021

@cdjackson , not sure if you'll see new PRs automatically or if you need a ping..

@cdjackson
Copy link
Contributor

Is it not possible to implement this in the serial implementation rather than the binding. That would also then (presumably) resolve it for other bindings as well without having to make this change everywhere?

@dschall
Copy link
Contributor Author

dschall commented Jul 12, 2021

I don't think it's possible to fix this in the serial implementation.
We'll have to skip the call to serialPortManager.getIdentifiers() here, because RCF2217 ports can't be discovered, so we'll always get an empty list back if no other serial ports are available on the system (or they are in use already).

Plus, we'll have to make at least one change in this binding:
RFC2217 won't work without the call to flush after writing.

@giuliano-favro
Copy link

Shall be also possible to use 'socket://' instead 'rfc2217'?

@cdjackson cdjackson merged commit 436d4a9 into openhab:main Oct 2, 2021
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/solved-zwave-zigbee-rfc2217-remote-serial-port-howto/81633/123

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

Successfully merging this pull request may close these issues.

4 participants