The serialport.jar has to be executed after every reboot to get the stick ONLINE again after reboot. No big problem
This can be solved with a simple script, which is executed at boot time. However, it can happen that the USB stick does not necessarily always get the same port name.
To solve this, you can define a udev rule to create a symlink so that the port name for the WMS stick is always /dev/warema.
1.) Check which is the ATTRS{serial} of your WMS stick: udevadm info --name=/dev/ttyUSB0 --attribute-walk
2.) Edit /lib/udev/rules.d/99-usbsticks.rules and add the following line (pls. replace ABC12345 with the ATTRS{serial} of your WMS stick)
Hi,
Iâm not sure whether thatâs a bug.
The problem only occurs to me when a connection should be established via TCP/IP and the stick has not been opened on the server side before.
If, after successful initialization, the stick is pluged out and pluged in again, the tcp connection is lost and cannot be restored from the client side (until the server side is reinitialized).
This is only the case with the WMS stick. With other USB sticks, e.g. RFXTRX or Enocean, I do not have this problem.
But the workaround described above works quite well for me and I can live with it
would it be possible to plug the WMS Stick into a docker host machine and use the stick inside an openhab docker container? If so which devices I have to pass from the host machine to the docker container?
Okay, you mean the serial port is not initialized correctly.
So far I donât have java installed on my host machine. Thatâs the reason why I use dockerâŠ
I have set the log level to debug. Now I get the following output in openhab.log:
2020-04-29 09:48:35.534 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Checking OpenWMS transceiver connection, thing status should be = OFFLINE
2020-04-29 09:48:35.536 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Connecting to OpenWMS transceiver
2020-04-29 09:48:35.538 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Disconnecting
2020-04-29 09:48:35.560 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener stopped
2020-04-29 09:48:35.562 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Interrupt serial listener
2020-04-29 09:48:35.568 [DEBUG] [penwms.connector.OpenWMSStreamReader] - Data listener stopped
2020-04-29 09:48:35.570 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial out stream
2020-04-29 09:48:35.572 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial in stream
2020-04-29 09:48:35.574 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial port
2020-04-29 09:48:35.579 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Closed
2020-04-29 09:48:35.581 [INFO ] [wms.connector.OpenWMSSerialConnector] - Connecting to OpenWMS USB at /dev/ttyUSB0
2020-04-29 09:48:35.583 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Jetzt gehts los
2020-04-29 09:48:35.600 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener started
2020-04-29 09:48:35.603 [DEBUG] [penwms.connector.OpenWMSStreamReader] - Data listener started
2020-04-29 09:48:35.905 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Try to send to controller
Are you sure the serial port initialization issue is the root cause?
Hi,
i donât know why, but with the default libs from openhab2 the usb-stick is not initialized correctly. It is sufficient to open the serial port once with other libs (e.g. jssc).
To solve this problem I still have to search for solutions âŠ
Only for testing purposes I have included a workaround in the binding to initialize the serial port.
If you use it, please give me a short feedback if it works stable for you or not.
But please note that it is only a quick an dirty solution and the usage is at your own risk!
download the Workaround and replace the original binding in the addon folder.
restart openhab
(You may need to copy the lib jssc.jar to the addon folder as well)
Hello Rainer, now warema stick is online but i donÂŽt know how to find the panid of my blind actuator because scan is not working or i do anything wrong. My remote is the warema comfort when i start scan for things in inbox (L on remotecontrol pressed and remote is scanning) it only scans for about 1-2 seconds with no result. Do you have an idea whatÂŽs my fault?
after an update from openhab 2.5.1 to 2.5.5 I always got an Error in openhab.log:
2020-06-08 11:47:40.744 [ERROR] [openwms.handler.OpenWMSBridgeHandler] - Error occurred when trying to load native library for OS 'Linux' version '4.19.97-v7l+', processor 'arm' java.lang.UnsatisfiedLinkError: /openhab/.jssc/linux/libjSSC-2.7_armsf.so: /openhab/.jssc/linux/libjSSC-2.7_armsf.so: cannot open shared object file: No such file or directory
But I have checked the directory and the file /openhab/.jssc/linux/libjSSC-2.7_armsf.so is available:
-rw-r--r-- 1 openhab openhab 10539 Jun 11 15:45 libjSSC-2.7_armsf.so
Also I have downloaded and copied the jssc.jar file into the addons-Folder, but still have this issue. Do you have an idea whatâs going wrong here?
One additional note: the stick was working with openhab version 2.5.1 before in the same environment.
Iâm using the lastest openwms jar from https://github.com/zeezee300/openwms.
I have other USB devices (somfy, eleroâŠ) working with openhab, so serial connection is no issue.
I have added the " OpenWMS WAREMA WMS-Stick Transceiver" thing and it shows that it is ONLINE.
Here is the conencton output:
12:34:27.182 [DEBUG] [.openwms.handler.OpenWMSBridgeHandler] - Initializing WMS bridge handler
12:34:27.201 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'openwms:bridge:dfb13bb2' changed from INITIALIZING to OFFLINE
12:34:27.218 [DEBUG] [.openwms.handler.OpenWMSBridgeHandler] - Checking OpenWMS transceiver connection, thing status should be = OFFLINE
12:34:27.226 [DEBUG] [.openwms.handler.OpenWMSBridgeHandler] - Connecting to OpenWMS transceiver
12:34:27.251 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Disconnecting
12:34:27.271 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Closed
12:34:27.278 [INFO ] [nwms.connector.OpenWMSSerialConnector] - Connecting to OpenWMS USB at /dev/ttyUSB2
12:34:27.285 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Jetzt gehts los
12:34:27.303 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 1 - open Port
12:34:27.318 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 2
12:34:27.325 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 3 230400
12:34:27.333 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 4
12:34:27.340 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 5
12:34:27.348 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 6
12:34:27.355 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 7
12:34:27.363 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port event listener started
12:34:27.383 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 10 - workaround
12:34:27.386 [DEBUG] [openwms.connector.OpenWMSStreamReader] - Data listener started
12:34:27.400 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Workaround ## start Port: /dev/ttyUSB2
12:34:27.505 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Workaround ## Versuch 1
12:34:27.522 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Workaround ## ende
12:34:27.531 [DEBUG] [.openwms.handler.OpenWMSBridgeHandler] - Try to send to controller
12:34:27.563 [DEBUG] [.openwms.handler.OpenWMSBridgeHandler] - Message received: {gWMS USB-Stick}
12:34:27.576 [DEBUG] [.openwms.handler.OpenWMSBridgeHandler] - Get USB-Stick Version
12:34:28.548 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'openwms:bridge:dfb13bb2' changed from OFFLINE to ONLINE
12:34:28.568 [DEBUG] [.openwms.handler.OpenWMSBridgeHandler] - Message received: {v37605107 }
12:34:28.579 [DEBUG] [.openwms.handler.OpenWMSBridgeHandler] - Set USB-Stick Version
Now Iâm trying to add my blindds.
Iâm setting the remote in scan mode (L button, waiting for green light than red/orange) and are trying to discover a new OpenWMS binding thing in Openhab Paper UI but it is not found.
As I donât know the device ID, device serial and PANID I canât add it manually.
How can I proceed?
How to find out what fails during scan?
Anyway to retrieve the deviceId, serialID and PANID? I have WMS studio and toolkit on Windows, but no idea how to use it to retrieve those information.
Hey @rainer300, would you mind also publishing the source code, and not only the compiled JAR?
The binding is still quite unstable - it takes multiple tries before it can connect to the stick, and restarting openhab makes it unusable - the stick has to be physically unplugged/replugged.
Having access to the latest source code will definitely be helpful
@rainer300
Thank you for the new version, which is an improvement for me! Now I get rid of the UnsatisfiedLinkError of the libjSSC-2.7_armsf.so.
But unfortunately I donât get the Warema Stick Online. In the past I run the serialport.jar file and the Thing was Online. Now that does not help. Here is my log:
2020-07-07 07:59:51.598 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Checking OpenWMS transceiver connection, thing status should be = OFFLINE
2020-07-07 07:59:51.600 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Connecting to OpenWMS transceiver
2020-07-07 07:59:51.602 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Disconnecting
2020-07-07 07:59:51.635 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener stopped
2020-07-07 07:59:51.637 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Interrupt serial listener
2020-07-07 07:59:51.668 [DEBUG] [penwms.connector.OpenWMSStreamReader] - Data listener stopped
2020-07-07 07:59:51.670 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial out stream
2020-07-07 07:59:51.672 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial in stream
2020-07-07 07:59:51.674 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial port
2020-07-07 07:59:51.681 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Closed
2020-07-07 07:59:51.683 [INFO ] [wms.connector.OpenWMSSerialConnector] - Connecting to OpenWMS USB at /dev/ttyUSB0
2020-07-07 07:59:51.685 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Jetzt gehts los
2020-07-07 07:59:51.701 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener started
2020-07-07 07:59:51.704 [TRACE] [wms.connector.OpenWMSSerialConnector] - Send data (len=8): 4D253XXXXXXXXXXX
2020-07-07 07:59:51.705 [DEBUG] [penwms.connector.OpenWMSStreamReader] - Data listener started
2020-07-07 07:59:52.008 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Try to send to controller
2020-07-07 07:59:52.010 [TRACE] [wms.connector.OpenWMSSerialConnector] - Send data (len=3): 7BXXXX