Use XMLTV with openHAB

Tags: #<Tag:0x00007f2fb5214d50>

Could you please share your XMLTV file so I can have a look at it ?

Thanks for the reply i have attached the XML file hope this is what you are looking for https://www.dropbox.com/s/far2ljnwqezkf8j/WA.xml?dl=0

Weird, just tried your file and it seems to work fine

Mmmmm i must be doing something wrong

I uninstall and reinstalled and i get the same results

can i force the XMLTV Binding to update some how

i have check my logs and i now get the following

2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it
2019-03-15 18:57:50.037 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programmes in XML file, think to refresh it

is there something i need to fix

1 Like

Are you sure your XML file is not outdated ?

Well after checking the file and downloading a new one (Which still didn’t work )i decided to delete all the Things deleted the cache and temp contents restart and see if i could get it to work but i now get this


Any ideas ???
also i checked the logs and found this
2019-03-16 17:48:58.099 [ERROR] [g.xmltv.internal.XmlTVHandlerFactory] - Unable to create XmlTVHandler : “org.openhab.binding.xmltv.internal.jaxb” doesnt contain ObjectFactory.class or jaxb.index
2019-03-16 17:48:58.100 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while calling thing handler factory ‘org.openhab.binding.xmltv.internal.XmlTVHandlerFactory@6b9609e2’: XmlTVHandlerFactory could not create a handler for the thing ‘xmltv:xmltvfile:721a427f’.
java.lang.IllegalStateException: XmlTVHandlerFactory could not create a handler for the thing ‘xmltv:xmltvfile:721a427f’.
at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:130) ~[195:org.openhab.core.thing:2.5.0.201903152354]
at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.doRegisterHandler(ThingManagerImpl.java:600) [195:org.openhab.core.thing:2.5.0.201903152354]
at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.registerHandler(ThingManagerImpl.java:577) [195:org.openhab.core.thing:2.5.0.201903152354]
at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.registerAndInitializeHandler(ThingManagerImpl.java:1073) [195:org.openhab.core.thing:2.5.0.201903152354]
at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.thingAdded(ThingManagerImpl.java:458) [195:org.openhab.core.thing:2.5.0.201903152354]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:209) [195:org.openhab.core.thing:2.5.0.201903152354]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(ThingRegistryImpl.java:129) [195:org.openhab.core.thing:2.5.0.201903152354]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(ThingRegistryImpl.java:1) [195:org.openhab.core.thing:2.5.0.201903152354]
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:154) [145:org.openhab.core:2.5.0.201903152351]
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:1) [145:org.openhab.core:2.5.0.201903152351]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:56) [145:org.openhab.core:2.5.0.201903152351]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:74) [145:org.openhab.core:2.5.0.201903152351]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutAddedElement(AbstractProvider.java:78) [145:org.openhab.core:2.5.0.201903152351]
at org.eclipse.smarthome.core.common.registry.AbstractManagedProvider.add(AbstractManagedProvider.java:61) [145:org.openhab.core:2.5.0.201903152351]
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.add(AbstractRegistry.java:322) [145:org.openhab.core:2.5.0.201903152351]
at org.eclipse.smarthome.io.rest.core.internal.thing.ThingResource.create(ThingResource.java:237) [163:org.openhab.core.io.rest.core:2.5.0.201903160014]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [136:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [136:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [136:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [136:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [136:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [136:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [137:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [134:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [134:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [134:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [134:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [134:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) [30:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) [101:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) [101:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [204:org.ops4j.pax.web.pax-web-jetty:7.2.5]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [98:org.eclipse.jetty.security:9.4.12.v20180830]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) [204:org.ops4j.pax.web.pax-web-jetty:7.2.5]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) [101:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [204:org.ops4j.pax.web.pax-web-jetty:7.2.5]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.Server.handle(Server.java:503) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [100:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) [91:org.eclipse.jetty.io:9.4.12.v20180830]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [91:org.eclipse.jetty.io:9.4.12.v20180830]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [91:org.eclipse.jetty.io:9.4.12.v20180830]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [103:org.eclipse.jetty.util:9.4.12.v20180830]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [103:org.eclipse.jetty.util:9.4.12.v20180830]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [103:org.eclipse.jetty.util:9.4.12.v20180830]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [103:org.eclipse.jetty.util:9.4.12.v20180830]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [103:org.eclipse.jetty.util:9.4.12.v20180830]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) [103:org.eclipse.jetty.util:9.4.12.v20180830]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) [103:org.eclipse.jetty.util:9.4.12.v20180830]
at java.lang.Thread.run(Thread.java:748) [?:?]

Now i’m not sure what to make of this so if you could provide some assistance it would be appreciated

thanks again for your help

Geoff

Sorry for this but i take it all back a simple restart and the xmltv thing came on line ill now see if i can get the channels to populate

Thanks again

Me again

well got all the channel thing configured and the same problem

IL leave you to ponder as well as me :slight_smile:
any thought please let me know

Just a thought do i need any other dependency’s to accompany the XMLTV binding

Yes i know Me again:slightly :slight_smile:

Check the logs again and found the same issue Not enough programs in XML file, think to refresh it

After doing the check i found where it refreshed the xml file see below

Sorry about this

Geoff

2019-03-16 18:44:29.287 [INFO ] [lipse.smarthome.model.script.Results] - Getting all Programs
2019-03-16 18:44:29 URL:http://au.freepg.tv/xmltv/oztivo/WA.Perth.gz?UID=E2A00EC7&K=7DFFAC2759AE41FAA16EF3DD205B5A65 [492275/492275] -> “WA.Perth.gz@UID=E2A00EC7&K=7DFFAC2759AE41FAA16EF3DD205B5A65” [1]

7-Zip [64] 16.02 : Copyright © 1999-2016 Igor Pavlov : 2016-05-21

Scanning the drive for archives:
1 file, 492275 bytes (481 KiB)

Extracting archive: WA.Perth.gz@UID=E2A00EC7&K=7DFFAC2759AE41FAA16EF3DD205B5A65

Path = WA.Perth.gz@UID=E2A00EC7&K=7DFFAC2759AE41FAA16EF3DD205B5A65
Type = gzip
Headers Size = 10

Everything is Ok

Size: 3054975
Compressed: 492275
WA.Perth
1 file(s) copied.

2019-03-16 18:44:32.221 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-03-16 18:44:32.237 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-misc-restdocs’
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it
2019-03-16 18:44:56.530 [WARN ] [.xmltv.internal.handler.XmlTVHandler] - Not enough programs in XML file, think to refresh it

Hi again
Just wondering if you have had a chance to look at this

Thanks

I think I have the same problem. The channels are loaded from the xml so I assume that the xml is correct. I have added a few channels, all came up ONLINE.
However I have added it to my sitemap but only current Title and start/end dates showed up and never got updated automatically.
What can be wrong?

@glhopital maybe can you help me out?

Thanks!

@glhopital

Now after refining the cron which updates the xml, etc… after a restart all infos are loaded correctly. However it is still not updating (shows the same info when first loaded).

On my side, it seems to be working fine. Program changes at the right time. Have you tried refreshing your browser ?

Yes. I cant even see the status updates/changes in the log as well. Secondly my xml file is coded in ISO-8859 I think but in openHAB it shows it truncated, not very well…

What openHAB version do you use?

Current snapshot version

I’m on 2.4 stable. I will test on my test server on the snapshot version…

Ok, I have tried it on my test server with the latest Snapshot installed. It is the same or worse. It loads the xml file but not really changing state as time passes by, encoding is wrong, time is out of sync (tried shifting every Thing in its config, but that doesn’t affect anything).
Where is the newest version of the binding? In your first post the 2.4 Snapshot version?