Add EPG for AnySee N7 Adapter
#31
Hi,

I just made a small change, can you test it?

Thanks,

Joerg
VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
Reply
#32
hi again,

same issue for me. All Channels show the very same EPG information.

Not sure if i could have done anything wrong with it. Just to make sure i deleted the old addon and istalled the new one fresh from a zip file. then cleared the EPG cache.

May i ask what the trigger is to update the EPG from the N7? is that timer or event based?

If it would help, i could probably try to provide you access to my n7. bandwidth would not be sufficient to stream anything, but maybe to troubleshoot this further.


cheers,
hannes
Reply
#33
The addon should trigger an EPG update after being tuned 10 seconds to a channel. If you say that you got the same EPG events for all channels then this confuses me - usually it should use the channel id it parses out from the EPG data.

Code:
XBMC->Log(LOG_DEBUG, "%s - Parsing EPG for channel:'%d'", __FUNCTION__, iCurrentChannelId);

Can you check your debug log for these lines? Maybe it would also be nice if you could upload it.

I have also an n7 adapter available, but it is not plugged in right now Sad
VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
Reply
#34
here you go


https://www.dropbox.com/s/dxwfj37xw57w40j/xbmc.log.zip
https://www.dropbox.com/s/vls6x7wjl7ftr2y/xbmc2.log.zip

with xbmc2.log beeing more interesting i guess..

