Posts by pila

    An RPi2 with LE7 and TVH is always on. It records DVB-T to an external disk. Prior to recording, it mounts disk, and affter a recording, disk is unmounted since RPi will surelly hang if external disk goes to sleep while mounted. That seems to work perfectly well for years.

    Form time to time, once in 3-4 months, RPi will hang up and I can not find why. I can ping it. I can not SSH to it but it will actively refuse telent to it. My router will show RPi as active and alive. It is a remote machine co I can not test if Kodi is working over HDMI. I do not know if it works partialy or not at all, but seems to me it is not absolutely hang up / dead. The rest of that network works perfeclty.

    The script running at that RPi every 12 minutes (which controls it) will apparantly stop working. I can see that this script does not connect (ssh) to my router any more nor make any log entries to the local memory card. I can not connect to TVH and TVH will not make any recordings from that point on. My only way out is to power cycle the RPi - after that all is well again.

    I have just made the RPi cron entry to test if it can sucesfully ssh to the router and if not, reboot the RPi. But, will that cron run when the problem arises?

    So, is there something internal which I can use to test and reboot RPi if it looses the connection (can not ssh) to a router?

    Is there a better solution?

    pila  ttech

    what version of the webgrabplus addon are you using?

    On Win7 I use WG++ v2.1. In LE7 I used Addon v1.57 I think. Tried your latest verson but would not run on my LE7 as I wrote above. My RPI LE is 7 with TVH 4.0.9

    Currently I am only using Win version to configure WG++ and trim everything to my liking as this makes it simpler for me to test things.

    each time you try to change something, you must do the point 2. from my previous post.

    Your log says it is registering mux for OTA EPG. Not trying to use XMLTV EPG. That is the problem, I believe.

    It all seems as it should work. Since you are using v4.2 and I use v4.0, this may account for the difference in presentation and lack of the XMLTV in front of your EPG tags.

    1. There may be a possibility your choice of folder has something to do with the problem. This is the only significant difference. I used /storage as standard folder accesible to everyone. For others, I do not know that is neccessary the true.

    2. Just by creating this data, TVH will not load it on its own momentarily. Go to EPG and turn internal grabber off by changing it to Disabled and Save that. Then change grabber back to XMLTV and save again. That will mostly reload the data. (apart from some problems when using multiple languages). Or reboot TVH. Or delete TVH database.

    ok so i got it working , i then went back to libreelec and noticed i have channel icons but the epg data is still missing.

    Seems to me you did not follow my guide but got creative with something you are not familiar with. So, if you changed location /storage/guide.xml, who knows what else you changed and should not have. Or skipped.

    For me, EPG source column says: XMLTV: ... at the beginning in front of any programm name:

    XMLTV: Fox (FOX)

    corresponds to the:

    <channel update="i" site="evotv.hr" site_id="211" xmltv_id="FOX">Fox</channel>

    Did you do:

    Now verify all is working well! From RPi where TVH is, just run the command:

    /storage/.kodi/addons/service.multimedia.tvheadend/bin/tv_grab_file

    If all is working well, you should see epg data echoed to the screen. OK: all is working! If not, something is wrong. Find it and fix it!!!

    Go to Add-ons -> Add-on browser -> Install from repository -> Services

    This is OT here, but: this is the right place. There must be: TvHeadEnd 4.0 and TvHeadEnd 4.2 (in my LE7). But, in some earlier versions, it would not be seen unles RPi is connected to the Internet and a forced update of this repository was made first.

    Can I send you a PM (through conversation) asking for help on how you setup TVH + WebGrab++?

    It may be better if I write it here, that info could be of use for others, too. Since I allready have it documented for my use, here it goes. When finished, you will have EPG for all programs, and be able to record and schedule them normally via TVH.

    There are two completely separate tasks here.

    1) create EPG data and save it to guide.xml. If you did that on a separate computer (not the one where TVH is), copy the guide.xml to RPi where TVH is.

    2) make RPi TVH use this EPG data.

    step 1: use WebGrab+ to create EPG data in guide.xml

    In this thread is a WebGrab+ Addon which works perfectly (I have RPi LE7 TVH4.0.9). Thanks to the authors! Also, you can install WebGrab+ in Win computer and make guide.xml there. This part is simple. Currently, I have one WebGrab+ in Win7, another in one RPI, while TVH is in a second RPi. Configure it and run it! Names of your programs must be the same in WebGrab++.config.xml (once at the end of the row, if multiples of same names exist, then: twice at end of each row) and TVH. If on Win, schedule it at e.g 3:00 daily.

    If you generated guide.xml on RPi where TVH is, this step is done. Go to Step 2.

    As I do it at another machines, when finished, I copy guide.xml to the RPi where TVH is using scp at RPi where TVH is (ssh must be fully configured prior to this or add pwd to the command):

    # copy from the network disk:

    scp [email protected]:/share/CACHEDEV1_DATA/Public/qWindows7/guide.xml /storage/guide.xml

    # copy from another RPi

    scp [email protected]:/storage/.kodi/userdata/addon_data/service.webgrabplus/guide.xml /storage/guide.xml


    In my case, this command is in cron (at 5:15 daily) run script at my RPi where TVH is installed. Obviously, scp needs to be adjusted for others.

    step 2: Make TVH use EPG data in guide.xml

    How to make TVH use this EPG data? Could not be simpler once you know what nees to be done. At RPi with TVH edit file (.kodi is hidden so make sure you can see it)

    /storage/.kodi/userdata/addon_data/service.multimedia.tvheadend/settings.xml

    where you will find lines:

    <setting id="XMLTV_LOCATION_FILE" value="" />

    <setting id="XMLTV_TYPE" value="NONE" />

    Change them to:

    <setting id="XMLTV_TYPE" value="FILE" />

    <setting id="XMLTV_LOCATION_FILE" value="/storage/guide.xml" />

    This is what I do since I copy the guide.xml from either server network disk or from the second RPi to the RPi with TVH.

    If you run WG++ Addon at the same RPi with TVH, this second line should be (I did not try this):

    <setting id="XMLTV_LOCATION_FILE" value="/storage/.kodi/userdata/addon_data/service.webgrabplus/guide.xml" />

    Now verify all is working well! From RPi where TVH is, just run the command:

    /storage/.kodi/addons/service.multimedia.tvheadend/bin/tv_grab_file

    If all is working well, you should see epg data echoed to the screen. OK: all is working! If not, something is wrong. Find it and fix it!!!

    Reboot RPi with TvHeadEnd, connect onto it with your browser and select the new internal grabber: "XMLTV: tv_grab": Configuration -> Channel / EPG -> EPG grabber -> Internal Grabber -> Module "XMLTV: tv_grab" and save that.

    For all programs whose names match, at Channels tab you should see EPG source populated with XMLTV ... tags. Each Kodi will need to be told to delete programs (and therefore reread them) or delete (and reread) just the EPG data to show new data.

    Anything more?

    I am on RPi LE7 with TVH 4.0.9. Addon runs perfectly, once a day at 3:00 is perfect for me.

    But, this is version v1.57.

    As I need to tweek some site.ini files and I have only current documentation for v2.1, I am afraid I may do something which will break v1.57. I am not able to find any list of differences between versions.

    For now I have v2.1 running on Win7 simultaneously. I will try comparing and fixing things there, but this will not be a simple task. My RPi is setup so it can automatically use either file, but I would prefer to use addon.

    Will there be addon with current 2.1 version for LE7?

    Here is my LibreElec OS level mounting bug report summary.

    LibreElec hangs RPi with OS level mount network share is active (either mount version) if network disk is / becomes unavailable (until server disk becomes available)

    - when RPI works, server goes to sleep
    - when RPI boots, server sleeps
    - when RPI works, server reboots
    - with server down, Kodi works streaming TV from TVheadend if it was active prior to disk sleeping, but only until the Kodi Info PVR page is visited (where total PVR disk space is shown). As Kodi does not use OS level shares, it will WOL server when needed perfectly fine
    - any file command will hang in Putty, other commands work
    - WinSCP does not work as it is only issuing file commands
    - share can not be umounted in any way while it is unavailable

    Same goes to any additional RPi connected to use tv stream from the one where mount and TVheadend actually are.

    If LibreElec is not provoked by issuing any file command in any way while server is down (mount target is unavailable), cron will work perfectly waking the server from sleep when needed.

    My workaround: I am umounting share when not needed for TVHeadend recording, but there are downsides to that. I should not have to do it this way.


    Have a look at systemd based mounts.


    OK, I am off trying that.
    [hr]
    No, did nothing. Same hangup as with the first method of mounting.

    So, if a mount goes to sleep, LibreElec hangs. Tried both mount methods. Same hang.

    To reproduce:
    - mount LE RPi to nfs server
    - putty to LE - type ls to see it working, then exit Putty
    - make server sleep
    - putty to LE - type ls to see it hanging
    - wake server, LE works egain

    systemctl stop storage-recordings.mount also hangs

    To be clear:
    1. If TV picture is streaming to the second RPI when server goes to sleep, all is perfect. Kodi will wake server if needed to view recordings.
    2. If left alone and server goes to sleep, all is perfect. Script wakes it when recording is due, and server returns to sleep later.
    3. But if you are not connected to the TV stream, you can not connect to any RPI (escept Putty with partial command set usable) until server returns from the sleep. It takes it a couple of minutes and then all is perfect again.

    I guess I want autofs which does not exist on LE.

    I wrote a line of code to deal with this, but having it cronned every minute to check and fix is not my idea of fun or nice. We must never do such things when dealing with a file system. As they were not fragile enough! This should not be a solution as it is not bulletproof nor transparent.

    There must be a better way. What I did to fix a problem is not fit for many, if not most users.

    There must be a way for me to link into a file request at the OS level and make a check, instead of cron. If there is no legal automount.

    This is legitimate issue with a mounting in LE. Today it should be clear and accepted that devices when not used must be allowed to sleep. This notion should not break LE RPi.
    [hr]
    no, LibreElec hangs file system when remote disk mount dissapears.

    Puty can log in, but:
    > mountpoint -q /storage/recordings
    > umount /storage/recordings
    > umount -f /storage/recordings

    do nothing, just hanging out there ...

    So, this is not a LE bug? A feature then?

    LE 7.0.2 RPi bootargumentswol_mac=<mac-address>
    wol_wait=<seconds>
    properly entered (MAC with : and time 30) into:/flash/cmdline.txt do not work at all. No WOL and no Wait at all (instead of 30 sec). Maybe it was sent prior to the LAN connection?

    I need WOL to be sent during the RPi LE boot if my server is sleeping, 10 sec wait and then I can mount a disk for TVH.

    Is my only option to send WOL my own way from /storage/.config/autostart.sh? I would prefer WOL at LE level instead.

    Is there a way to send WOL at OS level (not in KODI) during the boot? Except for the one from the title which apparamntyly does not work.

    I made a 2 line script to let TVheadend TV recording wake my server (NAS) where it records to, so I can let the server sleep when it is not needed. Script is perfect, but...

    For as long as the server is sleeping and hence this mount is unavailable, RPi is not communicative. Apparantly, the script works normally, and will wake the server to make recordings. Putty works.

    RPi LE with TVH has a OS level mount to the server as per OE Wiki:
    # /storage/.config/autostart.sh contains:

    Bash
    #!/bin/sh
    (
        mount -t nfs 192.168.2.5:/volume1/Public/Video/TV /storage/recordings -o nolock
    )&

    At the moment when the server (NAS) goes to sleep (and for the duration of it), both RPis are unresponsible. Depends on the starting position, they may work apparantly perfectly normal (if they were allready being used) or may be hanged (e.g. if Kodi restarted after server went to sleep).

    I can connect with Putty and remain connected all the time regardles of the server state. I can do some things with putty, some not.

    Is there a better way to mount the remote disk with LE n RPi? Ideally, automount when needed. This is pure LE RPi OS issue.

    If I umount this share prior to the server going to sleep, all is perfect, both RPis work perfectly normal (not having acces to the external disk). After I wake my server, I mount it back with usual command, all is perfect but with the external disk.

    But, how to make umounts and mounts after wakeup automatic? Or create a smarter automount than the one I am using now?

    My remotes work perfectly. I want to get 2 different Kodi devices in the same room, both using the same GPIO IR sensor and RC6 commandset to not recognize remote control intended for the other device. I can program anything into a Logitech Harmony remote. Now I am using Microsoft Media Center PC (Windows Media Center SE) commandset for a remote.

    I can change remote definition for one RPi to use e.g. Philips RC-153 (Media center remote) but how to tell to the LIRC (or Kodi) in that RPi it should recognize only Philips RC-153 and not Microsoft Media Center PC (Windows Media Center SE)?

    IRW shows commands only from remote A, ignores the rest. Killing lircd and trying with mode2 -d /dev/lirc0, I can see remote B (or any remote) is being read. So, I need a simple way to tell to the LIRC that I want it to use some other remote. I presume I should do it using lircd.conf. I would not like to have to define every keypress. Just say: use different remote using the same standard. Each keypress has encoded which remote is sending it, so a Panaonic and Philips RC6 codes are not be the same.

    I can change remote to anything, if needed, As I am dealing with a pure IR sensor (not some finished product), I guess it recognizes anything, not neceserily only RC6.