Zwave connection lost with Virtualisation

Continuing the discussion from ZWave binding updates:

In short:

I’m using 2 USB Gen5 Sticks. And my OH server (Ubuntu 18.04) is running virtual (by HV Proxmox 5.1.2).
A lot of bindings (knx, zoneminder, bosch, zwave…) are in place.
I’m using a recent OH version, namely 2.5.0.M1
Zwave has about 55 nodes over the 2 sticks (2 different buildings).

And everything is running smooth. For a while…
Suddenly, a zwave stick (or network?) suddenly stops working.

Nothing in the logs that could explain it. It just stops sending traffic it seems. In PaperUI, everything stays online. And that’s a bit annoying, since I can’t trigger a rule on this to restart it automaticly. :blush:
Sometimes it runs for 1 days, sometimes for 3, sometimes for… Sometimes it’s stick 1, sometimes it’s stick 2. Not really an logic in it…

I’m aware of 3 other simular setups (with proxmox), and only 2 of the 4 have a simular case. That the zwave suddenly dies… On the other installation that dies, I’ve installed a new ZWave Gen5 stick, but the result was the same. So I don’t think it’s a hardware (=stick) issue.

For info, this is a small script I’ve made that checks if a zwave node (powered outlet) is sending data. If so, he does nothing. If no data is seen for 25 minutes, he’ll trigger a restart of the binding…

var Timer occupancyTimer = null
val int timeoutMinutes = 25

rule "ZWAVE Check"
    Item Sch_OnOff1_Verbruik changed
    if(occupancyTimer === null) {
        occupancyTimer = createTimer(now.plusMinutes(timeoutMinutes ), [|
            logInfo("Alarm651", "Er is geen ZWAVE update ontvangen gedurende 25 minuten")
            sendCommand(ZwaveCheck, OFF)
            occupancyTimer = null
        if(ZwaveCheck.state !=ON) sendCommand(ZwaveCheck, ON)
        logInfo("Info652", "Er zijn ZWAVE updates gezien")
    else {
        if(ZwaveCheck.state !=ON) sendCommand(ZwaveCheck, ON)
        occupancyTimer.reschedule(now.plusMinutes(timeoutMinutes ))
        logInfo("Info653", "Er zijn ZWAVE updates gezien")

rule "Zwave Offline"
        Item ZwaveCheck changed to OFF
        logInfo("Alarm", "Zwave is offline gegaan?")
        createTimer(now.plusSeconds(300),  [ |
                if ( ZwaveCheck.state == OFF ) {
                        logInfo("Alarm659", "Zwave nog steeds offline, OH2 wordt herstart")
                        sendPushoverMessage(pushoverBuilder("ZWave is offline?").withDevice("VETEN"))

And the script to restart the binding:

cat scripts/ 
sshpass -p habopen ssh openhab@localhost -p8101 bundle:stop org.openhab.binding.zwave
sleep 10
sshpass -p habopen ssh openhab@localhost -p8101 bundle:start org.openhab.binding.zwave

item, use any type to suit channel

Switch ZwaveCheck "monitor" { expire="25m, state=UNDEF" , channel="zwave..."}
rule "ZWAVE Check"
    Item ZwaveCheck changed to UNDEF
1 Like

After hours and hours, days and days of ‘frustrations’, testing, updates, thinking, downgrades, upgrades, scripts… I think I’ve found it. :wink:

With updating my virtualisation OS (proxmox) to the latest version, I had some output in dmesg that pointed me out of a power issue. After adding an external powered USB switch, no disconnections anymore. The zwave connectivity is up for about 2 weeks now! No more sudden deaths…

Seems that linuxservers don’t like very much (un)stable USB ports. I’m using a Dell PowerEdge server, and maybe (these) servers don’t have very stable usb power output?