some observations from my side.. (educated guesses, don't need to be true though ;-) )

the n7 is usually already tuned into a channel before xbmc comes up. The EPG import starts without having a channel tuned into. The EPG update seems to run every 10 seconds.. that's probably quiet a load for smaller systems like a raspberry pi or so...

Also there seems to be something inconsistent in regards of the channel-id's within the xml files that are pulled from the n7:

http://192.168.1.9/n7chepg.xml below:

<rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:boxee="http://boxee.tv/spec/rss/" xmlns:dcterms="http://purl.org/dc/terms/" version="2.0">
<channel id="129">
<title>N7 Netwerk TV tuner</title>
<description>Lijstje met TV zender van de N7 netwerkstreamer</description>
<ttl>1</ttl>
<ch-number>1</ch-number>
<ch-name>Das Erste HD</ch-name>
<signal_strength>51</signal_strength>
<signal_quality>98</signal_quality>
<item>
<programme>
start="20130403131000 +0100" stop="20130403140000 +0100" channel id="129" event id= "1095"
</programme>
<title>Rote Rosen (1465)</title>
<description>Fernsehserie Deutschland 2013</description>
<length units="minutes">50</length>
</item>
<item>
<programme>
start="20130403140000 +0100" stop="20130403141000 +0100" channel id="129" event id= "1097"
</programme>
<title>Tagesschau</title>
<description>Die Nachrichten der ARD</description>
<length units="minutes">10</length>
</item>
<item>
<programme>

http://192.168.1.9/n7channel_nt.xml below:

<rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:boxee="http://boxee.tv/spec/rss/" xmlns:dcterms="http://purl.org/dc/terms/" version="2.0">
<channel>
<title>N7 Netwerk TV tuner</title>
<description>Lijstje met TV zender van de N7 netwerkstreamer</description>
<ttl>1</ttl>
<item>
<guid>http://192.168.1.9:8080/chlist/0001</guid>
<boxee:media-type type="movie" expression="full" name="feature"/>
<number>0001</number>
<title>Das Erste HD</title>
<media:content type="video/mpg2" url="http://192.168.1.9:8080/chlist/0001"/>
<media:thumbnail url="http://www.anyseedirect.eu/images/das_erste_hd.png"/>
<description>
<current>
<title>Rote Rosen (1465)</title>
<time_start>Apr.03 Wed 1:10pm</time_start>
<time_end>Apr.03 Wed 2:00pm</time_end>
<duration>00:50</duration>
</current>
<next>
<title>Tagesschau</title>
<time_start>Apr.03 Wed 2:00pm</time_start>
<time_end>Apr.03 Wed 2:10pm</time_end>
<duration>00:10</duration>
</next>
</description>
</item>
<item>
<guid>http://192.168.1.9:8080/chlist/0002</guid>
<boxee:media-type type="movie" expression="full" name="feature"/>
<number>0002</number>
<title>ZDF HD</title>
<media:content type="video/mpg2" url="http://192.168.1.9:8080/chlist/0002"/>
<media:thumbnail url="http://www.anyseedirect.eu/images/zdf_hd.png"/>
<description></description>
</item>


hope that helps

hannes
Reply
#35
That's actually a very good observation: I'm using '<channel id="129">' to determine the channel number the EPG should belong to - which is obviously incorrect and doesn't fit with the '<number>0001</number>' from the channel listing. I just pushed a change that should pull the channel number value from the '<ch-number>"-tag. I only checked whether it still compiles, not if it is working as intended - so if you don't mind, then please give it another try. I won't have access to the N7 adapter until the end of next week or so, so thanks for helping out and being patient with me Smile

Quote:The EPG import starts without having a channel tuned into

That is the standard-XBMC import that is being done on every startup. As no EPG data is available at this time, nothing is actually imported. Unfortunately, it is not possible to skip this step.

Quote:The EPG update seems to run every 10 seconds.. that's probably quiet a load for smaller systems like a raspberry pi or so...

Once I know that this method works in general I can make changes that it will only update the EPG once an hour or so if a user "stays" on one channel and doesn't zap around...but before putting in that kind of logic I want to be sure that it does work in general.
VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
Reply
#36
hi joerg,

thanks you for your time and effort to make this work Smile really appreciated... i'll try in the early evening and let you know just a short comment to your quote:


Quote:That is the standard-XBMC import that is being done on every startup. As no EPG data is available at this time, nothing is actually imported. Unfortunately, it is not possible to skip this step.

Just to make sure i understand this correctly and to make sure we are on the same page on this. The N7 tuner is already tuned into any channel (basically the last that was in use) and reports IDLE, it usually also has the EPG populated for this channel already. So i'm not sure how xbmc can determine to which channel this information should be mapped to ? (With the channel-id from the epg xml being worthless, the current tuned channel would need to be read out and map the epg to that one right?) Probably it would be easer to init the N7 to channel 1 during addon-launch...

i'll update you shortly once i've tested your new code

thanks

/hannes
Reply
#37
(2013-04-03, 16:51)regensensor Wrote: Just to make sure i understand this correctly and to make sure we are on the same page on this. The N7 tuner is already tuned into any channel (basically the last that was in use) and reports IDLE, it usually also has the EPG populated for this channel already. So i'm not sure how xbmc can determine to which channel this information should be mapped to ? (With the channel-id from the epg xml being worthless, the current tuned channel would need to be read out and map the epg to that one right?) Probably it would be easer to init the N7 to channel 1 during addon-launch...

When XBMC starts, it requests a channel list from the addon and then iterates over this list, requesting the EPG data for each channel. As the N7-adapter can only provide the EPG data of the channel it is currently tuned to, it would take a very long time to populate the EPG at this step. To make things start up faster the addon returns no EPG data at all to XBMC at this point - it doesn't even query the N7 adapter.

Obviously it could be done to get the EPG data for the last tuned channel during the addon startup, but I think this is some "nice-to-have" improvement for the future. If I see it correctly then the channel-number in the <ch-number>-tag from the epg xml can be used to determine the correct channel id - which is basically what I inteded to do with the last patch I pushed. We'll see how this will work out Smile
VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
Reply
#38
hi again.. thanks for the explaination.. :-)


i tried your new code, and it's better but we are not there yet..

Heres what i observed.. only single channels get updated which is cool and much snappier, though the EPG does not match to the channel..

in belows log i started xbmc and tuned to channel 2 (ZDF), but it seems channel 46 got updated in the EPG ( kabel eins )


17:44:56 T:139682518918912 DEBUG: PVRFile - Open - playback has started on filename pvr://channels/tv/Alle TV-Kanäle/1.pvr
17:44:56 T:139682518918912 DEBUG: CFileCache::Open - opening <chlist/0002> using cache
17:44:56 T:139682518918912 DEBUG: CurlFile::Open(0x7f0a480011b0) http://192.168.1.9:8080/chlist/0002
17:44:59 T:139683732117312 DEBUG: ------ Window Deinit (Pointer.xml) ------
17:45:01 T:139683732117312 INFO: LIRC Initialize: using: /dev/lircd
<removed decoder output>
17:45:02 T:139683621443328 DEBUG: CSoftAE::InternalOpenSink - Using speaker layout: 2.0
17:45:02 T:139683621443328 DEBUG: CSoftAE::InternalOpenSink - Internal Buffer Size: 4096
17:45:02 T:139683732117312 DEBUG: CLinuxRendererGL::UploadVAAPITexture - creating vaapi surface for texture 1
17:45:02 T:139683621443328 DEBUG: AERemap: Downmix normalization is disabled
17:45:02 T:139683621443328 DEBUG: Previous line repeats 3 times.
17:45:02 T:139683621443328 DEBUG: CSoftAEStream::CSoftAEStream - Converting from AE_FMT_S16NE to AE_FMT_FLOAT
17:45:02 T:139682100786944 DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback
17:45:02 T:139682518918912 DEBUG: CDVDPlayer::SetCaching - caching state 0
17:45:02 T:139682518918912 DEBUG: CDVDPlayer::HandleMessages - player started 2
17:45:02 T:139682518918912 DEBUG: CDVDPlayer::HandleMessages - player started 1
17:45:02 T:139682100786944 ERROR: ffmpeg[45FFB700]: [ac3] frame sync error
17:45:02 T:139682100786944 ERROR: CDVDPlayerAudio:Big GrinecodeFrame - Decode Error. Skipping audio packet
17:45:02 T:139682100786944 DEBUG: CDVDPlayerAudio:Tonguerocess - Decode Error
17:45:02 T:139682100786944 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:1216420.262336, should be:401636.414115, error:-814783.848221
17:45:02 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:02 T:139683621443328 DEBUG: CSoftAE::Run - Sink restart flagged
17:45:02 T:139683621443328 INFO: CSoftAE::InternalOpenSink - keeping old sink with : AE_FMT_FLOAT, FL,FR, 48000hz
17:45:02 T:139683621443328 DEBUG: CSoftAE::InternalOpenSink - Using speaker layout: 2.0
17:45:02 T:139683621443328 DEBUG: CSoftAE::InternalOpenSink - Internal Buffer Size: 4096
17:45:02 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:02 T:139683732117312 DEBUG: ------ Window Deinit (DialogBusy.xml) ------
17:45:02 T:139683732117312 DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
17:45:02 T:139683732117312 INFO: CheckIdle - Closing session to http://feeds.xbmc.org (easy=0x7f0a64000ca0, multi=0x7f0a64009990)
17:45:02 T:139682100786944 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:636065.044115, should be:1306474.952109, error:670409.907993
17:45:02 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:02 T:139683732117312 WARNING: Previous line repeats 1 times.
17:45:02 T:139683732117312 DEBUG: CLinuxRendererGL::UploadVAAPITexture - creating vaapi surface for texture 0
17:45:02 T:139682100786944 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:1601923.788109, should be:1369265.629114, error:-232658.158994
17:45:02 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:03 T:139682100786944 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:1675293.198114, should be:1521211.444445, error:-154081.753670
17:45:03 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:03 T:139682100786944 WARNING: Previous line repeats 1 times.
17:45:03 T:139682100786944 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:1836475.535445, should be:1702557.109781, error:-133918.425664
17:45:03 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:03 T:139682109179648 WARNING: Previous line repeats 2 times.
17:45:03 T:139682109179648 DEBUG: ffmpeg[467FC700]: [h264] Increasing reorder buffer to 2
17:45:03 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:06 T:139682109179648 WARNING: Previous line repeats 14 times.
17:45:06 T:139682109179648 DEBUG: CPullupCorrection: detected pattern of length 1: 20000.00, frameduration: 20000.000000
17:45:06 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData Fetching EPG Data from N7 backend!
17:45:06 T:139682537010944 DEBUG: CFileCache::Open - opening <n7chepg.xml> using cache
17:45:06 T:139682537010944 DEBUG: CurlFile::Open(0x7f0a58000b80) http://192.168.1.9:80/n7chepg.xml
17:45:06 T:139682537010944 INFO: easy_aquire - Created session to http://192.168.1.9
17:45:06 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:06 T:139682078844672 WARNING: Previous line repeats 1 times.
17:45:06 T:139682078844672 NOTICE: Thread CFileCache start, auto delete: false
17:45:06 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:06 T:139682078844672 INFO: CFileCache:Tonguerocess - Hit eof.
17:45:06 T:139682078844672 DEBUG: Thread CFileCache 139682078844672 terminating
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData Fetched XML, length:69085
17:45:06 T:139682100786944 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetUniqueChannelId Fetching UniqueChannelId for BackendChannelId '43'
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetUniqueChannelId Found UniqueChannelId '46' for BackendChannelId
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData - Parsing EPG for channel:'46'
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData: Programme string: 20130403164000+0100;20130403170000+0100;43;25d4
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: Start: GetInfoFromProgrammeString Y:2013, M:4, D:3, H:16, M:40, S:0 (20130403164000+0100) time_t(1365003600)
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: Stop: GetInfoFromProgrammeString Y:2013, M:4, D:3, H:17, M:0, S:0 (20130403170000+0100) time_t(1365004800)
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData - EPG Title:'Leute heute ', ChannelNumber:'46', Start:1365003600, End:1365004800, ID:0
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData: Programme string: 20130403170000+0100;20130403175000+0100;43;25d5
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: Start: GetInfoFromProgrammeString Y:2013, M:4, D:3, H:17, M:0, S:0 (20130403170000+0100) time_t(1365004800)
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: Stop: GetInfoFromProgrammeString Y:2013, M:4, D:3, H:17, M:50, S:0 (20130403175000+0100) time_t(1365007800)
17:45:06 T:139682537010944 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData - EPG Title:'SOKO Wismar ', ChannelNumber:'46', Start:1365004800, End:1365007800, ID:0
Reply
#39
just to add.. most of the channels are still broken:

