Apparently the Zwave binding blocks the / dev / ttyUSB0 port in Combination with a CC2652RB Zigbee2mqtt Dongle

Sure - but in the past this caused a lot of people to complain that OH didn’t react well. Saying that this is something that only matters when you’re starting out is a bit strange - it might be fine for you, but effectively you’re saying we shouldn’t care so much about newcomers…

This is of course up to you - there are many ways to do things.

It’s unfortunate that there are these bugs in the serial driver, and also that we can’t update the OH core any more because the other option is to change to use the serial driver that has resolved this problem, then we could remove the workaround.

I’m sorry, I totally did not mean that we should not care about newcomers. I apologize if my reply sounded like that.

I was just evaluating impacts of the two options. And I totally see that there are probably not so many people who use zwave AND zigbee, and probably a lot fewer people who do not use the CC2531 coordinator.

Because of that bug/workaround/whatever I currently still use the CC2531, but that is knowingly lacking in the power department, which means that some of my sensors only have a very weak link and occasionally drop out altogether. I was hoping to fix that with a better and stronger coordinator.

Don’t get me wrong, the zwave binding is working really well for me and does everything I want from it. That’s why I’d hate to go without it and am still hoping for a solution…

1 Like

I do use a pi3 + razberry + TelegesisETRX + RFXtrx. I plan to move to a pi + strompi3 + batpack + Aeotec Gen5 + (Telegesis or Stick with Ember chip). I am using z-wave + zigbee bindings currently and don’t plan to change this. But i am interested in zigbee2mqtt. This is why i joined this thread. Hopefully i won’t see the problems you do.^^

Sorry - probably just my misunderstanding :slight_smile:

I guess it’s a problem that doesn’t impact everyone for some reason - I use both here, and do not see any such problems.

Serial ports in Java are really a bit of a pain. There are a number of libraries out there, but none are really ideal unfortunately :frowning:

@chris does it make sense to youse an older zwave binding?

It would need to be very old. I forget when these features were added - maybe a year or two ago. Certainly it’s not a recent change.

You could try 2.4 to see if that works (that is nearly 2 years old) but of course you will also have a very old database of devices…

It was so that you would have to uninstall the current one via paperui and then insert the old one in the addons folder, right?

PS: is there Any Chance to only remove temporarily the above mentioned workaround from this binding locally and manually?

Yes, that’s correct. You should also use the Karaf console to check that the binding is removed/added - sometimes manually installing bindings like this can lead to multiple bindings running.

If you wanted to compile your own version of the binding this is of course possible.

So what should I say. After Downgrading the Zwave-Binding from 2.5.7 to 2.4.0-RC1 the problem, which was covered in this topic is initially solved. The CC2652RB now works flawlessly in parallel with the Aeoteck Gen5 Zstick and running Zwave-Binding.

I would have one last please, however, as I am not that firm now, @chris could you give me some instructions, if time allows, how I can compile the Zwave 2.5.7 Binding without (presumably) the mentioned workaround ?

All Zwave-Devices are working now, except the Swipe Function of my Wallmote Quad (Aeotec). This was solved in a later Release of the Zwave-Binding, so that I nevertheless need the actuall Binding (excerpt workaround).

In any case, I am very happy actually :wink:

1 Like

Thanks for the feedback @bifi2090.

The change that was made is here -:

You might try forking the current code and reversing some of these changes - probably the lines close to where I’ve set the marker in the link above.

OK. Thx. I will come back, when i have done this succesfully.

2 Likes

@chris chris I forked, and changed the marked lines as you said (hopefully, I´m an absolut newbie on github, sry)
after git clone and “mvn package” I get this error:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/ich/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/handler/ZWaveSerialHandler.java:[83,3136] The @NonNull field portId may not have been initialized
[ERROR] /home/ich/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/handler/ZWaveSerialHandler.java:[169,6465] Null type mismatch (type annotations): required '@NonNull SerialPortEventListener' but this expression has type 'ZWaveSerialHandler.@Nullable ZWaveReceiveThread'
[ERROR] /home/ich/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/handler/ZWaveSerialHandler.java:[474,19113] Illegal redefinition of parameter serialMessage, inherited method from ZWaveIoHandler does not constrain this parameter

