-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
URTSI binding makes it impossible to use other serial ports in other bindings #1351
Comments
I have the same problem and can confirm that this is still a problem in 1.5.1. More information and debug logs for this problem can be found here: https://groups.google.com/forum/#!searchin/openhab/collision/openhab/IaS6gHt9h8w/7fXXk-VvwKQJ Rainer |
Hello, I have here a method on how to duplicate this issue without having a z-wave and urtsi interface. The idea is to create on a linux server virtual serial devices that get linked to the ttyUSBx interfaces and then configure and start openhab with the z-wave and the urtsi addon. This method needs the socat linux executable to be installed. Then you could see that the z-wave port is reported as not being existent. simulate urtsi device: socat -d -d pty,raw,echo=0 pty,raw,echo=02014/10/13 17:52:58 socat[7873] N PTY is /dev/pts/4 This creates the /dev/pts/4 and /dev/pts/5 device nodes. Link one of them to ttyUSB0 ln -s /dev/pts/4 /dev/ttyUSB0On a new shell connect to the /dev/pts/5 where you would see what is transferred via ttyUSB0 cat < /dev/pts/5simulate z-wave device: socat -d -d pty,raw,echo=0 pty,raw,echo=02014/10/13 17:54:43 socat[7972] N PTY is /dev/pts/7 This creates the /dev/pts/7 and /dev/pts/8 device nodes. ln -s /dev/pts/7 /dev/ttyUSB1On a new shell connect to the /dev/pts/8 where you would see what is transferred via ttyUSB1 cat < /dev/pts/8openhab configuration:
urtsi:beschattung.port=/dev/ttyUSB0
Rollershutter Rolladen1Wintergarten "Wintergarten 1" (FF_TV, All) { urtsi="beschattung:1" }
I hope this helps to identify the problem ... Rainer |
If someone have a look at the relevant commit, it should be clear, that this will break other serial port usage. Also adding something to a system property will fail (I am not a java guru, but as I know there is the same "logic" as used by other languages [C,C++,...]). |
I have a short look at the nrjavaserial code base and asked upstream: NeuronRobotics/nrjavaserial#23 |
There has to be a thread-safe way to add ports to the system property. Anyway, I will change the URTSI binding in order to add additional ports instead of deleting the old values. |
Configurable command interval Signed-off-by: Oliver Libutzki <oliver@libutzki.de>
Fix for Issue #1351 - URTSI binding makes it impossible to use other serial ports in other bindings
Configurable command interval Signed-off-by: Oliver Libutzki <oliver@libutzki.de>
* master: Bugfix for issue openhab#1351 Configurable command interval Removed annoying bin folders including .project files issue openhab#2027 - added modified callback for dynamic changes to the binding configuration Fix RRD4J error at midnight changed the archetype default binding project according to openhab#2720 updated the copyright header with the year 2015 added immediate="true" flag to binding.xml, otherwise the binding does not get started automatically removed unnecessary imports removed the Activator. The bundleContext is available from the call to the activate method. The static Activator access is discouraged, since it is only valid when the bundle is ACTIVE, however, any code could access the static variable at any point in time Adds the leviton vrcz4-m0z to the zwave database
* zwave-database_updates: Add TKB TZ06 Update codes for Fibaro universal sensor Bugfix for issue openhab#1351 Configurable command interval Removed annoying bin folders including .project files issue openhab#2027 - added modified callback for dynamic changes to the binding configuration Fix RRD4J error at midnight changed the archetype default binding project according to openhab#2720 updated the copyright header with the year 2015 added immediate="true" flag to binding.xml, otherwise the binding does not get started automatically removed unnecessary imports removed the Activator. The bundleContext is available from the call to the activate method. The static Activator access is discouraged, since it is only valid when the bundle is ACTIVE, however, any code could access the static variable at any point in time
* zwave-initialisation: Bugfix for issue openhab#1351 Configurable command interval Removed annoying bin folders including .project files issue openhab#2027 - added modified callback for dynamic changes to the binding configuration Fix RRD4J error at midnight changed the archetype default binding project according to openhab#2720 updated the copyright header with the year 2015 added immediate="true" flag to binding.xml, otherwise the binding does not get started automatically removed unnecessary imports removed the Activator. The bundleContext is available from the call to the activate method. The static Activator access is discouraged, since it is only valid when the bundle is ACTIVE, however, any code could access the static variable at any point in time
Configurable command interval Signed-off-by: Oliver Libutzki <oliver@libutzki.de>
seem to be fixed through various commits … |
Signed-off-by: Karel Goderis <karel.goderis@me.com>
The change 675c67d in the URTSI binding replaces the gnu.io.rxtx.SerialPorts list by the single item configured for the URTSI binding (effectively removing existing items from that list). Instead of this it should add the configured port string to the list. (Note: non-symlinked ports like /dev/ttyUSB* must also be on the list if you want to open them, they are present by default but deleted by this binding)
As a result, any other bindings wanting to use other serial ports will be unable to open them (even if they are non-symlinked ports)
Example reproduction scenario:
-configure /dev/ttyUSB0 for Z-Wave
-configure /dev/ttyUSB1 for URTSI
-start OpenHAB
->Z-Wave binding won't be able to open the configured port!
The text was updated successfully, but these errors were encountered: