Migration from OH 1.7.1 to OH 2.0.0.b1

I have downloaded OH2 Snapshot build from 11. January 2016 and started migration from OH1 to OH2. The reason for this is that I am planning to develop a new Binding for ZoneMinder. For that reason I think migration is the best option.
I have some bindings that I considder as “need to have”:

  • Z-Wave
  • MQTT / MQTTitude

Nice to have is OneWire and weather stuff (which already seems to be on 2.0)
I have concentrated on Z-Wave, since I belive the involvement of hardware will cause some troubles.
After some struggle (doing all the mistakes that others have done I now have a configuration that can start and load the Z-Wave binding (I have checked the binding status by typing “list”, and verified that it reports active for Z-Wave. The problem is that it just seems to start and then just stop again.
[INFO ] [ng.zwave.internal.ZWaveActiveBinding] - Update config, port = /dev/ttyACM0
[INFO ] [ng.zwave.internal.ZWaveActiveBinding] - Update config, healtime = 2
[INFO ] [ng.zwave.internal.ZWaveActiveBinding] - Update config, setSUC = true
[INFO ] [ng.zwave.internal.ZWaveActiveBinding] - Update config, softReset = false
[INFO ] [ng.zwave.internal.ZWaveActiveBinding] - Update config, masterController = true
[INFO ] [b.core.service.AbstractActiveService] - ZWave Refresh Service has been started
[INFO ] [ve.internal.protocol.ZWaveController] - Starting Z-Wave controller
[INFO ] [ve.internal.protocol.ZWaveController] - Z-Wave timeout is set to 5000ms. Soft reset is false.
[INFO ] [ve.internal.protocol.ZWaveController] - Connecting to serial port /dev/ttyACM0
[INFO ] [ve.internal.protocol.ZWaveController] - Serial port is initialized
[INFO ] [.openhab.core.internal.CoreActivator] - openHAB runtime has been started (v2.0.0, build b1).
[INFO ] [ve.internal.protocol.ZWaveController] - Disconnected from serial port
[INFO ] [ve.internal.protocol.ZWaveController] - Stopped Z-Wave controller

I am running on a Raspberry Pi 2 B (Jessie), OH 1 is running on the same Raspberry (so it should not be a error in the tty port.
The problem is that it just disconnect (the log lines are taken from its original context (eg. a few seconds).

In OH 1 I should put some magic to allow tty communication I have tried that in the keraf script, but still no luck. It seems to do a difference wheter I run as pi user or root user. I can see others that have had similar troubles, but all threads seems to stop when things suddenly works - so I guess there might also be a solution?
What have I forgotten to think about?

Btw. Habmin isn’t loading at all, but I guess I only need Habmin for configuration reasons?

Best Regards

This is exactly the same problem I am having. I had kind of given up on troubleshooting until a working habmin2 was available.

Got the same issue on ubuntu. Tried two different Z-wave dongles. All the same, connects and the disconnects. habmin does not start at all.

Regarding HABmin, please see https://github.com/cdjackson/HABmin2/issues/109.
On the rest, I cannot help…

Looks precisely as the problem I saw with Habmin. Since Habmin is nice to have, I will not focs on that right now :smile:

I have done some further investigations / experiments:
Installed the alpha2 build (where the OpenHAB structure looks familiar to OH1 (with start.sh scripts etc). When using the addons from that build, zwave starts as it use to. Looks like they are organised pretty much like in the old OH1 days, but it is also 1.7.0. Then I thought that I would try to repålace the jar with the one from the OH 2.0.0.b1 build. That didn’t load at all, but alright since things seems to have changed so dramatically that could have a natural reason.

Can anybody tell me if the alpha2 build can be used as a reasonable platform for developing and testing OH2 bindings? Or have things changed so much recently that it is a problem?

Best Regards

Which jar do you mean? The binding.zwave? Note that there is not yet any ZWave 2.0 binding, so the ZWave binding that is shipped in 2.0b1 is the one from openHAB 1.8.

Yeah the 1.8 zwave binding does not seem to work with the OH2 beta.

It works fine for OH1 1.8 though.

You got a point - I meant the Z-Wave binding and that doesn’t come as 2.0 yet. Sorry for the confusion.

Would it be OK the use the alpha2 build for testing new OH2 bindings (development), or has things changed dramatically lately?

Did anybody already enter an issue at https://github.com/openhab/openhab/issues about this?

Yes, through the introduction of Karaf things have indeed changed a lot (see also here). So testing should definitely be done on beta1.

Testing ZWave 1.8 and HABmin1 on openHAB 2 does not really bring much value though, since a ZWave 2.0 binding and HABmin2 is in the works and the final release of openHAB 2 will ship with them.

So since I am confident that the ZWave 1.8 binding will soon be fixed to work smoothly on beta1 as well, you are then of course free to use it - but we should not consume too much of @chris’ valuable time on this but rather let him finish the 2.0 version of the binding!

No problem. I just didn’t want to keep banging my head trying to figure out what was not working if it was an issue with the binding and not my configuration.

I know that feeling :slight_smile:

I dont see an entry on the issue tracker you mentioned, but that appears to be a tracker for OH1. I know an issue has been put in the issue tracker for OH2 though.

No, it is the tracker for the code within that repository. And the ZWave 1.8 binding is in there.

Soo. is there a solution for the serial port disconnect bug? (rpi2, aeon usb stick)
Banging my head against the wall here:)

@chris Did you already have a chance to look at that?

Sorry - I’ve not had a chance this week as I’ve been extremely busy at work :frowning:
I’ll take a look shortly, but I don’t really see what’s changed in the binding and 1.8 was working fine with 2.0 until the final release was made (at least it was/is here as I’ve not upgraded).
@kai was something else changed that could cause this?

Is this problem only with the RPi, or other systems?

Yes, as mentioned here, the big change is that we now have Karaf as a container. And Karaf seems to be more strict on following the OSGi specification. I don’t know what could be the specific problem here, so I hoped you have a chance to debug (if it does not happen in the IDE (which does not use Karaf), it is best to use remote debugging on a distro.

Not sure about other systems, only have rpi2. seems like quite some people have this problem though. If you are too busy we will wait for the zwave2 launch though. ill press those light switches manually meanwhile:)

There is a potential fix here -:

I’ll merge this tonight hopefully (unless I have any negative feedback in the meantime) so tomorrow build should include it and it would be good to get feedback…


(many thanks to @maggu2810 for the help) :smile: