WebGrab+Plus

  • not need code :)

    1. bash# rm -rf /storage/.kodi/addons/service.webgrabplus/system.d/service.webgrabplus.service

    now get user to set run timer this way:

    2. bash# crontab -e

    3. 15 6 * * * /storage/.kodi/addons/service.webgrabplus/bin/webgrabplus.start

    this entry runs ur script everyday at 6:15am, you can make it run 6:15am Mon, Wed, Fri like this:
    15 6 * * 1,3,5 /storage/.kodi/addons/service.webgrabplus/bin/webgrabplus.start

    4. save this then runs flexibly how u want. Your way u can't change it :dodgy:

    ^cron file for root is at /storage/.cache/cron/crontabs/root

    5. Change WebGrab++.config.xml then store your guide.xml /storage/guide.xml

    6. throw this tv_grab_file.txt in /storage/.kodi/addons/service.webgrabplus/bin/tv_grab_file
    7. chmod +x tv_grab_file

    8. enable it in tvheadend , run internal grabbers once and boom it pulls in all the channels from /storage/guide.xml
    What I find strange atm is tvheadend appears to need a reboot for it to read guide.xml correctly & map channel info to actually work.
    Doesn't need this in regular linux, would suck if you have to do it every time.

    For some reason if you asign Channel tag (end up group name in kodi) it maps it ? not sure why this effects it but no reboot needed

  • highkick05

    The purpose of the addon is to provide simple configuration (ie copy/edit files) of WebGrab+Plus.

    If you delete the service, you break the addon.
    If you do not need the service, you do not need the addon.

    As an alternative, you may use the packaged version of WebGrab+Plus that I maintain and that underlies the addon: GitHub - awiouy/webgrabplus.
    If you download master of that repository (eg with cron), you will get the versions of WebGrab+Plus, siteini.pack, xml_time_correct, WG2MP, etc. used by the addon.
    Note that this requires the Mono addon, and configurations are tailored for /storage/.kodi/addons/service.webgrabplus (see the file layout of the addon).
    You will then be free to define your own automation/scheduling

    As for tvheadend (ie a consumer), it is out of the scope of the addon

    I hope you will find it useful

  • is it hard to edit root cron file from in kodi addon? open it in editor

    yeah I may download the original files.. I try this today, just to see if tvheadend pulls in the guide.xml better

  • awiouy

    we had already one week ago a short conversation at the kodinerds forum.

    I have noticed at my RPi during webgrabplus is synchronizing the EPG data that one CPU does run with 100%. As soon the task is after one hour complete or I do deactivate the Addon it does disappear.

    I did meanwhile check the kodi debug log but there is nothing relevant. I did now attach the complete WebGrab++.log.txt and hopefully you are able to detect more than I.

    Beside the CPU utilization everything is working well. Perhaps you have an idea how to improve my settings.

    Thanks in advance!

  • How did you make cron work in LibreELEC? I have enabled cron in kodi settings and set my system time and set a crontab to run, but nothing runs. My script runs manually, just cron won't do anything.

    On a different note: where does cron put the mail notification in LibreELEC?

    Sorry off topic, but nobody answers my thread asking the same question.

    The reason for this is; I have a RPi 1B with only 1 core and webgrab takes more than an hour to run with no mdb job. I have installed the regular Linux WebGrab++ and want it to grab 2 days every day in the middle of the night.

    I did have this add-on working, I just decided I needed more control.

    Evidently, the MDB program got broken with a recent update, according to their forum.

  • What a journey!
    I am back to this addon, even though I don't really want to run it 4 times a day. I could not get cron to run in LibreELEC, I got everything working in Raspbian but could not get Lirc to work (so no Kodi for me), rumor has it that cron works in OpenELEC but can't install mono.

    Luck for me I stored service.webgrabplus.zip on a harddrive since the link in the first post has disappeared.

    Edited once, last by donbrew (September 25, 2016 at 11:39 PM).

  • How did you make cron work in LibreELEC? I have enabled cron in kodi settings and set my system time and set a crontab to run, but nothing runs. My script runs manually, just cron won't do anything.

    On a different note: where does cron put the mail notification in LibreELEC?

    mine works, use crontab -e it updates root's cron job correctly , but think edit /storage/.cache/cron/crontabs/root works anyway

    I setup my webgrab ages ago, haven't had another look cos I haven't needed too =]

    tv_grab_file works a lot better in webgrab's bin directory also I've noticed, if you put it in tvheadend's it distort's data in webif


  • What a journey!
    I am back to this addon, even though I don't really want to run it 4 times a day. I could not get cron to run in LibreELEC, I got everything working in Raspbian but could not get Lirc to work (so no Kodi for me), rumor has it that cron works in OpenELEC but can't install mono.

    Luck for me I stored service.webgrabplus.zip on a harddrive since the link in the first post has disappeared.


    Woah!

    Isn't the latest version of WebGrab+Plus available from the LibreELEC repository anymore?

    Moreover, according to the posts in this thread, cron is working on LibreELEC.
    [hr]


    Hallo Motorradfahrer!

    I had a glance at your log, and see nothing abnormal. I will have a closer look when I have the time.

    Bear in mind that I merely maintain the addon, but not WebGrab+Plus. Maybe your issue would be better assessed/solved at the WebGrab+Plus forum.

  • I do know how to edit crontab, I had it working on Raspbian. I diddled with it on libreelec for several DAYS, I don't have much else to do.

    I don't think the cron daemon was running, and I couldn't figure out how to make it run. The internet has the answer to everything except what I want to know.

    WebGrab++.service is in the repository, I just didn't think to look since I installed it the first time from your link in the other (closed) thread.

  • And where did I say that I did not look at the wiki?
    From my post #96
    " I have enabled cron in kodi settings and set my system time and set a crontab to run, but nothing runs. My script runs manually, just cron won't do anything. "

    By the way, the same script and crontab (modified for the different directory structures and permissions) worked in Raspbian. Also stated previously.

  • Regarding setting up cron to temporarily replace awiouy provided service.webgrabplus, this is what I did and works for me :-

    1. Disabled WebGrab+Plus service addon via Kodi UI (Fully disables addon, but currently believe does not fully disable service?)
    2. Disabled service via ssh and command line (systemctl stop service.webgrabplus "then" systemctl disable service.webgrabplus)
    3. Utilised a cron job to run awiouy webgrabplus.start automatically and only once a day at 03:00

    Added following line within root file /.cache/cron/crontabs/root (via ssh and using crontab -e command)

    0 3 * * * /storage/.kodi/addons/service.webgrabplus/bin/webgrabplus.start

    Above will ensure job is run at 03:00 every day as Cron is enabled by default in LibreELEC on my RPi2, so simply re-booting device ensures that cron job(s) runs at set time every day.

    Note: Above still utilises the webgrabplus addon via mono as provided by awiouy (Thanks so much)

    ---edited--- to correct line I added to root file to included missing /storage

    Edited once, last by MikeKL (October 1, 2016 at 9:07 PM).

  • not even need reboot. unless this is RPi related.. but I don't see how , I set a cronjob to run 5 minutes from when I set it and it run webgrabplus.start (i see in ps ax)

    so don't need reboot =] good to know u can disable addon. the binary provided and mono work well

  • systemctl stop service.webgrabplus

    That is what I typed, linux added the .service. Today it stops and disables like expected.

    When it removed files in the disabling it added the .service (Removed /storage/.config/system.d/service.webgrabplus.service)

    Waiting for cron

    cron still won't work for me! I set one for "helloworld.sh" that runs manually. ?Just does nothing.

    Edited once, last by donbrew (September 30, 2016 at 11:11 PM).

  • I assume you forgot to type /storage in the crontab? Or, does that work?


    I have finally forced cron to work on my RPi by running "systemctl start cron" evidently that forced cron to sync it's clock to the system clock.
    [hr]
    If I add a before.sh or after.sh, are you guys are talking Linux and assuming we all know to add
    #!/bin/sh
    at the top of the script and the chmod 755 script.name?

    Or, that is not needed?

    I also gather those scripts go into /storage/.kodi/userdata/addon_data/service.webgrabplus ?

    Edited once, last by donbrew (October 1, 2016 at 7:48 PM).