-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Unified support for hardware vs virtual (e. g. over IP) serial #1912
Comments
Your example with the Sony Projector binding is not the best choice as the protocol is different for serial and IP. |
Sony is in fact even more complex. Some projectors feature a native Ethernet port, and for them communication protocol is different from those which have RS232 connector. But you could also route that RS232 via a 3rd party TCP bridge, and in this case the protocol would be the same, the binding supports such a configuration too. Well, offtopic :) |
I am the author of the Sony Projector binding so yes I know it well lol The serial abstraction is just the serial stuff from the core framework we use in bindings. If you want to use serial over IP, you just have to use a special serial port name starting with RFCxxxx. Sorry I don't remember the number. That is the theory. In practice, I was not able to make it work when developing one binding. But I did not try again recently. |
The core already supports serial over IP using RFC2217. To use such a port you configure the hostname/port of the server using a URL like You can for instance run a cheap RFC2217 server using a Raspberry Pi and Sometimes a binding needs to be slightly adapted before it supports RFC2217 connections, see: |
I am currently writing two bindings for different hardware pieces, both using serial line. I am looking at SonyProjector as a reference, and i see it implements multiple types of Bridge: serial, serial over TCP, serial over UDP, etc. But this applies not only to Sony projectors, but also to any other serial devices. It's possible to order IP-to-serial bridge as a discrete component and use it with any device you want. Very useful in many practical situations. Currently bindings have to code such a support themselves, and it's not good. What if openhab's core could provide some abstract service for handling both physical and virtual serial ports ?
The text was updated successfully, but these errors were encountered: