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

[Q] How to add a rfc2217://.. port in the UI (PaperUI, Habmin) #1029

Closed
curlyel opened this issue Sep 11, 2019 · 9 comments
Closed

[Q] How to add a rfc2217://.. port in the UI (PaperUI, Habmin) #1029

curlyel opened this issue Sep 11, 2019 · 9 comments

Comments

@curlyel
Copy link

curlyel commented Sep 11, 2019

I'm trying to use rfc2217://... remote serial ports with the Zigbee and Zwave binding.
When opening the serial port configuration for the dongles, I get a drop down list containing all local serial ports available in the underlaying Debian operation system and the JVM (physical as well as socat-provided virtual serial ports).

The list is pre-populated with the names of available serial ports but does not allow manual add of any port (e.g. undiscovered rfc2217://<ip>:<port>)

But how to configure (add) a rfc2217 port then?

This list is not editable (same for PaperUI and Habmin):
image

This is the platform:

Release   = Debian GNU/Linux 9 (stretch)
Kernel    = Linux 4.9.0-8-amd64
Platform  = VMware Virtual Platform
openHAB   = openHAB 2.5.0~M2-1 (Milestone Build)
Java      = Zulu 8.40.0.25-CA-linux64

Moved to here from openhab-webui openhab/openhab-webui#117 according @cdjackson 's advice:

.... since it’s populated by OH Core, and not the UI.

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

@kaikreuzer
Copy link
Member

I would say that this is a bug in the Z-Wave and Zigbee bindings.
If I look at the parameter definition, it does not define limitToOptions=false and its default value is true.
I would hope that changing it in the XMLs in the binding will solve the issue.
@cdjackson Could you give it a try?

@cdjackson
Copy link
Contributor

cdjackson commented Sep 13, 2019 via email

@cdjackson
Copy link
Contributor

So looking at this, we used to have this same configuration as it is now, then someone (I forget who) added the context="serial-port" and if I understand correctly, this has now broken things?

There is no limitToOptions and no default value. wouldn't it make sense that if these settings are required to be set, that it is done in a central place so that all bindings using this system work?

@cdjackson
Copy link
Contributor

To emphasise my point that this should be resolved centrally, I did a search on the openhab2-addns folder. <context>serial-port</context> appears in 27 bindings - I didn't check all of them, but the first few that I checked are all configured the same as the ZigBee and ZWave binding - so that means that this "bug" in the bindings needs to be solved in over 30 places (given there are 4 or 5 places in the ZigBee binding, plus ZWave, plus potentially 27 other bindings).

I really think that this issue should be resolved in a single place - ie where-ever the config description is updated to add the . If that's not possible, then we'd need to fix it in all of the bindings using serial-context.

@kaikreuzer
Copy link
Member

It is a general behavior that when config options are provided, the UI shows them. There is no way to provide the limitToOptions value other than in the config descriptions themselves.

If that's not possible, then we'd need to fix it in all of the bindings using serial-context.

In theory yes, but we might first want to check whether those bindings work in general with the rfc2217 ports - I am not so sure that this is the case for all of them.

@cdjackson
Copy link
Contributor

In theory yes, but we might first want to check whether those bindings work in general with the rfc2217 ports - I am not so sure that this is the case for all of them.

This issue, while opened against RFC2217 in my opinion is more general since I often see people on the forum complaining that their serial port is not listed in the list of ports as it wasn't picked up by whatever in the system provides this list. IMHO allowing users to type in their serial port themselves is a good idea. For example, I think if people use symbolic links to non-physical ports, it may not get picked up.

IMHO from a binding perspective, this is counter intuitive. The binding doesn't know anything about a list of options that is being added somewhere else in the system, so it doesn't add things like limitToOptions. In some systems, this turns into a list of options, in other systems, it doesn't (a Mac doesn't provide a list - it just gives me a text box).

It seems to me that when we add a context to a description, that context should be able to change the description and if it can't, that seems to be a shortfall. Either that or we could remove the context?

@kaikreuzer
Copy link
Member

IMHO allowing users to type in their serial port themselves is a good idea.

Ok, agreed.

IMHO from a binding perspective, this is counter intuitive.

Yes, maybe. But the serial port is a special case anyhow as we don't have the situation for other parameters that the options are provided by the system and not by the binding.
I don't see an easy way to change it (and also don't think it is worth the effort to do major changes to the framework features just to cater for this special case), so my suggestion would be to stick with the suggested solution and simply add the limitToOptions info to the concerned config descriptions as it will nicely solve the issue.

@cdjackson
Copy link
Contributor

Agreed - it's not the nicest, but I agree that it's not worth the hassle. I've now implemented this in ZigBee so it should now support RFC2217.

This can presumably now be closed.

@curlyel
Copy link
Author

curlyel commented Oct 6, 2019

Many thanks!

wborn added a commit to wborn/openhab-addons that referenced this issue May 13, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
cpmeister pushed a commit to openhab/openhab-addons that referenced this issue May 13, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
LoungeFlyZ pushed a commit to LoungeFlyZ/openhab2-addons that referenced this issue Jun 8, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
J-N-K pushed a commit to J-N-K/openhab-addons that referenced this issue Jul 14, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this issue Jul 26, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
Signed-off-by: CSchlipp <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this issue Sep 1, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
Signed-off-by: Daan Meijer <[email protected]>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this issue Sep 19, 2020
When serial port options are limited it is only possible to configure discovered ports.
RXTX discovery only detects standard serial ports.
The serial transport adds undiscovered ports to 'gnu.io.rxtx.SerialPorts' so this way users do not need to manually configure it.
RFC2217 ports cannot be detected so if the ports are limited it is not possible to configure these using UIs.

Related to:

* openhab/openhab-core#1029
* openhab/openhab-core#1462

Signed-off-by: Wouter Born <[email protected]>
Rosi2143 pushed a commit to Rosi2143/openhab-core that referenced this issue Dec 26, 2020
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

No branches or pull requests

3 participants