18:10:44 T:140212017555200 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData Fetched XML, length:26751
18:10:44 T:140212017555200 DEBUG: AddOnLog: Njoy N7 PVR Client: GetUniqueChannelId Fetching UniqueChannelId for BackendChannelId '210'
18:10:44 T:140212017555200 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData - Parsing EPG for channel:'-1'
18:10:44 T:140212017555200 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData: Programme string: 20130403170500+0100;20130403180500+0100;210;5e9b
18:10:44 T:140212017555200 DEBUG: AddOnLog: Njoy N7 PVR Client: Start: GetInfoFromProgrammeString Y:2013, M:4, D:3, H:17, M:5, S:0 (20130403170500+0100) time_t(1365005100)
18:10:44 T:140212017555200 DEBUG: AddOnLog: Njoy N7 PVR Client: Stop: GetInfoFromProgrammeString Y:2013, M:4, D:3, H:18, M:5, S:0 (20130403180500+0100) time_t(1365008700)
18:10:44 T:140212017555200 DEBUG: AddOnLog: Njoy N7 PVR Client: GetEPGData - EPG Title:'Star Trek - Raumschiff Voyager

to the best of my knowledge the backend has no channel 210.. for channels that are not on the backend, the EPG is copied to all channels like on my initial post...

