edit4ever / script.module.zap2epg

zap2epg - EPG grabber for USA/Canada
GNU General Public License v3.0
41 stars 25 forks source link

zap2epg not creating xmltv.xml #30

Closed dschroed-7 closed 3 years ago

dschroed-7 commented 3 years ago

Just installed Kodi 19 on my Linux Mint 20.1 system. I am trying to use zap2epg with Tvheadend and HDHomeRun Extend. I have the channels showing up in Tvheadend and Kodi, but have been unable to get any epg data. I seem to be stuck in a rut!

I really can't even reproduce all the steps I've taken but sometimes I'm able to get "tv_grab_zap2epg is a simple grabber for USA-Canada" as an EPG Grabber Module in Tvheadend, and sometimes it disappears. I think, then I have to uninstall zap2epg from Kodi and reinstall. But, then I have to soft link some of the files to the hts directory (created by Kodi when adding Tvheadend) and change permissions on some of the files. There was a time I was able to create xtmltv.xml file, but that disappeared and I can't seem to recreate it. Anyway, when I lose the "tv_grab_zap2epg is a simple grabber for USA-Canada" option again I have to start over with uninstalling/reinstalling zap2epg.

I'd be happy to provide any information I could. I just don't know where to start. I would really appreciate any help you could provide, as I've been working on this project for several days. BTW, in case you couldn't tell, I'm a Linux newbie (which means that I have to research how to do all terminal entries), and never used Tvheadend or zap2epg before.

edit4ever commented 3 years ago

I assume you are installing the 2.0.1 release since you are running Kodi 19. Make sure the tv_grab_zap2epg file has executable permission for all users. You'll find this file in the .kodi/addons/script.module.zap2epg/bin folder.

Also - if you haven't yet - you need to launch the zap2epg program and run the wizard to setup your lineup.

If you've done both of those things - let me know and I can walk you through looking at some log files for errors.

dschroed-7 commented 3 years ago

