Deleting Multiple Devices without Reload Inbetween
-
Wish I could offer something easy here, but in my experience, deleting multiple goes wrong too often.
But, you might try dropping this automated delete script into startup Lua. Don't forget to remove it when the work is done...
-- Put the device numbers of the devices you want to delete in here: deleteDevices = { 9991, 9992, 9993 } function postDeleteReload() luup.reload() end luup.log( "Running Startup Lua Device Deleter", 2 ) for _,d in ipairs( deleteDevices ) do if luup.devices[d] then luup.log( "Startup Lua Device Deleter found " .. tostring(d) .. ", deleting...", 2 ) luup.call_action( "urn:micasaverde-com:serviceId:HomeAutomationGateway1", "DeleteDevice", { DeviceNum=d }, 0 ) luup.call_delay( "postDeleteReload", 30 ) break end end
When your Vera stops reloading, the script has deleted all of the devices and you can remove it from Startup Lua. It's meant to be slow (long delay) to give you time to get in and disable the script if it goes wrong and runs indefinitely (it shouldn't, but there's a reason skydivers have reserves).
-
Didn't think this one through.. all the devices were hidden so now I am playing the guessing game for when its done lol
Edit: It worked!!! Thanks Patrick
@pabla said in Deleting Multiple Devices without Reload Inbetween:
now I am playing the guessing game for when its done lol
You got it figured out, but the benefit of future readers: just wait for the reloads to stop. If it goes longer than two minutes without a reload, it's done.