(cannot)clean the mess in items

Very good question! WIthin the IDE, it is still possible to simply type “smarthome” in the console to get a list of all commands:

osgi> smarthome
---SmartHome commands---
	smarthome firmware list <thingTypeUID> - lists the available firmwares for a thing type
	smarthome firmware status <thingUID> - lists the firmware status for a thing
	smarthome firmware update <thingUID> <firmware version> - updates the firmware for a thing
	smarthome interpret <command> - interprets the human language command
	smarthome update <item> <state> - sends a status update for an item
	smarthome send <item> <command> - sends a command for an item
	smarthome inbox - lists all current inbox entries
	smarthome inbox listignored - lists all ignored inbox entries
	smarthome inbox approve <thingUID> <label> - creates a thing for an inbox entry
	smarthome inbox clear - clears all current inbox entries
	smarthome inbox ignore <thingUID> - ignores an inbox entry permanently
	smarthome things list - lists all things
	smarthome things clear - removes all managed things
	smarthome things remove <thingUID> - removes a thing
	smarthome items list [<pattern>] - lists names and types of all items (matching the pattern, if given)
	smarthome items clear - removes all items
	smarthome items remove <itemName> - removes the given item
	smarthome links list - lists all links
	smarthome links addChannelLink <itemName> <channelUID> - links an item with a channel
	smarthome links removeChannelLink <itemName> <thingUID> - unlinks an item with a channel
	smarthome links clear - removes all managed links
	smarthome status <item> - shows the current status of an item
	smarthome > <script to execute> - Executes a script
	smarthome discovery start <thingTypeUID|bindingID> - runs a discovery on a given thing type or binding
	smarthome discovery enableBackgroundDiscovery <PID> - enables background discovery for the discovery service with the given PID
	smarthome discovery disableBackgroundDiscovery <PID> - disables background discovery for the discovery service with the given PID
	smarthome say <text> - speaks a text

On Karaf, we can at least see the main commands through

openhab> help | grep smarthome
smarthome                         Enter the subshell
smarthome:>                       Execute scripts
smarthome:discovery               Control the discovery mechanism.
smarthome:firmware                Manage your things' firmwares.
smarthome:inbox                   Manage your inbox.
smarthome:interpret               Interpret a command by a human language interpreter.
smarthome:items                   Access the item registry.
smarthome:links                   Manage your links.
smarthome:say                     Speak text by a text-to-speech service (TTS).
smarthome:send                    Send a command to an item.
smarthome:status                  Get the current status of an item.
smarthome:things                  Access your thing registry.
smarthome:update                  Send a state update to an item.
openhab> 

@maggu2810 Is there any way to get the usage displayed for the individual commands?

it appears that openhab tend to duplicate items somehow in the cache, maybe when changing groups names)

I have also seen this when editing and saving item files. A restart usually solves this.

2 Likes