Error sending command
See original GitHub issueHi have set this up on a raspberrypi 2. Alexa has discovered my devices but when i ask to turn it on she doesnt respond with OK, the lights continue to flash for a few seconds and it warns that “sorry the device *** is not responding, please check its network connection and powersupply” Although it does actually turn the light ON on first try, but will not turn OFF, or back ON if I try it again.
Here is the error i get from the log
2016-09-29 17:14:52.360:INFO:oejs.Server:Thread-0: Started @3648ms 2016-09-29 17:14:53,629 [main] INFO com.bwssystems.HABridge.hue.HueMulator - Hue emulator service started.... 2016-09-29 17:14:53,688 [main] INFO com.bwssystems.HABridge.upnp.UpnpSettingsResource - Hue description service started.... 2016-09-29 17:14:53,714 [main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener starting.... 2016-09-29 17:14:53,730 [main] INFO com.bwssystems.HABridge.upnp.UpnpListener - UPNP Discovery Listener running and ready.... 2016-09-29 17:18:10,792 [qtp31965322-15] WARN com.bwssystems.HABridge.hue.HueMulator - Error calling out to HA gateway: IllegalArgumentException in log java.lang.IllegalArgumentException: Content type may not be null at org.apache.http.util.Args.notNull(Args.java:54) at org.apache.http.entity.ContentType.parse(ContentType.java:265) at com.bwssystems.HABridge.hue.HueMulator.doHttpRequest(HueMulator.java:982) at com.bwssystems.HABridge.hue.HueMulator.lambda$19(HueMulator.java:872) at spark.RouteImpl$1.handle(RouteImpl.java:58) at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162) at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) at org.eclipse.jetty.server.Server.handle(Server.java:517) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) at java.lang.Thread.run(Thread.java:745) 2016-09-29 17:18:10,796 [qtp31965322-15] WARN com.bwssystems.HABridge.hue.HueMulator - Error on calling url to change device state: http://192.168.1.10:8080/CMD?Light_Remote5=OFF
I have tried to add the device using the web configurator and also using
{ "name" : "fireplace light", "deviceType" : "switch", "onUrl" : "http://192.168.1.10:8080/CMD?Light_Remote1=ON", "offUrl" : "http://192.168.1.10:8080/CMD?Light_Remote1=OFF" }
Perhaps something I have missed?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
I am putting some better handling code in that call request for the http put and post.
Just to add my experience with this issue. I copied the code from the OpenRemote how to guide for Denon Amplifiers : http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Denon+HTTP+Control.
The ? they are using in their code examples throws an error when I tried using it in ha-bridge.
MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FSAT&cmd1=aspMainZone_WebUpdateStatus%2F
It looks perfectly fine but won’t work in ha-bridge without editing.
I edited the entry I pasted in the ha-bridge device editor and changed the ? in their code to a typed ? from my keyboard and it all worked fine after that small change.
So it appears there is an issue with encoding. This was with version 3.5.1. According to the W3C validator the Openremote site is using UTF-8 encoding. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.openremote.org%2Fdisplay%2Fdocs%2FOpenRemote%2B2.0%2BHow%2BTo%2B-%2BDenon%2BHTTP%2BControl&charset=(detect+automatically)&doctype=Inline&group=0
I hope this information helps others.