This worked, thanks. But what a pain!
This is a great asset for a frustrating problem
any thoughts on how these ghost devices appear to begin with?
Typically, it’s a cloud artifact. Somehow you succeed in deleting the device from your cloud account without ever actually deleting it from the device table that the Z wave controller inside your hub keeps for itself.
There are multiple ways this can happen in a SmartThings environment. Manually editing the device list through the IDE can do it. Doing a remove which for whatever reason fails to complete fully can do it. Database corruption in the cloud account itself can do it. There are couple of other possibilities as well.
Thanks - I’d guess it was one of the few times I moved a device and renamed it or something along those lines. I’d guess this might be a common pitfall for those unfamiliar with the way things work.
I was hoping this might solve my phantom device problem in Google home, but no dice. A similar strategy (renaming a device and then trying to delete it) just gave me two devices with the same name 
Did you ever find a solution? I’m having a nightmare of a time with my setup and I experience the same symptoms when running a Z-Wave repair. After pressing “Run Z-Wave repair”, all I get in the Android device, is the spinning circle. In case of the iOS device, I get one step further with a “Repair Started” message. Running it in the IDE on my laptop, show no messages in the IDE log.
So I was wondering how you got the repair to run.
Thanks
I’ve never had luck seeing events during a repair in the app. From the ide, you’ll have to go back to hub - “list events.” It doesn’t default to the events page when you start a repair.
Thank you, this opened a completely new world - never thought of looking there.
It’s a circuitous route, I agree. Welcome to SmartThings, it’s not perfect, but it’s flexible.
Can one tell from this log if the repair completed?
I found this entry: zwNwkRepair started Z-Wave network repair started
But nothing about having completed successfully / failed. It’s been running for more than an hour now. (I have 177 entries in my device list (which obviously include a few virtual switches; 40 Hue lights; about 20 alarm sensors (linked through Alarmserver).
Has it finished yet? I’ve got about 60 devices, and it can take 20min or so to run all the way through. You will get a “zwave network repair completed” statement at the end.
Zwave repair should only involve your physical zwave devices. No Hues, no virtual devices, no zigbee devices. It can definitely take a while though.
Nope, after more than an hour, it was still going at it. I either have a bad hub, or a device is messing with my network.
Z wave repair can take many hours to run, just depending on the local network. Definitely if there is a problem device and that device had been acting as a repeater for multiple other devices the repair takes much longer because there are more routes to rebuild. Typically in a non- Smart things installation you tell people to look for results the next day. It’s pretty common to run the repair overnight. I don’t know about any SmartThings – specific idiosyncrasies, though.
You refreshed the web page, right?
You should be seeing all your devices “ping,” but you have to refresh the
page frequently 
Yes, I have been refreshing the page.
It has now completed a repair successfully after I had removed all the “ghost” devices (there were about 6 of them). The troublesome devices are however still not responding to inputs from the app. Turning them on/off manually, on the other hand, invokes the normal response immediately in the app. I suppose I’ll run a few more repairs to see if it will improve things.
I had a few ghost devices, I think they arose during the times I was moving switches around and renaming them. They were a pain to get rid of 
You might wind up deleting and readding those that are still giving you trouble, but I’m glad you’ve made it this far!
I’m now at a stage where I can run a Z-Wave repair without error messages, although the repair takes longer to complete that it should it seems, but despite of that, I’m unable to control any of the troublesome devices. They show as connected when if I enable Device Health; the app indicates if these are physically turned on, but they don’t respond to any input from the ST app.
This solved my repair issues as well - after moving to new house, had a few ghost devices! Thanks!
Just thought I’d put a note on here.
Just did a z-wave repair and I had 3 ‘ghost’ devices.
Ironically my setup is working well with no issues.
Followed the steps above by defining a ‘rubbish’ device and allocating the offending id’s.
Did them one at a time and now they are all gone.
Let’s hope it hasn’t broken my setup… 
EDIT: Just thought I’d better mention that you should give your rubbish device a Z-Wave DTH otherwise it will not delete it from the z-wave list.
Obvious I suppose but worth mentioning.
Thank you for sharing your steps to remove orphaned devices - I now finally have a “clean” z-wave repair again - good stuff!