Binding for Warema Mobile System WMS

Hi,
did you allready stop and restart openhab?
Your log looks strange; I’m missing some debug-infos after Connection to OpemWMS USB at /dev/ttyUSB0

Does your openhab run on an windows or a unix system?

Yes, many times… That does not change anything. But I haven’t removed and plugged in the stick yet. Should I try that?

I am running openhab in a Linux docker container. As I said in an older version it worked already.

Best regards,
Jörg

Now I have also removed and plugged in the stick again. No changes…

2020-07-08 16:37:14.656 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Checking OpenWMS transceiver connection, thing status should be = OFFLINE
2020-07-08 16:37:14.657 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Connecting to OpenWMS transceiver
2020-07-08 16:37:14.658 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Disconnecting
2020-07-08 16:37:14.739 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener stopped
2020-07-08 16:37:14.740 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Interrupt serial listener
2020-07-08 16:37:14.742 [DEBUG] [penwms.connector.OpenWMSStreamReader] - Data listener stopped
2020-07-08 16:37:14.743 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial out stream
2020-07-08 16:37:14.744 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial in stream
2020-07-08 16:37:14.745 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial port
2020-07-08 16:37:14.751 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Closed
2020-07-08 16:37:14.752 [INFO ] [wms.connector.OpenWMSSerialConnector] - Connecting to OpenWMS USB at /dev/ttyUSB0
2020-07-08 16:37:14.753 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Jetzt gehts los
2020-07-08 16:37:14.768 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener started
2020-07-08 16:37:14.769 [TRACE] [wms.connector.OpenWMSSerialConnector] - Send data (len=8): 4D253XXXXXXXXXXX
2020-07-08 16:37:14.769 [DEBUG] [penwms.connector.OpenWMSStreamReader] - Data listener started
2020-07-08 16:37:15.072 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Try to send to controller
2020-07-08 16:37:15.074 [TRACE] [wms.connector.OpenWMSSerialConnector] - Send data (len=3): 7BXXXX

Best regards,
Jörg

@joerg_beck
I have extended the logging a bit, so that the single steps can be better traced.
Please try again with this adapted version and send me your log again.

@Rainer: I have downloaded your new version from that post and copied to the addons folder (old version of your binding overwritten). Afterwards I restarted openhab to install your new debug version. But the log seems to be identical :thinking::

2020-07-10 08:30:23.963 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Checking OpenWMS transceiver connection, thing status should be = OFFLINE
2020-07-10 08:30:23.965 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Connecting to OpenWMS transceiver
2020-07-10 08:30:23.966 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Disconnecting
2020-07-10 08:30:24.013 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener stopped
2020-07-10 08:30:24.015 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Interrupt serial listener
2020-07-10 08:30:24.019 [DEBUG] [penwms.connector.OpenWMSStreamReader] - Data listener stopped
2020-07-10 08:30:24.020 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial out stream
2020-07-10 08:30:24.022 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial in stream
2020-07-10 08:30:24.024 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial port
2020-07-10 08:30:24.030 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Closed
2020-07-10 08:30:24.032 [INFO ] [wms.connector.OpenWMSSerialConnector] - Connecting to OpenWMS USB at /dev/ttyUSB0
2020-07-10 08:30:24.034 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Jetzt gehts los
2020-07-10 08:30:24.051 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener started
2020-07-10 08:30:24.053 [TRACE] [wms.connector.OpenWMSSerialConnector] - Send data (len=8): 4D25313734444534
2020-07-10 08:30:24.053 [DEBUG] [penwms.connector.OpenWMSStreamReader] - Data listener started
2020-07-10 08:30:24.358 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Try to send to controller
2020-07-10 08:30:24.360 [TRACE] [wms.connector.OpenWMSSerialConnector] - Send data (len=3): 7B477D

Do I have to clean the cache to install the new version of your binding?

Many thanks for your help!

