[SOLVED] How to delete item? (Warning startup: Cannot add "SwitchItem" synologysurveillancestation)

  • Platform information:
    • Hardware: RPi 3B+
    • OS: openHAB 2.5.1-2 (Release Build)
    • Java Runtime Environment: openjdk version “1.8.0_152”
      OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
      OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)

When booting the warning below is reported.
How can delete the needless link?
I cannot rember where I created the synology surveillancestation item.

2020-02-22 15:48:00.839 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'SendEmails.rules'

2020-02-22 15:48:01.420 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'GuteNacht.rules'

2020-02-22 15:48:02.667 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "SwitchItem" with key "synologysurveillancestation_camera_1890o2n266300_1_event#alarm": The specified name of the item 'synologysurveillancestation_camera_1890o2n266300_1_event#alarm' is not valid!

java.lang.IllegalArgumentException: The specified name of the item 'synologysurveillancestation_camera_1890o2n266300_1_event#alarm' is not valid!

	at org.eclipse.smarthome.core.items.ItemUtil.assertValidItemName(ItemUtil.java:84) ~[?:?]

	at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.initializeItem(ItemRegistryImpl.java:183) ~[?:?]

	at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.onAddElement(ItemRegistryImpl.java:232) ~[?:?]

	at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.onAddElement(ItemRegistryImpl.java:1) ~[?:?]

	at org.eclipse.smarthome.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:182) ~[?:?]

	at org.eclipse.smarthome.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:151) ~[?:?]

	at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.added(ItemRegistryImpl.java:388) ~[?:?]

	at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.added(ItemRegistryImpl.java:1) ~[?:?]

	at org.eclipse.smarthome.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:1) ~[?:?]

	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:56) ~[?:?]

	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:75) ~[?:?]

	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutAddedElement(AbstractProvider.java:79) ~[?:?]

	at org.eclipse.smarthome.core.items.ManagedItemProvider.addItemFactory(ManagedItemProvider.java:170) ~[?:?]

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_152]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_152]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_152]

	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[?:?]

	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[?:?]

	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[?:?]

	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) ~[?:?]

	at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) ~[?:?]

	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813) ~[?:?]

	at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1788) ~[?:?]

	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:435) ~[?:?]

	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:325) ~[?:?]

	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:294) ~[?:?]

	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) ~[?:?]

	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) ~[?:?]

	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) ~[?:?]

	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) ~[?:?]

	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) ~[?:?]

	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) ~[?:?]

	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]

	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) ~[?:?]

	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) ~[?:?]

	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) ~[?:?]

	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) ~[?:?]

	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) ~[?:?]

	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) ~[?:?]

	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) ~[?:?]

	at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]

	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]

	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) ~[osgi.core-6.0.0.jar:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) ~[osgi.core-6.0.0.jar:?]

	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[osgi.core-6.0.0.jar:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) ~[osgi.core-6.0.0.jar:?]

	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.container.Module.start(Module.java:467) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402) ~[org.eclipse.osgi-3.12.100.jar:?]

	at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153) ~[?:?]

	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1036) ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062) ~[?:?]

	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_152]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]

2020-02-22 15:48:02.753 [INFO ] [thome.core.items.ManagedItemProvider] - Finished loading the items which could not have been created before.

2020-02-22 15:48:03.485 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.10.28:8081

2020-02-22 15:48:03.490 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.10.28:8444

Have you tried stopping OH, cleaning the cache and rebooting?

sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2 or sudo reboot

If that does not work see comments below but make sure you stop OH before making a change to any of those files.

Did you create this Item in PaperUI? Have you ever linked this Item to a Channel through PaperUI? I’ve found that if you delete an Item that has been linked through PaperUI, the Link remains and some parts of OH apparently look to this Link. Look in /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.thing.link.ItemChannelLink.json and make sure there isn’t a Link hanging around. Also, for items check: /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.items.Item.json

1 Like

Thanks, deleted link in

and warning is gone.