Delete Tag(s) from DeviceHub on multiple Litmus Edge
To delete Tag(s) with Litmus Excel Add-ins, you should be familiar with how Devices work in DeviceHub on Litmus Edge as well as the consequences.
Before You Begin
- You have installed the Litmus Excel Add-ins extension. See Install Litmus Excel Add-ins for details.
- You have prepared a Tool file.
- Tag(s) have been added to DeviceHub.
Initial Preparation
Open a new Tag Management Tool File in Excel.
If prompted, Enable Content to allow the code to run.

Make sure the the tool is set to Multiple LE for the Connect To option.

Delete Tag(s)
Import Tag(s)
Import the Tag Settings for tag(s) defined on Litmus Edge using the Import Tag(s) Wizard.

Users can set a filter to reduce the number of Tag(s) shown as selection to the user.
- LE Device IP: Select or enter the IPv4 of the Litmus Edge you want to import tag(s) from
Notes:
You may need to provide the API Key if the Litmus Edge has not been used with the tool.
- Search Option: Select what type of filter is to be used
- Tag Name Mask: Set the filter to be applied. Will be ignored if Search Option is set to ALL
- DeviceHub Devices: Select if you want to tags only from a specific device.
Important: If more than 50000 tags are defined on the selected Litmus Edge, a user can only search for tags for one single DeviceHub device.
- The wizard will show what filter will be applied.

- Press the Search button to pull the filtered List of devices from Litmus Edge.

- The user will be shown the filtered List of tag(s) matching their filter.

- Select the Tag(s) to import and press the Import button.

- The selected tag(s) with their settings are imported into the sheet. Once finished, the user can either.
- perform another search using the New Search button
- finsih the import using the Close button

- The Action for each imported tag is set to M for modify.

Mark Tag(s) for deletion
Change the Action to D for the Tag(s) you want to delete on Litmus Edge.

Notes:
Set the Action to I for ignore for tag(s) in the sheet you do not want to process.
Executing Actions
If the tool also includes Tag(s) with either the Action A or M, it is Recommended but not mandatory to verify the configuration first without executing the Action by pressing the Verify Only button.

This will check that all required Tag Settings are provided and logically correct. And provide any finding to the user. Example: Below the user did not set a Register Address / Path.

The Tag(s) can be deleted on Litmus Edge by pressing the Verify + Execute button.

The tool will group all the tag(s) based on the Litmus Edge(s) defined in column Target Litmus Edge IP. For each Litmus Edge this will check that all required Tag Settings are provided and logically correct. And provide any finding to the user. If no issues have been identified, the tool will verify that the user wants to execute ALL the actions from the Action Column:
- A: Add Tag(s)
- M: Modify Tag(s)
- D: Delete Tag(s)
- I: Ignore Tag(s) -> do nothing
To perform all actions, press the Yes button.

The Tool will perform ALL Actions one Litmus Edge at a time. When finished, a result Summary is shown. Close the Result Summary by pressing the X close button.

Once all Litmus Edge have been processed, the tool will ask if the user wants to re-compare the Tag(s) against Litmus Edge. To re-compare, press the Yes button. To not re-compare, press the No button.

If the User selected to press the Yes button from aboves messagebox, the tool will pull all the tag settings from Litmus Edge again including the RegisterID and also change the Action to M for each Tag with a RegisterID or A for devices with no RegisterID. Tag(s) with an Action of I will not be updated.
