Hi
I would like to use my dynalite gateway in openhab is uses HTTP GET and HTTP POST, but I can’t really see how to set it up
I have made an item that GET status and one that POST a preset by on and off
String dynalite "dynet kode [%s]" (test) { http="<[http://192.168.0.222/GetDyNet.cgi?a=21:30000" }
Switch dynet "ON/OFF Area 3 [%s]" (test) { http=">[ON:POST:[http://192.168.0.222/SetDyNet.cgi?a=21&p=1] >[OFF:POST:[http://192.168.0.222/SetDyNet.cgi?a=21&p=6]" }
if i put this http://192.168.0.222/SetDyNet.cgi?a=21&p=1 in to a webbrowser it works perfect, but not on in openhab.
SetDynNet.cgi
This file to send messages to the controller
?a=21&p=1
a= is the area to control
p= is the preset to send
GetDyNet.cgi
This file is used to get status from the controller
?a=21
a= is the area to get status from
The answer from the controller will then be
p=4
p= is the preset the area is in, so I like to display the number in the string like Preset 4 with some mapping maby
OH2 LOG:
on the item I get this error
20:31:12.087 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'http' of item 'dynalite' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: bindingConfig '<[http://192.168.0.222/GetDyNet.cgi?a=21:30000' doesn't contain a valid binding configuration
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:50)[204:org.openhab.core.compat1x:2.1.0.201706022154]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:323)[125:org.eclipse.smarthome.model.item:0.9.0.201706071228]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:295)[125:org.eclipse.smarthome.model.item:0.9.0.201706071228]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:181)[125:org.eclipse.smarthome.model.item:0.9.0.201706071228]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:352)[125:org.eclipse.smarthome.model.item:0.9.0.201706071228]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:286)[124:org.eclipse.smarthome.model.core:0.9.0.201706071228]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:136)[124:org.eclipse.smarthome.model.core:0.9.0.201706071228]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:262)[124:org.eclipse.smarthome.model.core:0.9.0.201706071228]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:325)[124:org.eclipse.smarthome.model.core:0.9.0.201706071228]
at org.eclipse.smarthome.core.service.WatchQueueReader.run(WatchQueueReader.java:206)[100:org.eclipse.smarthome.core:0.9.0.201706071228]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
on the dynet item I get following error then pressing
20:31:55.548 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/dynet] {bridgemarker=true, item=dynet, command=ON} | {org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler}={event.topics=openhab/*, service.pid=org.openhab.http, component.name=org.openhab.binding.http, component.id=207, service.id=817, service.bundleid=231, service.scope=bundle} | Bundle(org.openhab.binding.http_1.10.0.201706261321 [231])]
java.lang.IllegalArgumentException: Invalid uri '[http://192.168.0.222/SetDyNet.cgi?a=21&p=1': incorrect scheme
at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:222)[60:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:89)[60:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.openhab.io.net.http.HttpUtil.createHttpMethod(HttpUtil.java:314)[204:org.openhab.core.compat1x:2.1.0.201706022154]
at org.openhab.io.net.http.HttpUtil.executeUrl(HttpUtil.java:167)[204:org.openhab.core.compat1x:2.1.0.201706022154]
at org.openhab.io.net.http.HttpUtil.executeUrl(HttpUtil.java:130)[204:org.openhab.core.compat1x:2.1.0.201706022154]
at org.openhab.binding.http.internal.HttpBinding.formatAndExecute(HttpBinding.java:285)[231:org.openhab.binding.http:1.10.0.201706261321]
at org.openhab.binding.http.internal.HttpBinding.internalReceiveCommand(HttpBinding.java:130)[231:org.openhab.binding.http:1.10.0.201706261321]
at org.openhab.core.binding.AbstractBinding.receiveCommand(AbstractBinding.java:97)[204:org.openhab.core.compat1x:2.1.0.201706022154]
at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:45)[204:org.openhab.core.compat1x:2.1.0.201706022154]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[6:org.apache.karaf.services.eventadmin:4.0.8]
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[6:org.apache.karaf.services.eventadmin:4.0.8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Hope someone can help