the underlying repository:

Just FYI, while zwave2mqtt works great, getting OpenHAB to receive and send the correct values and interpret them correctly is really tiresome. Needs a lot of tweaking with map-files and I still don’t understand why the two won’t cooperate on simple integers (dimmer settings). So I’ve given up on this for now, but am certainly very interested in the modified version of the zwave binding.

A little Update from my side. The CC2652RB is still working although i used the 2.5.0-RC1 and actually the newer 2.5.0 Zwave-Binding. I think this thing works, because the commit mentioned

was merged on 04 Jan ´20 and therefore first used in 2.5.1.

1 Like

For everyone who is interested, the CC2652RB is working now flawlessly in parallel to the actual Zwave-Binding (2.5.7 …). i´ve merged the newer commit below (remove serial reconnection workaround)

into actually 2.5.x-Repo. So if someone´s interested, here is the link:

So now that´s the solution. Thx to @chris and @wborn for pointing me to the corresponding issues and commits.

Best regards

4 Likes

Thanks, Gustav, I’ll certainly look into it this weekend.
Did you happen to pack it into a jar somewhere?
(Maybe I’m just missing it)

@Tron you aren´t missing anything :slight_smile:. You have to compile the .jar for yourself:

  • Click on the second Link from my last Post
  • Click on the green “Code”-Button
  • Click “Download Zip”
  • Put the .zip somewhere on your Raspi (I thought your using a Raspi …), for example in /opt/maven_packages (mkdir /opt/mvn_packages)
  • if you haven’t already done it, install “maven” with
    apt install maven
  • unzip the .jar file and cd into the unzipped directory
  • now compile the package with
    mvn package
    (the first time it took a while), when it has succesfully finshed, the output gives something like “… Build succesful”
  • cd into /opt/mvn_packages/<package>/target, where you can find the (most likely called) org.openhab.binding.zwave-2.5.8-SNAPSHOT.jar

That´s the normal way to compile a package/binding.
To make it work on your openhabian, do the following steps:

  1. Uninstall Zwave-Binding within PaperUI (do not be afraid, the settings and Devices will remain)
  2. ssh into karaf-console:
    ssh -p 8101 openhab@localhost
  3. look, if the Zwave Binding is allready uninstalled:
    bundle:list | grep Z
    if there is a output pointing to the Zwave-Binding with a package ID/Number (e.g. 203) >
    bundle:uninstall 203
  4. now logout from karaf-console:
    logout
  5. now do:
    service zigbee2mqtt stop && service mosquitto stop && service openhab2 stop
  6. Clear tmp & cache:
    rm -rf $OPENHAB_USERDATA/{cache,tmp}/*
  7. put the compiled .jar file into
    $OPENHAB_HOME/addons/
    (cd $OPENHAB_HOME/addons/)
  8. reboot

First reboot takes a while. I hope that was detailed enough :wink:.
Best regards

3 Likes

Thanks for the extended howto.
(I’m not on a Raspi but a “regular” Debian box, but no matter)

Build went fine, however openHAB does not seem to like my package:
17:19:46.745 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.zwave-2.5.8-SNAPSHOT.jar org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.zwave [281]
Unresolved requirement: Import-Package: org.eclipse.smarthome.io.transport.serial

Looks like I’m missing a dependency here somewhere…
bundle:dynamic-import does not seem to do it here.

Hi @Tron!

You can install the serial transport bundle following this steps:

  1. ssh into karaf-console: ssh -p 8101 openhab@localhost
  2. Execute this command: feature:install openhab-transport-serial

That should be enough :wink:

@riturrioz
Thanks, I’ll try that tomorrow!