armzilla / amazon-echo-ha-bridge

emulates philips hue api to other home automation gateways
Apache License 2.0
732 stars 168 forks source link

com.armzilla.ha.hue.Hue Mulator: Error calling out to HA gateway #18

Closed m19brandon closed 9 years ago

m19brandon commented 9 years ago

The command is going through and Alexa fires the URL but I get an error verbally and in the JVM.

'The device or group name "Kitchen Lights" is not responding at the moment.'

Mulator           : hue light requested: 09104412-b177-4893-80da-330c90e0e7ce fr
om 192.168.1.160
2015-07-15 20:44:49.388  INFO 5108 --- [nio-8083-exec-3] com.armzilla.ha.hue.Hue
Mulator           : found device named: T.V.
2015-07-15 20:44:49.559  INFO 5108 --- [nio-8083-exec-5] com.armzilla.ha.hue.Hue
Mulator           : hue state change requested: wEWHFoThKOqA1xX9EKtf0seDL8NfLo3A
ODms3FUd from 192.168.1.160
2015-07-15 20:44:49.591  INFO 5108 --- [nio-8083-exec-5] com.armzilla.ha.hue.Hue
Mulator           : hue stage change body: {"on": false}
2015-07-15 20:44:49.591  INFO 5108 --- [nio-8083-exec-5] com.armzilla.ha.hue.Hue
Mulator           : calling GET on URL: http://192.168.1.203:8084/?Family_Set_Of
f
2015-07-15 20:44:49.669 ERROR 5108 --- [nio-8083-exec-5] com.armzilla.ha.hue.Hue
Mulator           : Error calling out to HA gateway

org.apache.http.ConnectionClosedException: Premature end of Content-Length delim
ited message body (expected: 1374; received: 0
        at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthIn
putStream.java:180)
        at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthIn
putStream.java:200)
        at org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthI
nputStream.java:103)
        at org.apache.http.impl.execchain.ResponseEntityProxy.streamClosed(Respo
nseEntityProxy.java:126)
        at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputSt
ream.java:227)
        at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.
java:174)
        at org.apache.http.util.EntityUtils.consume(EntityUtils.java:88)
        at com.armzilla.ha.hue.HueMulator.doHttpGETRequest(HueMulator.java:174)
        at com.armzilla.ha.hue.HueMulator.stateChange(HueMulator.java:159)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvok
e(InvocableHandlerMethod.java:221)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeF
orRequest(InvocableHandlerMethod.java:137)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocabl
eHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingH
andlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingH
andlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapt
er.handle(AbstractHandlerMethodAdapter.java:85)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch
erServlet.java:959)
        at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche
rServlet.java:893)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame
workServlet.java:966)
        at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServl
et.java:879)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkSer
vlet.java:842)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:291)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52
)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConf
iguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConf
iguration.java:291)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInterna
l(HiddenHttpMethodFilter.java:77)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at com.armzilla.ha.filters.SpringBootCorsFilter.doFilter(SpringBootCorsF
ilter.java:28)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilter
Internal(WebRequestTraceFilter.java:102)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterIntern
al(CharacterEncodingFilter.java:85)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfig
uration$MetricsFilter.doFilterInternal(MetricFilterAutoConfiguration.java:90)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:219)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:501)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:142)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:79)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:516)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:1086)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:659)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.pr
ocess(Http11NioProtocol.java:223)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpo
int.java:1558)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoin
t.java:1515)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh
read.java:61)
        at java.lang.Thread.run(Unknown Source)
armzilla commented 9 years ago

Your service seems to be responding with a content length but then does not return anything in the body. What is this service that you are hitting?

m19brandon commented 9 years ago

A Eventghost Webserver page. The body is empty. Let me see what I can do to change that. Thanks this is a great project.

On Jul 16, 2015 3:25 AM, "Arm Suwarnaratana" notifications@github.com wrote:

Your service seems to be responding with a content length but then does not return anything in the body. What is this service that you are hitting?

— Reply to this email directly or view it on GitHub.

armzilla commented 9 years ago

@m19brandon just following up, were you able to resolve this? This is in the apache http components lib and would be difficult to mangle on my side.

m19brandon commented 9 years ago

Yes, I was. Just added a default.HTML page. On Aug 5, 2015 11:11 PM, "Arm Suwarnaratana" notifications@github.com wrote:

@m19brandon https://github.com/m19brandon just following up, were you able to resolve this? This is in the apache http components lib and would be difficult to mangle on my side.

— Reply to this email directly or view it on GitHub https://github.com/armzilla/amazon-echo-ha-bridge/issues/18#issuecomment-128223594 .

armzilla commented 9 years ago

thanks, closing the issue