let me know if i can provide further debugs
/hannes
Reply
#40
sorry for spam, but it seems like your code is parsing the wrong field:
from the http://192.168.1.9/n7chepg.xml
<channel id="43">
<title>N7 Netwerk TV tuner</title>
<description>Lijstje met TV zender van de N7 netwerkstreamer</description>
<ttl>1</ttl>
<ch-number>2</ch-number>
<ch-name>ZDF HD</ch-name>
<signal_strength>47</signal_strength>
<signal_quality>98</signal_quality>

<channel id="210">
<title>N7 Netwerk TV tuner</title>
<description>Lijstje met TV zender van de N7 netwerkstreamer</description>
<ttl>1</ttl>
<ch-number>12</ch-number>
<ch-name>Tele 5</ch-name>
<signal_strength>47</signal_strength>
<signal_quality>97</signal_quality>

just to add to above snippets...
Reply
#41
Edit: I think I found the error - please check the latest patch in the git repository.
VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
Reply
#42
hi joerg,

i compiled and installed the addon and don't see any debug output in the xbmc.log anymore...


16:13:40 T:139996350506752 NOTICE: Thread CFileCache start, auto delete: false
16:13:40 T:139996405102336 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
16:13:47 T:139997626193728 WARNING: Previous line repeats 39 times.
16:13:47 T:139997626193728 ERROR: CGUIEPGGridContainer - UpdateItems - invalid start and end time set
16:13:47 T:139996405102336 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
16:13:52 T:139996350506752 WARNING: Previous line repeats 29 times.
16:13:52 T:139996350506752 NOTICE: Thread CFileCache start, auto delete: false
16:13:52 T:139996405102336 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
16:13:58 T:139997626193728 WARNING: Previous line repeats 38 times.
16:13:58 T:139997626193728 ERROR: CGUIEPGGridContainer - UpdateItems - invalid start and end time set
16:13:58 T:139996405102336 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
16:14:00 T:139997626193728 WARNING: Previous line repeats 8 times.
16:14:00 T:139997626193728 ERROR: CGUIEPGGridContainer - UpdateItems - invalid start and end time set
16:14:00 T:139996405102336 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
16:14:02 T:139997626193728 WARNING: Previous line repeats 8 times.
16:14:02 T:139997626193728 ERROR: CGUIEPGGridContainer - UpdateItems - invalid start and end time set
16:14:02 T:139996378416896 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
16:14:03 T:139996350506752 NOTICE: Thread CFileCache start, auto delete: false


this is the only EPG related stuff i can see..

i will recompile everything to make sure i made no mistake..

EPG itself has the same error as in the beginning.. i see it applied to all channels ..

/hannes
Reply
#43
i second my above post.. i recompiled the addon code from git and it is still true.. no debuging for me, EPG behave wise i think it didn't change at all.. but i cannot verify..

cheers,

/hannes
Reply
#44
I reverted some changes and testet it manually with a n7-channellist-xml and n7-epg-xml I had on a webserver.

Now when I'm changing the channel-number in the <ch-number>-tag it does update the EPG for the corresponding channel. Also I changed some strings in the EPG data to verify that it definately adds the correct EPG data to the channel (and not the same data to all channels).

So maybe you could give it another try? Please also try resetting your PVR database first. If it does not work, please upload the full debug.

Just FYI: I lowered the update frequency - now it will update the EPG every 30 seconds. I have the EPG xml sitting on a webserver at home, and I didn't want to spend all my mobile data volume so I temporarily changed it.
VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
Reply
#45
hi joerg,

i'll try to spend some time on this today, but using the new addon my n7 is constantly crashing and needs to be power cycled. (stops responding to ping, but works perfectly together with a raspberry pi and xbmc12.1 ). Ill setup a windows machine today/tomorrow and will use the 12.1 release to make sure it's not my linux compiled xbmc that has problems.

keep you posted..

hannes
Reply

Logout Mark Read Team Forum Stats Members Help
Add EPG for AnySee N7 Adapter0