User Mistake with Device Removal

Yes, there are some glitches in that. For many apps, but not all, when you hit Done in the app it returns to that list if that's how you got to the app. Sometimes, it returns to the Apps page instead, which is annoying. Another way to do it on a computer is to use two tabs, and right click on the link on the device page, so that page remains available.

The simple answer is that the app doesn't work that way for triggers or conditions. I'll look at that possibility, but not making any promises about it.

It remains that the instructions for removing a device are to first correct any rules that use the device. Following this instruction will avoid these problems.

See the post above about how to swap a new device for an old one:

1 Like

How about this:

16%20PM

Next release...

10 Likes

That's a pretty neat warning actually.
I see this blank problem on ST as well and they couldn't solve it with their super cloud power.

The solution above is specific to Rule Machine. Other apps will still have problems with removed devices.

Removing devices without first fixing the apps is just a bad practice, and should be totally discouraged. This isn't a platform or app problem, this is a user education problem. The platform can't protect a user from doing wrong things. Well, it could just refuse to remove the device as long as it was still in use.

1 Like

That is actually what happens when you try to delete custom drivers that are currently "in use by" a running app... A notification pops up stating the driver cannot be deleted because it's in use by X app.

But you said that In-Use-By may not be updated when you remove a device from a rule.

So, is preventing the user from removing a device that is "in use" really feasible?

Just reading the thread and wanted to weigh in on this. Right now, I think that would be a bad option. I like Bruce's solution to show missing device in the rule.

I do my absolute best to make sure a device has been removed from a rule before deleting the device, as described. But sometimes it says it is still involved in a rule, but it isn't. Likely it's because I've cloned a rule, switched out a device in the clone, but the rule hasn't really released the original device. When this happens, I do a page search for the device in the rule, and if I can't find it, I OK the deletion.

That was a sarcastic comment, not a serious suggestion. We aren't changing the way device deletion works, but we might make the warning a bit stronger worded.

When you remove a device, any app that references that device should be assumed to be trashed by the removal. Hence, if you don't want to trash the app or rule, remove the device from the app first!

1 Like

Bruce, just to clarify, are we getting the "Missing Device" enhancement in the next release? It would be awesome to rid the random OR operator. Thank you!

This will be in the next release. It is not at all a good idea to use this approach of just ripping a device out without first removing it from the rules and apps.

This feature is not ready to be released. There can be undesirable side effects discovered in testing.

I heard you mention that in last night's live show. Good info to know for sure! Would it be possible to add a "Replace" feature? Some of my devices are contained in a metric ton of rules and it can be pretty painful to go through everything to remove the device and then add the new one back in. Maybe something that would take the references to the outogoing device, replace it with a placeholder virtual dummy device, and then allow the incoming device to replace the dummy? Maybe that is messier than it is worth though..

2 Likes

This is on our roadmap.

8 Likes

Excellent! :slight_smile:

2 Likes
  • 1 vote for replace!

+1

I assume that there's at least an internal method of DeviceWrapper that can be called to find where a device is referenced? I couldn't see anything obvious in the developer docs. I'd certainly find it useful in my LIFX master app which can wipe out all LIFX devices when doing a full scan - if only to warn users which rules/apps would break.

Old thread but it popped up on suggested topics and I want to throw this out there. A nice option would be a replace app. Where you could do the following:

Configure a new device
Launch the Replace App
Select Old Device
Select New Device (must be of same type as the old device)
Execute the replacement

Then all rules in all apps would be updated to use the new device instead of the old one. Then you could remove the old device.

Your wish has been granted:

Screen Shot 2020-09-01 at 9.33.25 AM

Just click Replace and a Join/Include is started with the Node Number reused.

A ZWave feature that Zigbee can't do.

But more seriously, :slight_smile: I don't believe an App can't do that. It's that one-liner "execute the replacement" that looks easy in words but I don't believe there is a mechanism for that.

1 Like

So if you click REPLACE it will ask for a new device? Nice!

REPLACE is rather a lot like clicking the Include button. The difference is that instead of using the NEXT node number, it re-uses the current node number. Everything else about the join/include is the same.

But recognize that the OLD device is presumed to be dead/defective.. if it's NOT, it's still thinking it's Joined to the network.. it will have to be Excluded first if you intend to reuse..

For example, let's say you have a ZWave Dimmer and you buy a lovely ZWave+ Zooz or Inovelli to replace it. You can physically swap the devices and do nothing else.. don't try to join the new device.. Eventually your old dimmer will show as FAILED, and REPLACE shows. Begin the replace and click the new device to get it to include... it will drop right in. But that old device that is powered off WILL try and reconnect when you power it on.