[SOLVED] How to remove all things in inbox

I am in the company’s environment in accordance with the Tutorial (Beginner) , Network Binding search results are too lot, how can I clear these results, only remove one by one?

  • uninstall the network binding (since it will continue scanning the LAN and show the discovery results again in the inbox)
  • stop OH2
  • remove file org.eclipse.smarthome.config.discovery.DiscoveryResult.json (in Linux subdir /var/lib/openhab2/jsondb in Windows subdir C:\openHAB2\userdata\jsondb (keep a backup copy just in case)
  • start OH2
1 Like

Thanks~!

1 Like

Just a short correction: The network binding does not have a background scanner, on purpose. So it only lists result if the user actively requested a scan.

Cheers, David

1 Like

Just had the same issue, started a scan and it found over 4000 devices, many on a different network to my home one (how does that even happen that it finds 192.x.x.x.x when I’m on a 10.0.x.x network?)

On a raspberry pi running openhabian, i cannot get this to work. I removed the binding (bluetooth). Able to stop the service, delete the file and restart the service BUT all old devices show up… any thoughts?

I’m having the same problem. I’ve uninstalled the Bluetooth binding, stopped Openhab2, removed /var/lib/openhab2/jsondb/org.eclipse.smarthome.config.discovery.DiscoveryResult.json then started Openhab2 again. Each time, the inbox returns the same 1802 inbox entries. All of which appear to be bluetooth devices. Is it possible that mysql is maintaining these entries

I modified @5iver 's script here to do this

I found the simplest way is run openhab-cli and get into karaf by running similar command: smarthome:inbox clear (something like this)

6 Likes
smarthome:inbox clear

Yes, this command worked for me when the json manual deletion in post #1 didn’t (OH2.3)

6 Likes

Would a delete all button in the inbox not be more useful for setting up and discovering/clearing items sort by type or arrival timestamp(see below)

Also I think a timestamp on discovery of the item would assist in figuring out what it is

2 Likes

Yes, fully emptying the file does not work. An empty JSON object has to remain. Short-hand command for clearing the inbox while openHAB is turned off (example for Linux/Apt/openHABian installation):

echo "{}" > /var/lib/openhab2/jsondb/org.eclipse.smarthome.config.discovery.DiscoveryResult.json
3 Likes

In OH3 this is openhab:inbox clear
This worked great for me.

1 Like

This worked for me. Thanks