I am trying to use the HTTP binding for a dimmer / Switch. I have included the urls below which i know work. I cant seem to figure out the syntax for the items. The switch (ON /OFF) is working correctly but i am not sure what syntax to use for dimmer.
Thanks in advance. I looked through several topics on the forum on this but its not still not clear to me.
Below are the Urls and items i created in the items files. I kow the urls are correct because when i use them in a browser, they perform the action correctly.
thanks for your suggestion. Unfortunately that did not work.
what should the value for the http format (under htttp binding settings) be set to for the % character to work correctly?
when i issue http://192.168.1.30:8688/controller/rest/control/62/50 in a browser, it sets the value of the dimmer correctly to 50%. I cant figure out how to pass a value to the dimmer from openhab dimmer? i have a widget setup on habpanel as a dimmer and i am mapping the item dimmer to it.
i tried replacing 1087 with 62 in the suggestion you had provided (because 62 is the address of the dimmer) but no luck
logs shows:
==> /var/log/openhab2/events.log <==
2018-11-21 13:06:43.265 [ome.event.ItemCommandEvent] - Item âDinningRoomLightValueâ received command 10
2018-11-21 13:06:43.341 [vent.ItemStateChangedEvent] - DinningRoomLightValue changed from NULL to 10
2018-11-21 13:06:45.852 [ome.event.ItemCommandEvent] - Item âDinningRoomLightValueâ received command 48
2018-11-21 13:06:45.866 [vent.ItemStateChangedEvent] - DinningRoomLightValue changed from 10 to 48
2018-11-21 13:06:47.085 [ome.event.ItemCommandEvent] - Item âDinningRoomLightValueâ received command 61
2018-11-21 13:06:47.097 [vent.ItemStateChangedEvent] - DinningRoomLightValue changed from 48 to 61
2018-11-21 12:56:32.387 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model âtrial.itemsâ
2018-11-21 12:56:32.415 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type âhttpâ of item âDinningRoomLightValueâ could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: bindingConfig âhttp://192.168.1.30:8688/controller/rest/status/588157â doesnât represent a valid in-binding-configuration. A valid configuration is matched by the RegExp â(.?)({.})?:(?!//)(\d*):(.)â
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:51) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:397) [128:org.eclipse.smarthome.model.item:0.10.0.201811171951]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:366) [128:org.eclipse.smarthome.model.item:0.10.0.201811171951]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:229) [128:org.eclipse.smarthome.model.item:0.10.0.201811171951]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:432) [128:org.eclipse.smarthome.model.item:0.10.0.201811171951]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:301) [127:org.eclipse.smarthome.model.core:0.10.0.201811171951]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:123) [127:org.eclipse.smarthome.model.core:0.10.0.201811171951]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:227) [127:org.eclipse.smarthome.model.core:0.10.0.201811171951]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:291) [127:org.eclipse.smarthome.model.core:0.10.0.201811171951]
at org.eclipse.smarthome.core.service.WatchQueueReader.run(WatchQueueReader.java:240) [101:org.eclipse.smarthome.core:0.10.0.201811171951]
at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: org.openhab.model.item.binding.BindingConfigParseException: bindingConfig âhttp://192.168.1.30:8688/controller/rest/status/588157â doesnât represent a valid in-binding-configuration. A valid configuration is matched by the RegExp '(.?)({.})?:(?!//)(\d):(.)â
at org.openhab.binding.http.internal.HttpGenericBindingProvider.parseInBindingConfig(HttpGenericBindingProvider.java:189) ~[?:?]
at org.openhab.binding.http.internal.HttpGenericBindingProvider.parseBindingConfig(HttpGenericBindingProvider.java:153) ~[?:?]
at org.openhab.binding.http.internal.HttpGenericBindingProvider.processBindingConfiguration(HttpGenericBindingProvider.java:119) ~[?:?]
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:49) ~[?:?]
⌠10 more
2018-11-21 12:56:32.487 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type âhttpâ of item âDinningRoomLightStatusâ could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: bindingConfig âhttp://192.168.1.30:8688/controller/rest/status/588157â doesnât represent a valid in-binding-configuration. A valid configuration is matched by the RegExp '(.?)({.})?:(?!//)(\d):(.)â
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:51) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:397) [128:org.eclipse.smarthome.model.item:0.10.0.201811171951]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:366) [128:org.eclipse.smarthome.model.item:0.10.0.201811171951]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:229) [128:org.eclipse.smarthome.model.item:0.10.0.201811171951]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:432) [128:org.eclipse.smarthome.model.item:0.10.0.201811171951]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:301) [127:org.eclipse.smarthome.model.core:0.10.0.201811171951]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:123) [127:org.eclipse.smarthome.model.core:0.10.0.201811171951]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:227) [127:org.eclipse.smarthome.model.core:0.10.0.201811171951]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:291) [127:org.eclipse.smarthome.model.core:0.10.0.201811171951]
at org.eclipse.smarthome.core.service.WatchQueueReader.run(WatchQueueReader.java:240) [101:org.eclipse.smarthome.core:0.10.0.201811171951]
at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: org.openhab.model.item.binding.BindingConfigParseException: bindingConfig âhttp://192.168.1.30:8688/controller/rest/status/588157â doesnât represent a valid in-binding-configuration. A valid configuration is matched by the RegExp '(.?)({.})?:(?!//)(\d):(.)â
at org.openhab.binding.http.internal.HttpGenericBindingProvider.parseInBindingConfig(HttpGenericBindingProvider.java:189) ~[?:?]
at org.openhab.binding.http.internal.HttpGenericBindingProvider.parseBindingConfig(HttpGenericBindingProvider.java:153) ~[?:?]
at org.openhab.binding.http.internal.HttpGenericBindingProvider.processBindingConfiguration(HttpGenericBindingProvider.java:119) ~[?:?]
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:49) ~[?:?]
⌠10 more
2018-11-21 12:56:33.580 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model âtrial.itemsâ
2018-11-21 12:56:33.605 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type âhttpâ of item âDinningRoomLightValueâ could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: bindingConfig âhttp://192.168.1.30:8688/controller/rest/status/588157â doesnât represent a valid in-binding-configuration. A valid configuration is matched by the RegExp '(.?)({.})?:(?!//)(\d):(.)â
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:51) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:397) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:366) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:229) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:432) ~[?:?]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:301) ~[?:?]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:139) ~[?:?]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:227) ~[?:?]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:291) ~[?:?]
at org.eclipse.smarthome.core.service.WatchQueueReader.lambda$3(WatchQueueReader.java:323) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: org.openhab.model.item.binding.BindingConfigParseException: bindingConfig âhttp://192.168.1.30:8688/controller/rest/status/588157â doesnât represent a valid in-binding-configuration. A valid configuration is matched by the RegExp '(.?)({.})?:(?!//)(\d):(.)â
at org.openhab.binding.http.internal.HttpGenericBindingProvider.parseInBindingConfig(HttpGenericBindingProvider.java:189) ~[?:?]
at org.openhab.binding.http.internal.HttpGenericBindingProvider.parseBindingConfig(HttpGenericBindingProvider.java:153) ~[?:?]
at org.openhab.binding.http.internal.HttpGenericBindingProvider.processBindingConfiguration(HttpGenericBindingProvider.java:119) ~[?:?]
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:49) ~[?:?]
⌠16 more
2018-11-21 12:56:33.708 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type âhttpâ of item âDinningRoomLightStatusâ could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: bindingConfig âhttp://192.168.1.30:8688/controller/rest/status/588157â doesnât represent a valid in-binding-configuration. A valid configuration is matched by the RegExp '(.?)({.})?:(?!//)(\d):(.)â
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:51) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:397) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:366) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:229) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:432) ~[?:?]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:301) ~[?:?]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:139) ~[?:?]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:227) ~[?:?]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:291) ~[?:?]
at org.eclipse.smarthome.core.service.WatchQueueReader.lambda$3(WatchQueueReader.java:323) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: org.openhab.model.item.binding.BindingConfigParseException: bindingConfig âhttp://192.168.1.30:8688/controller/rest/status/588157â doesnât represent a valid in-binding-configuration. A valid configuration is matched by the RegExp '(.?)({.})?:(?!//)(\d):(.*)â
at org.openhab.binding.http.internal.HttpGenericBindingProvider.parseInBindingConfig(HttpGenericBindingProvider.java:189) ~[?:?]
at org.openhab.binding.http.internal.HttpGenericBindingProvider.parseBindingConfig(HttpGenericBindingProvider.java:153) ~[?:?]
at org.openhab.binding.http.internal.HttpGenericBindingProvider.processBindingConfiguration(HttpGenericBindingProvider.java:119) ~[?:?]
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:49) ~[?:?]
⌠16 more
2018-11-21 12:58:31.152 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at âitems/DinningRoomLightStatusâ with an invalid status value âhttp://192.168.1.30:8688/controller/rest/control/62/50â.
Thanks but unfortunately i didnt find anything relavant. I tried using wireshark to see the actual url sent by openhab and whati am observing is that excep for item and widget type âswitchâ which are working, i dont see the dimmer sending out any messages at all.
I used a switch type with fixed dim values for on and off and they seem work fine. in the imtem below, ON sets the dimmer value to 87 and off sets the value to 19.
Also, how do get the current status to show up on the habpanel- i tried creating the following item and mapped it to a dummy widget but it is not displaying the values correctly. This same url from a webbrowser returns the values correctly.
image attached above. 588157 is the dimmer and 588158 is the switch. physically they are both in one switch / dimmer. I tried using the following for them:
I have tried using the zwave dimer directly with openhab but my observation is zwave implementation on Openremote itâs a lot more robust than the zwave binding in openhab.
and now you are struggling for days to get an HTTP bound Dimmer Item to talk to your âmiddle-wareâ⌠not worth it⌠I would definitely go direct.
Sorry definitely donât mean to hurt anyoneâs feelings itâs just my honest opinion⌠could be because I have been using openremote for over two years so could be just the familiarity factory.
I really hope I can get the http binding working. Openhab and Openremote together I think can provide a very powerful and flexible solution.
If anyone has any other ideas on how to make http binding work with the links I have included in my previous post, I would love to hear them and try them out.