How to delete a virtual device IF all else failed

If you have tried deleting the device from the API, from the MIOS UI, from the Vera App and nothing works. Here is how to delete the device. You need to be a bit computer savvy or good at following instructions.

Here goes:

You will need:
1.1- A computer running windows
1.2- Putty Get it at:(Download PuTTY: latest release (0.78))
1.3- WinScp Get it at (Downloading WinSCP-5.21.6-Setup.exe :: WinSCP)
1.4- Your Ezlo hub password (found under the physical Ezlo hub)
1.5- Your Ezlo hub IP address
I found mine in my router network DHCP page
Search either IP associated with the Ezlo MAC address (found under the Ezlo Hub)
or the IP associated with the device name (the default is HUB+SerialNumber)
Ex: HUB90014460 (this one is not real)
1.6 The device ID of the device you want to delete.
Get this from the API tool (Ezlo API Tool)
a- Login with your MIOS username and password
b- From the dropdown select the controller that contains the device you wish to delete
c- Click Connect
d- In the command dropdown select “hub.devices.list” and click “Send”
e- In Response area click on “result”, then on “devices”
f- Find the device(s) you want to delete and copy its (their) ID. Save it(or them) somewhere for later in a easily accessible text file.

1- get the file “remove_device.sh

Paste this line in the URL input field (top input box):
http://dl.mios.com/customercare/remove_device.sh -O /tmp/remove_device.sh
Copy the file to tour desktop (easy to find later)

2- Open WinScp and configure an SCP connection
IP address (step 1.5)
User : root
Password: the password found at step 1.4
navigate the right (Ezlo hub) pane to /tmp
Navigante the left pane to your desktop
Drag the remove_device.sh from the left to right (equivalent to copying the file from your desktop to /temp on the hub)
close WinSpc

3- Open Putty
Create SSH session
user: root
Password: (from step1.4)

Type the following command + enter to give “Execute right” to the file remove_device.sh

chmod +rwx /temp/remove_device.sh (only needed once in case you have many device to delete)

Type the following command + enter to remove the device replacing DeviceID by the ID of the device you wish to delete

/temp/remove_device/ DeviceID

Repeat for all devices you wish to delete
Exit the session by typing:
exit

P.S. I found that if the device is an array like a “Weather Sensor” when you create such a device even if you specify a count of one, five (5) get created. I such a case deleting the device with the first ID of the array deletes them all at once.

3 Likes

Hi @Franmarch thank you for this step-by-step guide, sharing is caring. For customers that are not computer-savy or fail while performing these steps, you can send us a request at support@ezlo.com and we will delete the device for you.