Switch device

Hi, is there an easy way to swap a device. So to give an example: if I had a fibaro motion sensor within 4 rules. If the sensor became damaged and I switched it for a different sensor. Is there a quick way to do this rather than to delete the device out of each rule and then to re-add it.

Although deleting and readding per rule isn't too big of a job, RM feels a a bit clunky at times so I was wondering if there was some sort of global device swap option? Cheers in advance guys

2 Likes

AFAIK, there isn’t. But it would be an excellent feature to have.

1 Like

i don't believe there is. i went through this headache when moving virtual switches into a container for organizational purposes. it is a bit annoying. Even tried the "change the device ID" thing, and it didn't work

How unfortunate. Are there any shortcuts at all or is it the long winded way which I suggested above. Cheers for your swift response

Hi, I guess that's a half way house. It would mean cloning multiple rules but this feels easier than editing the rules individually :ok_hand:

1 Like

Make a backup first in case it goes badly.

4 Likes

Yes, Ive found this out the hard way. RM seems a bit flakey at times

2 Likes

Yep. Excellent feature to have. I second that!

RM creates a place-holder that makes the necessary rule editing pretty minor. You don't have to re-work the entire rule but you do have to enter the missing device.

there isnt from what i can see, but ive made a note of the rules that used the device, then removed the device from HE which just leaves the rules missing the device, so ive then gone into the rules and updated using the new device, although something far more irritating for me is then having to go into locked dashboards, unlock them, authorise the device then re add the button/switch and then have to lock everything up again lol

Another way to solve this is to use RM, export the block of rules before removing/deleting the device, then deleting the rules that use the device (iterate on the “in use by” list at the bottom of the device’s page), then deleting the device, then pairing the new device, then using RM to import the exported rules. You will be given the opportunity to select a device to replace the deleted device.

It’s really painless, I had the opportunity to use it last night on a big block of complex rules. Worked perfectly.

Be sure to back up and download your database before you start, in case things go badly.

1 Like

@672southmain cheers for the pointers. I'm not sure if I'm on the same wavelength but would cloning the rule work the same?

I don't think so. It certainly would mean more work, because you would have to edit the various places in the rule(s) where the device appears. Import is much easier, you get a drop-down for each device used in the rule, you just choose a device, and it replaces every occurrence on all of the rules in the import block.

See an example of where I used this last night, perhaps it helps by giving a concrete example (a cloud API changed, so an integration with multiple rules using it had to be deleted; when the fixed device was added, an import replaced the old device with the fixed device, in all rules).