Best regards,
Jörg

@joerg_beck

Do I have to clean the cache to install the new version of your binding?

Yes, you should clean the cache or use karaf to uninstall the old version and install the new one.
Your log indicates that the new version is not yet active.

Now I get an error in log file:

2020-07-10 09:41:10.670 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Checking OpenWMS transceiver connection, thing status should be = OFFLINE
2020-07-10 09:41:10.671 [DEBUG] [openwms.handler.OpenWMSBridgeHandler] - Connecting to OpenWMS transceiver
2020-07-10 09:41:10.672 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Disconnecting
2020-07-10 09:41:10.775 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port event listener stopped
2020-07-10 09:41:10.776 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Close serial port
2020-07-10 09:41:10.782 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Closed
2020-07-10 09:41:10.784 [INFO ] [wms.connector.OpenWMSSerialConnector] - Connecting to OpenWMS USB at /dev/ttyUSB0
2020-07-10 09:41:10.785 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### V 2.5.5. jetzt gehts los
2020-07-10 09:41:10.787 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 1 - open Port
2020-07-10 09:41:10.798 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 2
2020-07-10 09:41:10.800 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 3 125000
2020-07-10 09:41:10.801 [ERROR] [openwms.handler.OpenWMSBridgeHandler] - Connection to OpenWMS transceiver failed - Exception
org.eclipse.smarthome.io.transport.serial.UnsupportedCommOperationException: null
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort.setSerialPortParams(RxTxSerialPort.java:59) ~[?:?]
	at org.openhab.binding.openwms.connector.OpenWMSSerialConnector.connect(OpenWMSSerialConnector.java:70) ~[?:?]
	at org.openhab.binding.openwms.handler.OpenWMSBridgeHandler.connect(OpenWMSBridgeHandler.java:126) ~[?:?]
	at org.openhab.binding.openwms.handler.OpenWMSBridgeHandler.lambda$0(OpenWMSBridgeHandler.java:91) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_252]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_252]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_252]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

Any idea?

Best regards,
Jörg

@joerg_beck
The USB stick is not responding correctly and I suspect that the baudrate is not set correctly. Unfortunately I can’t test this on my computer at the moment but I have uploaded a new version with changed values for you.
If this works for you, I will adjust the binding later so that different baudrates can be selected.
I’m sorry that you have to be the test object now but due to the fact that I don’t have access to my own stick at the moment, I can only offer this procedure.

Okay, I have installes the new version, but still getting the same error:

2020-07-10 11:25:31.131 [INFO ] [wms.connector.OpenWMSSerialConnector] - Connecting to OpenWMS USB at /dev/ttyUSB0
2020-07-10 11:25:31.132 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### V2 2.5.5. jetzt gehts los
2020-07-10 11:25:31.133 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 1 - open Port
2020-07-10 11:25:31.145 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 2
2020-07-10 11:25:31.146 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 3 128000
2020-07-10 11:25:31.147 [DEBUG] [wms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 3b 125000
2020-07-10 11:25:31.148 [ERROR] [openwms.handler.OpenWMSBridgeHandler] - Connection to OpenWMS transceiver failed - Exception
org.eclipse.smarthome.io.transport.serial.UnsupportedCommOperationException: null
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort.setSerialPortParams(RxTxSerialPort.java:59) ~[?:?]
	at org.openhab.binding.openwms.connector.OpenWMSSerialConnector.connect(OpenWMSSerialConnector.java:75) ~[?:?]
	at org.openhab.binding.openwms.handler.OpenWMSBridgeHandler.connect(OpenWMSBridgeHandler.java:126) ~[?:?]
	at org.openhab.binding.openwms.handler.OpenWMSBridgeHandler.lambda$0(OpenWMSBridgeHandler.java:91) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_252]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_252]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_252]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

I am totally happy that you are helping me. Working like that to find the issue is absolutely fine for me.

Best regards,
Jörg