Thank you so much for your time! Yes, I am installing 2.0.1. I have now made the tv_grab_zap2epg executable. (In someone else's installation guide, I was told to move the file to usr/bin, which might have accounted for some of the problems I was having.) Unfortunately, that didn't resolve my issues.

I, again, uninstalled/reinstalled zap2epg, made the tv_grab_zap2epg executable, then set up my location and OTA information, as well as the Tvheadend username and password in zap2epg. When I select the channels I want to see, it gives me an error message. When I select the Run zap2epg and Update Guide Data, it gives me an error message. The Kodi log is: https://pastebin.com/vFbANYTD

Then, when I go into Tvheadend through my browser, I still don't have the option of "tv_grab_zap2epg is a simple grabber for USA-Canada" as an EPG Grabber Module. The zap2epg.log is: https://pastebin.com/XjDPk7U7

Please let me know if I can provide anything else.

edit4ever commented 3 years ago

If you’re trying to run zap2epg from inside kodi as an addon – not running tvheadend/zap2epg from just Linux – then you don’t need to move it.

Did you run the setup wizard for the zap2epg addon?

From: dschroed-7 Sent: Saturday, March 27, 2021 10:56 AM To: edit4ever/script.module.zap2epg Cc: edit4ever; Comment Subject: Re: [edit4ever/script.module.zap2epg] zap2epg not creating xmltv.xml(#30)

Yes, I am installing 2.0.1. I have now made the tv_grab_zap2epg executable. (In someone else's installation guide, I was told to move the file to usr/bin, which might have accounted for some of the problems I was having.) Unfortunately, that didn't resolve my issues. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

dschroed-7 commented 3 years ago

Thanks. That explains the variance in install methods. Yes, I am trying to run inside Kodi. Sorry, I did not see a setup wizard for the zap2epg addon, unless you are referring to the 4 options when selecting open (Run zap2epg..., Change Current Location, Configure Channel List, Configure Settings and Options), to which I could only do Change Current Location and Configure Settings and Options. The other two choices only gave errors.

edit4ever commented 3 years ago

Ok - when you change location, are you able to enter your zip code and set the correct lineup?

If so - you should then be able to configure the channel list.

Jay Maloney

On Mar 27, 2021, at 12:06 PM, dschroed-7 @.***> wrote:

Thanks. That explains the variance in install methods. Yes, I am trying to run inside Kodi. Sorry, I did not see a setup wizard for the zap2epg addon, unless you are referring to the 4 options when selecting open (Run zap2epg..., Change Current Location, Configure Channel List, Configure Settings and Options), to which I could only do Change Current Location and Configure Settings and Options. The other two choices only gave errors.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

dschroed-7 commented 3 years ago

Yes. I select my zip code and choose Local Over the Air Broadcast. But, although it has my selected channels in Configure Channel List (presumably from Tvheadend), when I select OK, it gives me the zap2epg error.

edit4ever commented 3 years ago

OK - then I need to see the zap2epg log and possibly the kodi log. The zap2epg log is found under the zap2epg addon folder in your kodi userdata folder.

dschroed-7 commented 3 years ago

The Kodi log is: https://pastebin.com/vFbANYTD The zap2epg.log is: https://pastebin.com/XjDPk7U7

I really appreciate your help!

edit4ever commented 3 years ago

ok - looks like an issue with tvheadend username/password function. I haven't tested this for the new 2.x version as I don't run username/password on the tvheadend server. Can you try turning off the username/password setup on tvheadend and see if it will connect? You'll also need to clear the tvheadend username/password from the zap2epg setup.

If that works - which I think it will...then I'll know what needs to be investigated. Although I won't be able to work on fixing that issue until next week.

edit4ever commented 3 years ago

one other question...are you running the tvheadend server on the same linux system or on a different system?

dschroed-7 commented 3 years ago

Same system.

I disabled my users in my tvheadend browser, but I don't seem to be able to find a way to remove username/password. Therefore, removing it from tvheadend in Kodi doesn't allow access. Am I misunderstanding?

edit4ever commented 3 years ago

Ok - does the tvheadend HTSP client work and see the tvh server without errors?

dschroed-7 commented 3 years ago

No. Not without username/password. It says, Access Denied, then crashes.

edit4ever commented 3 years ago

Did change the change settings on the htsp client addon to remove the username/password?

dschroed-7 commented 3 years ago

Yes. That's when the Kodi addon stopped working.

edit4ever commented 3 years ago

strange...ok go ahead and put your username and pasword back everywhere.

Were you originally able to add the username/password in the zap2epg settings?

edit4ever commented 3 years ago

we can manually setup the settings.xml file in user data folder as well.

dschroed-7 commented 3 years ago

Yes. I was able to add username/password in zap2epg settings.

edit4ever commented 3 years ago

This addon was originally designed to run in a libreELEC install so there may be some issues I haven’t investigated when installing inside a kodi install that is running under Linux.

I can likely dig in a little next week o run some tests.

edit4ever commented 3 years ago

There is likely a problem with the username/password function that didn’t get updated correctly for Kodi 19 (python 3)

dschroed-7 commented 3 years ago

Thank you so much! Your assistance is greatly appreciated!!!

edit4ever commented 3 years ago

If you want to post your settings.xml file from the zap2epg userdata folder - I can check to see if anything should be changed in there as the epggrabber can run without the zap2epg addon working if’s when manually set the settings.

You can also copy the settings.xml file from the github code and place it in the zap2epg addon folder (under .kodi) and try to run the grabber.

dschroed-7 commented 3 years ago

I tried the github settings.xml, only changing the zip, username, password, and tvhurl. It didn't produce the "tv_grab_zap2epg is a simple grabber for USA-Canada" as an EPG Grabber Module, either. The text from my settings.xml file (after removing my username/password) is: https://pastebin.com/etxirz2N

Again, I really appreciate your help!

edit4ever commented 3 years ago

If you are running tvheadend server in linux - you will need to copy the zap2epg grabber file to the usr/bin folder.

It also has to be executable by the hts user that tvheadend server creates.

It's kind of a pain - which is why I built it for an OS like LibreELEC, which makes the tvheadend and kodi setup super easy.

On Sat, Mar 27, 2021, 5:19 PM dschroed-7 @.***> wrote:

I tried the github settings.xml, only changing the zip, username, password, and tvhurl. It didn't produce the "tv_grab_zap2epg is a simple grabber for USA-Canada" as an EPG Grabber Module, either. The text from my settings.xml file (after removing my username/password) is: https://pastebin.com/etxirz2N

Again, I really appreciate your help!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/edit4ever/script.module.zap2epg/issues/30#issuecomment-808822009, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKO7RB3HE6ZZBKVXT22VXLTFZYZFANCNFSM4Z4SVXMA .

dschroed-7 commented 3 years ago

Thank you for your continued support!

Copying the zap2epg grabber file to the usr/bin folder and making it executable finally created "tv_grab_zap2epg is a simple grabber for USA-Canada" as an EPG Grabber Module. However, I still have no EPG data in tvheadend browser, or Kodi, and still get error messages when trying to run zap2epg in Kodi.

Also, I didn't have an hts user created by tvheadend, only an hts directory (but, since that directory is under Home, it would be a user). Let me research that in the morning, to see if I can figure out how to permit that user to also execute the zap2epg file.

I've still got a lot to learn about Linux, but it would be extremely difficult to start over with LibreELEC.

Since I'm guessing you will ask, the zap2epg.log is: https://pastebin.com/856szAvT and the kodi log is: https://pastebin.com/pVXsAKQN

edit4ever commented 3 years ago

OK - that last log clears it up - it's a python change that happened with the switch over in Kodi 19. I didn't see it as I don't use passwords.

I should be able to get you a new version to test - maybe later today. No reason to switch to LibreELEC at this point or change anything with HTS user.

edit4ever commented 3 years ago

If you wanted to try changing the code yourself for a quick test - open up the zap2epg.py file and change line 114 from this: request.add_header('Authorization', b'Basic ' + base64.b64encode(usern + b':' + passw)) to these two lines: tvhheader = usern + ':' + passw request.add_header('Authorization', b'Basic ' + base64.b64encode(tvhheader.encode()))

The try to run the grabber and let's look at the log. :-)

dschroed-7 commented 3 years ago

Still no joy.
Log attached... zap2epg.log

edit4ever commented 3 years ago

That log says that the zap2epg.py file was not edited with the change above.

edit4ever commented 3 years ago

Can you try installing this version and see if it works: https://www.dropbox.com/s/ht1t1cgvf9we1z1/script.module.zap2epg-2.0.1-TEST.zip?dl=0

dschroed-7 commented 3 years ago

I uninstalled the old zap2epg from Kodi and reinstalled this new zip file. I copied the tv_grab_zap2epg to usr/bin and made it executable. Kodi threw an error message when I tried to open zap2epg, after adding user/password. I went into tvheadend, the "tv_grab_zap2epg is a simple grabber for USA-Canada" as an EPG Grabber Module is there, but still no epg.

Did I miss a step somewhere? kodi.log The zap2epg.log is missing, but the tvheadend log info is: 2021-03-28 13:05:12.174 xmltv: /bin/tv_grab_zap2epg: grab /bin/tv_grab_zap2epg 2021-03-28 13:05:12.177 spawn: Executing "/bin/tv_grab_zap2epg" 2021-03-28 13:05:12.188 spawn: /bin/tv_grab_zap2epg: line 28: python: command not found 2021-03-28 13:05:12.190 spawn: cat: /home/hts/.kodi/userdata/addon_data/script.module.zap2epg/xmltv.xml: No such file or directory 2021-03-28 13:05:12.190 xmltv: /bin/tv_grab_zap2epg: no output detected 2021-03-28 13:05:12.190 xmltv: /bin/tv_grab_zap2epg: grab returned no data

edit4ever commented 3 years ago

Sorry - that was my bad - had an extra parenthesis in there. Just install this one - no need to uninstall the previous version.

https://www.dropbox.com/s/p4o98g1yn1q0kt0/script.module.zap2epg-2.0.1-TEST2.zip?dl=0

dschroed-7 commented 3 years ago

Thank you so much for sticking with me! Still errors in Kodi zap2epg and tvheadend in browser. zap2epg.log kodi.log

edit4ever commented 3 years ago

OK - one more to try...if this one doesn't work - let me know and I'll build a Linux test environment tomorrow to work out the issue.

https://www.dropbox.com/s/q6tvlsz6zinylc6/script.module.zap2epg-2.0.1-TEST3.zip?dl=0

Thanks!

dschroed-7 commented 3 years ago

Sorry to tell you but, same issues.. kodi.log zap2epg.log

Again, I really appreciate your help!

edit4ever commented 3 years ago

Thanks - at least that time the error moved to a new line! So one more for the night - then if this fails - I'll setup my system for testing on Linux:

https://www.dropbox.com/s/tjrauxtctsh1n7w/script.module.zap2epg-2.0.1-TEST4.zip?dl=0

Thanks!

dschroed-7 commented 3 years ago

Sorry. I feel it is almost there... kodi.log zap2epg.log

edit4ever commented 3 years ago

OK - this version runs on my Ubuntu install - so give it a try!

https://www.dropbox.com/s/4sxk10v25tic1zi/script.module.zap2epg-2.0.1-TEST5.zip?dl=0

dschroed-7 commented 3 years ago

So, zap2epg appeared to run in Kodi. Got an error in Kodi when I tried to configure channels. But, The EPG is not populating in either the Kodi TV Guide page or the Tvheadend browser. Am I missing a step in Tvheadend that would populate both?

The information is now populated in the xmltv.xml file, just not getting to where it can be seen by either application.. zap2epg.log

kodi.old.log

edit4ever commented 3 years ago

go into the tvheadend web UI and under CONFIGURATION > CHANNEL/EPG > CHANNELS - check if the system automatically matched the EPG Source or not...if not - go ahead and set it for each channel.

edit4ever commented 3 years ago

If you have the system set for Tvheadend Match channels - you don't need to make a channel list - just enable/disable channels in the tvheadend web UI.

However - you did identify another error that I need to sort out! Thanks!

dschroed-7 commented 3 years ago

Yes, channel name and EPG Source are identical (for my selected channels.

edit4ever commented 3 years ago

You mean it says that the zap2epg is the source for the EPG Source?

edit4ever commented 3 years ago

If so - then a simple reboot of Kodi should fill the guide data in.

edit4ever commented 3 years ago

Can you provide a screengrab of your Tvheadend UI on the Channels page?

dschroed-7 commented 3 years ago

Screenshot from 2021-03-29 10-43-30

edit4ever commented 3 years ago

OK - on the EPG Grabber Modules page - go ahead and press the Re-run Internal Grabbers button

It looks like your channels were created - we need to see if the system will now download the data.

BTW - for this testing - it's best to only have zap2epg set for 1 day of data - otherwise it can take up to 5 minutes or more to download all the new data - especially if you have xtra details enabled.

dschroed-7 commented 3 years ago

YEAH!!!!!!! It's working!!! The EPG in Tvheadend is only pulling 1 day (I live in San Diego, so I get all the Los Angeles stations as well. The TV Guide information in Kodi also shows up, but only until 4PM today. Do you have any idea how to fix that?

Thank you soooo much for all of your hard work!

edit4ever commented 3 years ago

In the zap2epg settings - change the number of days - you can set it up to 14. Change it - then you can rerun the internal grabber. When the tvheadend log shows that it has finished - just restart kodi to get the guide to refresh. Kodi doesn't recognize that tvheadend has new data and only updates the guide every couple of hours - so you have to do the restart to see the new downloaded guide data.

Also, if you turn on xtra details in the zap2epg settings - it will download the season and episode numbers as well as images for the episodes. Just note that the first time you do this - it will take awhile to download as it first downloads the entire 14 days of listings - then has to go and make a separate download for every episode in the guide. After that first really big download - it will only have to update and new day every day - so it won't be much to download.

edit4ever commented 3 years ago

One other thing - if you haven't looked in the Kodi PVR & Live TV settings - there are a few options you may want to change.

Hope that all works for you! Thanks for testing along the way.