openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

LGTV: Update to 2014/2015 - channel switching #3573

Closed GeneralLuzi closed 7 years ago

GeneralLuzi commented 8 years ago

Hello,

in the attachment you can see the channel list xml files downloaded by openhab and via browser

lgtv-xml.zip

Comparing the files there are some differences in the xml-structure, which lead to arrayoutofbound exceptions while changing the chanel number:

12:35:42.027 [DEBUG] [b.lgtv.internal.LgtvConnection:379 ] - warning - unhandled event 12:35:42.048 [DEBUG] [b.lgtv.internal.LgtvConnection:202 ] - sendtohandlers remoteaddr=192.168.178.43 message=CHANNEL_CURRENTNAME= 12:35:42.068 [DEBUG] [.o.b.lgtv.internal.LgtvBinding:403 ] - Received status update 'CHANNEL_CURRENTNAME=' from ip 192.168.178.43 for deviceId wohnzimmer 12:35:42.089 [ERROR] [b.lgtv.internal.LgtvConnection:211 ] - Cannot send to EventListeners / maybe not initialized yet java.lang.ArrayIndexOutOfBoundsException: 1 at org.openhab.binding.lgtv.internal.LgtvBinding.statusUpdateReceived(LgtvBinding.java:411) ~[bundlefile:na] at org.openhab.binding.lgtv.lginteraction.LgTvMessageReader.sendtohandlers(LgTvMessageReader.java:207) [bundlefile:na] at org.openhab.binding.lgtv.lginteraction.LgTvMessageReader.doPost(LgTvMessageReader.java:370) [bundlefile:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) [javax.servlet_3.0.0.v201112011016.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet_3.0.0.v201112011016.jar:na] at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na] at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na] at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet_3.0.0.v201112011016.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598) [org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486) [org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413) [org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.Server.handle(Server.java:350) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851) [org.eclipse.jetty.http_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) [org.eclipse.jetty.http_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) [org.eclipse.jetty.io_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) [org.eclipse.jetty.io_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) [org.eclipse.jetty.util_8.1.3.v20120522.jar:8.1.3.v20120522] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) [org.eclipse.jetty.util_8.1.3.v20120522.jar:8.1.3.v20120522] at java.lang.Thread.run(Unknown Source) [na:1.8.0_66] 12:35:42.255 [DEBUG] [b.lgtv.internal.LgtvConnection:202 ] - sendtohandlers remoteaddr=192.168.178.43 message=CHANNEL_CURRENTNUMBER=37 12:35:42.266 [DEBUG] [.o.b.lgtv.internal.LgtvBinding:403 ] - Received status update 'CHANNEL_CURRENTNUMBER=37' from ip 192.168.178.43 for deviceId wohnzimmer 12:35:42.286 [DEBUG] [.o.b.lgtv.internal.LgtvBinding:430 ] - statusupdaterec match found itemname=LgTvChannel cmd=CHANNEL_CURRENTNUMBER deviceId=wohnzimmer value=37 12:35:42.292 [INFO ] [runtime.busevents :26 ] - LgTvChannel state updated to 37 12:35:42.292 [DEBUG] [b.lgtv.internal.LgtvConnection:202 ] - sendtohandlers remoteaddr=192.168.178.43 message=CHANNEL_SET=37 12:35:42.300 [DEBUG] [.o.b.lgtv.internal.LgtvBinding:403 ] - Received status update 'CHANNEL_SET=37' from ip 192.168.178.43 for deviceId wohnzimmer 12:35:42.305 [DEBUG] [.o.b.lgtv.internal.LgtvBinding:430 ] - statusupdaterec match found itemname=LgTvChannel cmd=CHANNEL_SET deviceId=wohnzimmer value=37 12:35:42.310 [INFO ] [runtime.busevents :26 ] - LgTvChannel state updated to 37

Another issue is, that my channel list is devided into cabel-DTV and Cabel-TV (same chtype within the xml-file: cable ). I am only able to switch the cabel-TV chanels and not the one of cabel-DTV.

Pherhaps you have a smart idea how to solve it. I assue you have to update the logic the xml file is created (for channel switch) and is read (for chanel list. Please update this binding.

Thanks and BR generalluzi

watou commented 8 years ago

@martinfluchgmxnet, would you have a look at this issue?

9037568 commented 7 years ago

@GeneralLuzi can you try the latest release (1.8.3)? If the problem is still occurring, please attach a debug log.