IHC - Binding OH2

Hey all

First, in advance, thanks for your help.

I have had to many things to do in the past half year, and now im starting from scratch. Before i used 1,8 and now after some times, I succeed with installing Raspberian on a PI2

i have some problems with my IHC (light) binding

Im doing is very simple in the beginning, this is my items and sitemap file:

Item:
Switch Kontorlys “Lys på kontor” (Office) {ihc=">[ON:111644:100],<[OFF:111900:100]"}

Sitemap:
Switch item=Kontorlys

This is my log:
[ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type ‘ihc’ of item ‘Kontorlys’ could not be parsed correctly.
java.lang.NumberFormatException: For input string: "[OFF:111900:100]"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:580) [?:?]
at java.lang.Integer.parseInt(Integer.java:615) [?:?]
at org.openhab.binding.ihc.internal.IhcGenericBindingProvider.getResourceIdFromString(IhcGenericBindingProvider.java:193) [239:org.openhab.binding.ihc:1.11.0]
at org.openhab.binding.ihc.internal.IhcGenericBindingProvider.processBindingConfiguration(IhcGenericBindingProvider.java:152) [239:org.openhab.binding.ihc:1.11.0]
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:49) [240:org.openhab.core.compat1x:2.2.0]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:341) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:310) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:195) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:377) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:314) [134:org.eclipse.smarthome.model.core:0.10.0.b1]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:143) [134:org.eclipse.smarthome.model.core:0.10.0.b1]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:247) [134:org.eclipse.smarthome.model.core:0.10.0.b1]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:311) [134:org.eclipse.smarthome.model.core:0.10.0.b1]
at org.eclipse.smarthome.core.service.WatchQueueReader.run(WatchQueueReader.java:209) [109:org.eclipse.smarthome.core:0.10.0.b1]
at java.lang.Thread.run(Thread.java:748) [?:?]

I am connected to the IHC controller, and the on/off switch is working fine:
2018-01-16 08:31:36.585 [ome.event.ItemCommandEvent] - Item ‘Kontorlys’ received command ON
2018-01-16 08:31:36.615 [vent.ItemStateChangedEvent] - Kontorlys changed from NULL to ON
2018-01-16 08:31:37.379 [ome.event.ItemCommandEvent] - Item ‘Kontorlys’ received command OFF
2018-01-16 08:31:37.405 [vent.ItemStateChangedEvent] - Kontorlys changed from ON to OFF

What have i done wrong?

Peter

Should it be?

Switch Kontorlys “Lys på kontor” (Office) {ihc=">[ON:111644:100],>[OFF:111900:100]"}

thanks, but still not enough

not the error is:

2018-01-16 11:42:40.336 [ERROR] [nhab.binding.ihc.internal.IhcBinding] - Error occurred during item update
java.lang.NullPointerException: null
at org.openhab.binding.ihc.ws.IhcResourceInteractionService.resourceQuery(IhcResourceInteractionService.java:89) [239:org.openhab.binding.ihc:1.11.0]
at org.openhab.binding.ihc.ws.IhcClient.getResourceValueInformation(IhcClient.java:434) [239:org.openhab.binding.ihc:1.11.0]
at org.openhab.binding.ihc.internal.IhcBinding.updateResource(IhcBinding.java:406) [239:org.openhab.binding.ihc:1.11.0]
at org.openhab.binding.ihc.internal.IhcBinding.internalReceiveUpdate(IhcBinding.java:359) [239:org.openhab.binding.ihc:1.11.0]
at org.openhab.core.binding.AbstractBinding.receiveUpdate(AbstractBinding.java:113) [240:org.openhab.core.compat1x:2.2.0]
at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:39) [240:org.openhab.core.compat1x:2.2.0]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.3]
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [3:org.apache.karaf.services.eventadmin:4.1.3]
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [3:org.apache.karaf.services.eventadmin:4.1.3]
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [3:org.apache.karaf.services.eventadmin:4.1.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

Without further details, I guess that Resource ID 111644 or 111900 is not correct.

hi again…

thanks, thats was the problem… now its working… i have tried someting 100 times, copy and pasted soo.

thanks :slight_smile: