Co-existing with openzwave

Hi.
I have an up and running home automation with z-wave communication built on openzwave, using a Z-stick (gen 1). Now I’m planning a migration over to openHAB (on the same server using the same Z-stick). During a transitional period the old solution needs to keep working while I fiddle around with OH, setting up all that is required for the move. I hope I can get some help here with how to do that…

It’s no problem for me stopping the openzwave application an hour or two while I’m doing stuff in OH, thus handling over control to the Z-stick to the OH binding. Thing is though that after that I need to be able to handle control back to openzwave (since it’s still the system in production) and I don’t know if that’s possible. Can I simply stop the binding using bundle:stop?

I hope you understand my problem (though I’m not really sure if it’s really a problem or only me thinking too much). I haven’t even dared installing the binding yet since I’m not really sure what’ll happen and I still need my openzwave home automation working…

If you are using the same stick for both setups (which I think you are if I understand correctly), then yes, this should work fine I think.

Ok. Tested this approach. Simply stopped my openzwave program, installed the z-wave binding and configured it to talk to /dev/ttyUSB0 (which is where my Z-stick is). The only thing Paper UI keeps saying me now though is

Status: OFFLINE - COMMUNICATION_ERROR Serial Error: Port /dev/ttyUSB0 does not exist

/dev/TTYUSB0 definitely exists and it’s read/writeable by dialout group, in which my openhab user is member. Anyone able to say what I’m doing wrong now?

edit: Tried debug logging the binding. Don’t know if this tells anyone something about what’s wrong?

11:02:37.728 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update received
11:02:37.789 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_softreset to 0
11:02:37.790 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
11:02:37.791 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update security_networkkey to 91 C1 6C 23 FB 0B 31 30 36 69 DD 4E E7 11 09 77
11:02:37.792 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
11:02:37.792 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update security_inclusionmode to 0
11:02:37.793 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_suc to false
11:02:37.794 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
11:02:37.795 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_sync to 0
11:02:37.796 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
11:02:37.797 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update port to /dev/ttyUSB0
11:02:37.799 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_master to true
11:02:37.800 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
11:02:37.802 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update inclusion_mode to 2
11:02:37.803 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_wakeupperiod to 3600
11:02:37.804 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
11:02:37.806 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update heal_time to 2
11:02:37.807 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_exclude to 0
11:02:37.809 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
11:02:37.810 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_inclusiontimeout to 30
11:02:37.812 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
11:02:37.813 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_hardreset to 0
11:02:37.815 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
11:02:37.836 [INFO ] [smarthome.event.ThingUpdatedEvent ] - Thing ‘zwave:serial_zstick:c8fabbd0’ has been updated.
11:02:37.837 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
11:02:37.838 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Initializing ZWave serial controller.
11:02:37.840 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initializing ZWave Controller.
11:02:37.845 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyUSB0’
11:02:37.846 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:c8fabbd0’ changed from OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyUSB0 does not exist to OFFLINE (BRIDGE_OFFLINE): Controller is offline
11:02:37.851 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:c8fabbd0’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyUSB0 does not exist

Did you add your usb port to the java args, like mentioned here:
http://docs.openhab.org/installation/linux.html#recommended-additional-setup-steps

Haha… Doh. Yes, I followed the instructions, but my /etc/default/openhab had a typo in that device. Thanks a lot for making me find that one :slight_smile:

Just for the record: This wasn’t a good idea. First two switches seems to have worked nice, but after that my openzwave application completely refused talking to the device anymore. On the other hand it was quite easy integrating my old solution with openhab’s rest interface, so now I don’t need openzwave anymore anyways :smile:

In general, it shouldn’t matter. I often swap a stick between different machines / software / etc. Maybe OZW is caching some information that screws it up, but not sure what or why as no data is cached on the stick.