Posts by jahutchi


    jahutchi from thread-4067-post-38733.html#pid38733

    Maybe I'll look to see if I can detect Live TV and switch based on that. I think I looked at this before and concluded I couldn't.

    That would be great if it were possible - I'm using TVHeadend here.

    In the meantime I've been looking at the API but can't find a way to achieve what I'm after.

    I only want to reconnect the VPN if I'm sure that one of the filtered addons is not running e.g. BBCiPlayer... but I can't see any way to reliably detect that. Also, obviously if the wife hits stop then she is still within BBCiPlayer and may then try playing another program... so forcing the VPN to reconnect when the stop button is pressed is probably not the way to go.

    Looks like we're in a bit of a catch 22 situation.... We do use Live TV all the time so if there's any way to detect that LiveTV is playing and re-establish the VPN connection at that point then I'm all ears.


    It won't reconnect until it sees another add-on (ie you have to do more than just exit to the main Kodi screen).

    That's certainly the behaviour I see.... I guess the question then, is whether it's possible to improve it to detect when the user has exited the excluded add-on (I'm guessing not, or it probably would have been done by now), rather than wait for them to enter another add-on before re-establishing the VPN connection?

    I have various background shell scripts that rely on the VPN being active, and those scripts exit out if the VPN is not up...
    When my Wife watches TV during the day she comes out of BBC iPlayer and then typically goes into Live TV (which isn't an Add-on, so the VPN is not auto-reconnected). If I then come to the machine and go into the OpenVPN add-on, I don't have to click anything and the VPN re-connects itself.

    I've been looking at the API and managed to implement a basic cron job to re-establish a connection at 1am each morning if it's not already connected by basically running:
    /usr/bin/kodi-send -a "RunScript(special://home/addons/service.vpn.manager/api.py, Connect 1)"

    It seemed 1am is probably safe, as we won't be watching BBCiPlayer at that time.

    I could run the API sooner, or even trigger it by my scripts (which run throughout the day). But I'm not sure it's possible to guarantee that an excluded addon (BBC iPlayer) is not running.

    Maybe I could look at re-programming my "Stop" button to run a 2xStep shell script - e.g.
    kodi-send -a "Stop"
    kodi-send -a "RunScript(special://home/addons/service.vpn.manager/api.py, Connect 1)"

    Rather than just mapping it to a Stop action.... maybe that would achieve what I'm after???

    Typically, there are credits after a program finishes on iPlayer, so my wife would hit Stop to come out.

    One question / something I can't quite get working with the Addon...

    In my Addon Filter settings I've put "BBC iPlayer WWW" in the Excluded List (add-ons for which a VPN will not be used).
    Once I've finished using the Addon I would like the VPN Manager to reconnect to the VPN it was previously connected to (i.e. Revert to previous state) but it's just not happening :(

    Maybe I need to adjust a couple of the settings?

    I've ticked the "Revert to previous state for Non-Filtered addons" option, and have my connection validation frequency set quite low (30 seconds)
    I have also unticked the "Reconnect if connection lost during playback" option - as that gave me problems when watching live tv as it would stop whatever was being played should it need to reconnect.

    It seems to work better if I add BBC iPlayer to the inclusion list. I can use a UK VPN from my provider (PIA) as Connection#2 and assign the addon to that. However, BBC iPlayer refuses to play when connected to the London VPN (presumably BBCiPlayer/Akkemai have the VPN IP's blacklisted so I'm not classed as being on a true UK IP Address).

    Obviously I can workaround this by going into the OpenVPN addon and connecting manually after coming out of BBC iPlayer...but that's not very Wife-friendly ;) so would prefer for the VPN to just reconnect when I leave the BBCiPlayer addon.

    Another discovery is that when I go back into the OpenVPN addon after coming out of BBC iPlayer then it seems to connect automatically before I click anything - so at that point it seems to know that it needs to reconnect...So not too sure why this is not happening automatically?

    I'm on v2.6.0 of the Addon and LibreELEC 8.0.0

    Any thoughts?


    I have here Index of /Test/dvbskys960/
    an Generic image with 4.9-RC1, would be nice if someone could confirm that the error is there or not

    I have just been testing this build and the error is there too...
    I received Continuity Counter errors in my tvh logfile and a blocky on-screen picture within a couple of minutes of playing live tv:

    Prior to that I've been running smp's Generic build with the 4.8 kernel for a whole week, and didn't get a single Continuity Counter error.

    Let me know if there are any more 4.9-based builds you'd like me to try, if that would help pin-point where the problem was introduced.

    what tuner do you use ? (pls test also Generic x86_64, ver. 8.0.0, kernel 4.8.13, with media_build - tx!! smp)

    We are currently suspecting that some usb change made it worse then in 4.8, but still didn't found a solution.

    I'm using the DVBSky S960 USB DVB-S2 adapter.

    BTW I had also posted here: thread-4878.html and tried the various test builds with the 4.9 kernel which you sent me last week...

    I shall test with Generic x86_64, ver. 8.0.0, kernel 4.8.13, with media_build later today or tomorrow and report back.


    Dropbox - Link not found - Generic x86_64, ver. 8.0.0, kernel 4.8.13, without media_build

    Dropbox - Link not found - Generic x86_64, ver. 8.0.0, kernel 4.8.13, with media_build

    Thanks ever so much smp... I've installed your LibreELEC-Generic.x86_64-8.0.0.kernel.4.8.13.without.mb.tar on my HTPC and it's been running a good couple of hours without any of those dreaded Continuity Counter errors (the 4.9 kernel-based builds would generate the errors every few minutes). So finally I can move away from the Alpha 9 release :)

    Hopefully someone will figure out where the problems lie in the 4.9 kernel and fix it upstream for future releases, but in the meantime I can finally sit back and enjoy the LibreELEC 8.0.0 release.


    I'm also experiencing continuity counter errors with my technotrend s2-4600 usb tv card on my pi3 on latest Milhouse build. Livetv is ok, only recording has issues, even when kodi is stopped (systemctl stop kodi).

    tvheadend service log KahD
    dmesg hgag

    It might be worth checking this thread: DVB issue since LE switched to kernel 4.9.x

    The problem seems to lie somewhere in the 4.9 kernel. LibreELEC switched from a 4.8 to a 4.9 kernel between the alpha 9 -> alpha 10 builds, and this seems to be where the problem was introduced. On the thread above, smp has posted links to some 8.0.0 builds he's put together with a 4.8, rather than 4.9 kernel.

    This morning I have installed his "LibreELEC-Generic.x86_64-8.0.0.kernel.4.8.13.without.mb.tar" build on my HTPC - which has been running a couple of hours now without any Continuity errors :) ... on the 4.9 kernel-based builds I would receive Counter Continuity errors normally within a few minutes.

    On the thread above there is a link to his builds for RPi2/3 on post #14.


    i try with an 4.8 image, btw you have plugged power connector to your S960 boxes ?

    Yes, The power connector is plugged into my S960 boxes. As I've been switching between versions I haven't touched the cables whatsoever - I just download the files via ssh using wget and drop them into the /storage/.update folder....then reboot

    This morning I have also tested the other two builds:

    LibreELEC-Generic.x86_64-8.0.0-revert-14c4bf3.img.gz
    LibreELEC-Generic.x86_64-8.0.0-scatter-gather.img.gz

    Unfortunately, both still give the Continuity Counter errors.

    As suggested by trsqr I also tried plugging in just one tuner, but alas still get the Continuity errors :(

    My machine doesn't have USB 3.0 ports - only USB 2.0.

    As mentioned I'm running an Aspire Revo R3700 which is admittedly a few years old, but it has 4x 1.8GHz CPU Cores, 4GB RAM & 1TB SATAIII HDD so should be plenty powerful enough for what I'm trying to do. If I go back to the Alpha 9 build (with both tuners plugged into the exact same usb ports) I can watch and record at the same time without any problems. I can also record two programs and watch a recording at the same time still without any problems. The same was true when it was previously running Ubunutu 14.04 with the latest TVH 4.1.x nightly (at the time), and was on Kodi 16.1. I was planning to upgrade to Ubuntu 16 / Kodi 17, but decided instead to have a change from Ubuntu as I wanted something more lightweight/easier to manage/upgrade... hence the move to LibreELEC.

    Is it worth putting together a 8.0.0 build with the 4.8 kernel from Alpha 9 to test/confirm that we are definitely dealing with a kernel issue....? Or do you have more builds you'd like me to test.

    BTW: Thanks for all the time your spending in trying to figure this one out.

    yes, that is all

    could you also test
    - LibreELEC-Generic.x86_64-7.95.3-mb_without (same as above)
    - LibreELEC-Generic.x86_64-7.95.3-latest-10.2
    - LibreELEC-Generic.x86_64-7.95.3-allyes
    at least we could track down between which changes the problem appear

    So far I have tested:
    - LibreELEC-Generic.x86_64-7.95.3-mb_without
    - LibreELEC-Generic.x86_64-7.95.3-latest-10.2

    Both those builds still give the Counter Continuity errors.

    Later today I'll try out LibreELEC-Generic.x86_64-7.95.3-allyes and report back on whether there's any improvement...
    ...Probably when the wife is out, as I'm currently getting it in the ear that "those !!****!! blocks are back" - lol ;)

    I am experiencing this exact same issue on my x86_64 Generic HTPC (Acer Revo 3700) which has 4x 1.8GHz CPU Cores, 4GB RAM & 1TB SATAIII HDD.
    I'm running the latest HTS Tvheadend 4.1.2415 ~ LibreELEC Tvh-addon v8.1.109, with 2x DVBSky S960 USB DVB-S2 adapters.

    If I upgrade to one of the latest beta releases 7.95.1, 7.95.2, 7.95.3 then the picture breaks up (i.e. goes blocky for a second or so) every couple of minutes when watching either Live TV or recording. The issue is worse for HD channels but does also occur on SD Channels.

    When the picture goes blocky I receive Continuity Counter errors in the logfile for example:

    Code
    2017-02-06 21:01:51.469 [WARNING] TS: Freesat/11097V/ITV HD: H264 @ #2310 Continuity counter error (total 16)
    2017-02-06 21:01:51.469 [WARNING] TS: Freesat/11097V/ITV HD: MPEG2AUDIO @ #2313 Continuity counter error (total 2)
    2017-02-06 21:06:03.462 [WARNING] TS: Freesat/11097V/ITV HD: H264 @ #2310 Continuity counter error (total 17)
    2017-02-06 21:06:19.164 [WARNING] TS: Freesat/11097V/ITV HD: H264 @ #2310 Continuity counter error (total 18)
    2017-02-06 21:06:19.164 [WARNING] TS: Freesat/11097V/ITV HD: AC3 @ #2311 Continuity counter error (total 5)
    2017-02-06 21:06:19.164 [WARNING] TS: Freesat/11097V/ITV HD: MPEG2AUDIO @ #2313 Continuity counter error (total 3)
    2017-02-06 21:06:50.707 [WARNING] TS: Freesat/11097V/ITV HD: H264 @ #2310 Continuity counter error (total 21)
    2017-02-06 21:07:40.201 [WARNING] TS: Freesat/11097V/ITV HD: H264 @ #2310 Continuity counter error (total 23)
    2017-02-06 21:09:05.369 [WARNING] TS: Freesat/11097V/ITV HD: H264 @ #2310 Continuity counter error (total 24)
    2017-02-06 21:09:05.369 [WARNING] TS: Freesat/11097V/ITV HD: MPEG2AUDIO @ #2313 Continuity counter error (total 4)

    If I downgrade to LE 7.90.009 alpha as stipulated in this post:thread-3665.html then I do not have any problems whatsoever.

    I wonder whether it relates to the move from a 4.8.12 kernel to 4.9.x since the problem ONLY occurs when I upgrade to anything later than 7.90.009 :(

    I was previously running Ubuntu 14.04 on this very same machine (i.e. same hardware & DVB Cards) and never had any disturbances in the picture quality, or Continuity Counter errors in the logfile... I know that because I took a full backup before moving away from Ubuntu. So was able to go back and examine my previous /var/log/syslog.x files - not a single Continuity Counter Error whatsoever!

    I hope this will be fixed before the production release as I'd rather not stay on the alpha release forever.

    Also.....I wonder whether it's possible to swap in the 4.8.12 kernel and run this against the latest 7.95.3 beta release to identify whether the kernel is indeed the point at issue. Could that be done by simply swapping the KERNEL & KERNEL.md5 files in from the alpha 9 release into the /flash folder (after mounting the vfat partition r/w). I'd be happy to give that a go if someone could confirm it won't break my system. If not, maybe there are other things I could try to help debug the issue?

    Note: I've also posted the same findings in response to the thead here: thread-3665.html before then noticing this thread which seems to have picked up more of a head of steam.