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

Add ser2net mDNS USB serial discovery #2519

Merged
merged 3 commits into from
Nov 12, 2021
Merged

Conversation

wborn
Copy link
Member

@wborn wborn commented Oct 11, 2021

  • Add support for using multiple UsbSerialDiscovery services
  • Add Ser2NetUsbSerialDiscovery that can use mDNS to discover ser2net RFC2217 serial ports
  • Use discovered USB ports in SerialConfigOptionProvider

mDNS discovery is supported in ser2net 4.3.0 and newer.
E.g. you can install a ser2net version that provides this using APT in Ubuntu 21.04 and Debian 11.

Example ser2net YAML configuration that allows a serial port to be discovered using mDNS discovery:

%YAML 1.1
---
connection: &con01
  accepter: telnet(rfc2217),tcp,2222
  connector: serialdev,/dev/ttyUSB0
  options:
    mdns: true
    mdns-sysattrs: true
    mdns-name: devicename

Closes #1511

@wborn wborn added the enhancement An enhancement or new feature of the Core label Oct 11, 2021
@wborn wborn marked this pull request as ready for review October 13, 2021 21:56
@wborn wborn requested a review from a team as a code owner October 13, 2021 21:56
@wborn wborn requested review from a team and removed request for a team October 27, 2021 20:43
* Add support for using multiple UsbSerialDiscovery services
* Add Ser2NetUsbSerialDiscovery that can use mDNS to discover ser2net RFC2217 serial ports
* Use discovered USB ports in SerialConfigOptionProvider

mDNS discovery is supported in ser2net 4.3.0 and newer.
E.g. you can install a ser2net version that provides this using APT in Ubuntu 21.04 and Debian 11.

Example ser2net YAML configuration that allows a serial port to be discovered using mDNS discovery:

%YAML 1.1
---
connection: &con01
  accepter: telnet(rfc2217),tcp,2222
  connector: serialdev,/dev/ttyUSB0
  options:
    mdns: true
    mdns-sysattrs: true
    mdns-name: devicename

Closes openhab#1511

Signed-off-by: Wouter Born <github@maindrain.net>
@wborn wborn added rebuild Triggers the Jenkins PR build and removed rebuild Triggers the Jenkins PR build labels Nov 3, 2021
@wborn
Copy link
Member Author

wborn commented Nov 12, 2021

If you don't have any review comments, please merge this @openhab/core-maintainers. 😉

Copy link
Contributor

@cweitkamp cweitkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks very good. I left two comments for my understanding.

Signed-off-by: Wouter Born <github@maindrain.net>
Signed-off-by: Wouter Born <github@maindrain.net>
Copy link
Contributor

@cweitkamp cweitkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you very much.

@cweitkamp cweitkamp merged commit 917e268 into openhab:main Nov 12, 2021
@cweitkamp cweitkamp added this to the 3.2 milestone Nov 12, 2021
@wborn wborn deleted the ser2net-discovery branch November 12, 2021 22:28
@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

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
* Add ser2net mDNS USB serial discovery

* Add support for using multiple UsbSerialDiscovery services
* Add Ser2NetUsbSerialDiscovery that can use mDNS to discover ser2net RFC2217 serial ports
* Use discovered USB ports in SerialConfigOptionProvider

mDNS discovery is supported in ser2net 4.3.0 and newer.
E.g. you can install a ser2net version that provides this using APT in Ubuntu 21.04 and Debian 11.

Example ser2net YAML configuration that allows a serial port to be discovered using mDNS discovery:

%YAML 1.1
---
connection: &con01
  accepter: telnet(rfc2217),tcp,2222
  connector: serialdev,/dev/ttyUSB0
  options:
    mdns: true
    mdns-sysattrs: true
    mdns-name: devicename

Closes openhab#1511

Signed-off-by: Wouter Born <github@maindrain.net>
GitOrigin-RevId: 917e268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[discovery] RFC2217 Discovery Service
3 participants