Re-pairing the Device without breaking Rules

Is it any easy way (I know what is a long way) to re-pair
(exclude/include) the ZWave Device without braking Rules?
I am using ony RM.

Officially, the only option is probably the "Replace" option on the Settings > Z-Wave Details page. This is technically meant for replacing one device with a similar one, not for re-pairing the same device, but in either case you need to meet the same criteria first: the original device has to not be ping-able on the network so that the "Replace" button appears at all. Beyond that, I can't see why this would matter too much.

Personally, I've had bad luck with that button; it rarely works. In most cases, I use a secondary controller to do this instead. You still need to meet this requirement (the network has to think the original device is no longer there), but something like Z-Wave PC Controller with a USB Z-Wave stick seems to do it all more reliably for me. I recall that you have ordered one of these.

The only other thing that might work is swapping the node ID of your "old" and "new" devices, which Hubitat matches from the device database to the radio by way of the DNI (device network ID) on the device page, which you can edit (but you will see is generally cautioned against). This probably won't work if your driver creates parent/child devices, and I'm not sure if it will work with securely paired devices at all (it might if it's the same device and the S0/S2 options chosen were the same for both pairings...or might might regardless, but I don't know any of that for sure and have never tested). This is similar to the idea behind the manual hub-migration instructions for Z-Wave devices: Migrating a Z-Wave Network, except in this case you'd be using the same hub (and in all of these cases can definitely not use the current hub to do the exclusion, or you risk the device getting removed--which you're trying to avoid).

That being said, if you're at all able to do this, the best way is probably to just re-pair the device and swap it out in all apps/rules. This would be a bit easier if there were some hub-level "replace" feature (or even something like this available within an app), but the Z-Wave one is the closest thing to that at the moment. :slight_smile:

1 Like

I've had reasonably good luck with that button :slight_smile: Just to prove that everyone's home is completely different I suspect. :smiley:

I've used this most often to do exactly what @vitaliy_kh is asking. As I've detailed elsewhere, the hub has to 100% believe that the device is dead. It will check twice in the Replace process. If you are using the PC Controller software, you'll have to do two button pushes too. First you click "Is Failed" and then when it marks the device as failed, you can click "Replace Failed". The replace failed button also causes another Is Failed check.

The "trick" for me is to use some other Controller to Exclude the device before starting the whole Replace process. Obviously I can't use the Hub I want to do the Replace on, it would just delete the device and break all the Rules. I use another Hub, or perhaps ST. Others may use a 'spare' Vera, HomeAssistant, Wink or ??? Anything as long as it isn't a secondary to the very mesh I'm trying to hoodwink. :slight_smile:

Let me also say I often have to do the whole process a couple of times. The worst was 4 times, I believe.

1 Like

I am not sure I understand......why would you have to exclude the device first anyway? Could you not just disconnect power to the device before you use the Replace button?

Every Include must be preceded by an Exclude.

For brand new in box devices, usually we rely on the factory to have done it. However there's plenty of anecdotal info to suggest you'll eventually find one that hasn't. Not counting Returns that don't get reset before putting back into Stock.

The Replace process is doing an ordinary Include with one tiny exception.. it's reusing a Node number instead of using "next available." The device needs to be ready to be Included again... therefore, any Include needs an Exclude, first.

1 Like

First off all - Thank you all for sharing your experiences.
My ZWave network has 4 devices with S0 security inclusion.
My ZWave network is stil very unstable.
There are no ghosts anymore. I will try to reinclude these
4 devices without any security (one is actually Door Lock,
should I keep S0 security for him or not?) hoping this will
improve ZWave network stability.
Now I have Aeotec Gene ZStick and installed PC Controller SW.
So, I am still thinking what is a safest way to remove that S0
security. I am afraid to brake ZWave even more than it is now.

So, how safe and convenient will be next sequence:

  • exclude the device with ZStick;
  • use a replace button to reinclude it back.

It is unclear will I be able to reinclude it back without S0 security?

I saw somewhere I can include the device with ZStick specifically
to get rid of secure inclusion.
But what I did not find - is how to transfer this device back to the C-7 hub?

Door locks (and garage door openers) should always be included with security. Most won't even work without security, but it's probably a bad idea not to use security regardless. If your device supports S2, you should prefer S2 over S0 (this is generally good advice, not specific to these devices--but I suppose particularly relevant given that you need security here, whereas some people would say it's just a matter of preference for other devices). If your device only supports S0, then you will have to use S0 in this case.

As long as your Z-Stick is not currently joined to Hubitat as a secondary controller, that should work. If it is, then this won't be helpful: if you remove it using the stick, Hubitat will find out (just like it does when you add a device). Your last question is how this happens, and honestly I don't fully understand that process except that it usually does work and sometimes takes a few minutes or a hub reboot for it to work. :slight_smile: (But in general, this is information that is supposed to be shared between primary and secondary controllers, so it should work.)

If you have an S0-only device that you are trying to include without S0, then--assuming it's not a lock or garage door opener--you should be able to use the stick plus Z-Wave PC Controller to do that. PC Controller will not pair securely (unless you make it--I think...I've never tried to); the issue with Hubitat is that the Z-Wave SDK they're using does not provide them a way to prompt the user for what security "levels" they want to choose for S0-only devices, only for devices that support S2. So, this is a workaround for that specific set of devices.

In the worst case, I would always be prepared to re-do apps/rules if this doesn't work. And honestly, sometimes it might be easier to just do that. You can either swap the device out with a virtual device in the app/rule (so you don't need to worry about it disappearing during an exclusion), or you can use the export/import feature for a rule, and when you import it, it will let you choose "real" hub devices to associated with any particular device referenced in your rule (keep in mind that this feature is still technically beta, but it may be an easy way to effectively "swap" devices in a rule if it works--without needing to re-write the entire rule). I generally find pretty much any app, including custom apps, easier to swap out devices in compared to Rule Machine, but that's a different discussion... :slight_smile:

Thank you very much for the ideas.
I will keep Door Lock with S0 security (doesn't support S2).
The S0 for the other 3 (2 Fibaro + 1 Aeotec sensors) devices will be removed.
I was thinking about using temp virtual devices but I forgot about
export/import rules feature. I may try it.
I guess, I don't even need ZStick and can do all these cleaning just with hub.
Am I right?

Theoretically, that is correct. In real life, you may find a Z-Wave stick easier if something on the hub doesn't work like you expect. Fewer quirks now than there were before, but I've been using the C-7 for while and am not sure I will ever forget the issues I had early on.. :joy:

1 Like