Hey guys, great work! The last version (2.5.5) is now running since saturday without any errors!
2 blinds and the weather sensor was found properly. The only thing is now that the weather sensor only shows temperature and wind speed. Brightness gets no value.

Many thanks for your great work!

@rainer300 after the Warema technician came to configure the weather station, the binding is not working properly anymore.

The problem is in the way the messages from the weather station are read, and incorrect conversion from hex represented as string to int.

Would you mind uploading the latest version of the source code to github, so we can fix those issues?

@klausharald
Pls. try the new compiled version.

@rainer300 can you please push to github also the changes to the source code, and not just the compiled JAR?

@rainer300 It is possible to use openwms without openHAB and run the jar with parameters directly? I want to use it in a shell script.

@hj8i5
no, unfortunately this is not possible but there are other groups on the net that deal with script solutions…

@rainer300 Can you explain what you mean with other groups in the net? Do you have a link for me?

@hj8i5
f.e. here

1 Like

@rainer300 the release from 5 days ago doesn’t work on my OH 2.5.8:

 [INFO ] [nwms.connector.OpenWMSSerialConnector] - Connecting to OpenWMS USB at /dev/ttyUSB0
 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### V2 2.5.5. jetzt gehts los
 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 1 - open Port
 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 2
 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 3 128000
 [DEBUG] [nwms.connector.OpenWMSSerialConnector] - Serial port #### Schritt 3b 125000
 [ERROR] [.openwms.handler.OpenWMSBridgeHandler] - Connection to OpenWMS transceiver failed - Exception
org.eclipse.smarthome.io.transport.serial.UnsupportedCommOperationException: null
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort.setSerialPortParams(RxTxSerialPort.java:59) ~[?:?]
	at org.openhab.binding.openwms.connector.OpenWMSSerialConnector.connect(OpenWMSSerialConnector.java:75) ~[bundleFile:?]
	at org.openhab.binding.openwms.handler.OpenWMSBridgeHandler.connect(OpenWMSBridgeHandler.java:126) [bundleFile:?]
	at org.openhab.binding.openwms.handler.OpenWMSBridgeHandler.lambda$0(OpenWMSBridgeHandler.java:91) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

Same problem here. The older version of org.openhab.binding.openwms-2.5.5-SNAPSHOT.jar (class file date in jar 2020-07-26) works but the version which is actual (same file name org.openhab.binding.openwms-2.5.5-SNAPSHOT.jar ) in the repository (class file date in jar 2020-07-10) doesn’t work.

Further in syslog with the actual version I get the following message:

tty_tiocsserial: 'OH-thingHandler' is using deprecated serial flags (with no effect): 00000400

Hello Rainer,

thanks for the nice Binding.
The Installation of the version 2.55 was very smoth. But after view day’s the WMS stick runs into a problem.
2020-09-21 18:48:24.236 [ERROR] [openwms.handler.OpenWMSBridgeHandler] - Error occurred: {}
java.lang.StringIndexOutOfBoundsException: begin 0, end 1, length 0
at java.lang.String.checkBoundsBeginEnd(String.java:3319) ~[?:?]
at java.lang.String.substring(String.java:1874) ~[?:?]
at org.openhab.binding.openwms.handler.OpenWMSBridgeHandler$MessageListener.packetStrReceived(OpenWMSBridgeHandler.java:207) [bundleFile:?]
at org.openhab.binding.openwms.connector.OpenWMSBaseConnector.sendStrToListeners(OpenWMSBaseConnector.java:45) [bundleFile:?]
at org.openhab.binding.openwms.connector.OpenWMSStreamReader.processMessage(OpenWMSStreamReader.java:93) [bundleFile:?]
at org.openhab.binding.openwms.connector.OpenWMSStreamReader.run(OpenWMSStreamReader.java:49) [bundleFile:?]

After disconnect from the system and connect again, the stick will working for a couple day’s.