How to get this script to execute itself?
#1
Exclamation 
Hi People,

I am looking for a way to get my remote to work in XBMC after it wakes up from suspend.

Now i've tried this script http://wiki.xbmc.org/?title=Automatic_li...ume_script but i have little succes on getting it to work because my suspend log doesn't show anything about a script 99lirc-resume.sh getting executed even when i gave i execute right.

So if someone could give me a hand in getting this to work i might find a way to get my remote to work. Or if someone has his remote working in XBMC after suspend it would be really great.

Greetz,
Fjerpje
Reply
#2
If the script is executed a log entry can be found in /tmp/script.log. Type

cat /tmp/script.log

If the file does not exist, the script was not executed.
Reply
#3
try this

Code:
#!/bin/sh

case "$1" in
        resume)
                curl "http://127.0.0.1:8080/xbmcCmds /xbmcHttp?command=ExecBuilt&Inparameter=LIRC.Stop"
                /etc/init.d/lirc stop
                /etc/init.d/lirc start
                sleep 1
                rmmod lirc_wb677
                modprobe lirc_wb677
                curl "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=LIRC.Start"
                echo `date` "lirc resume script completed!!!" >>/tmp/script.log
        ;;
esac

it seems to work ok on my ASrock setup. Changes being, that I specify the module to remove/add instead of parsing it from dmesg..

ensure to assign proper execute perms

Code:
$ sudo chmod 755 99lirc-resume.sh

Ensure you also have the XBMC webserver active (XBMC -> settings/network), or else the script is unable to connect to webservices to restart the lirc component of XBMC

Be sure to use version 1.0.1 of the lirc drivers (found here http://rapidshare.com/files/332793615/IR_9.10_.zip) . The following will confirm your installed version

Code:
$ dpkg -s lirc-nct677x | grep Version
Version: 1.0.1-ubuntu9.10
Reply
#4
jw76 Wrote:try this

Code:
#!/bin/sh

case "$1" in
        resume)
                curl "http://127.0.0.1:8080/xbmcCmds /xbmcHttp?command=ExecBuilt&Inparameter=LIRC.Stop"
                /etc/init.d/lirc stop
                /etc/init.d/lirc start
                sleep 1
                rmmod lirc_wb677
                modprobe lirc_wb677
                curl "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=LIRC.Start"
                echo `date` "lirc resume script completed!!!" >>/tmp/script.log
        ;;
esac

it seems to work ok on my ASrock setup. Changes being, that I specify the module to remove/add instead of parsing it from dmesg..

ensure to assign proper execute perms

Code:
$ sudo chmod 755 99lirc-resume.sh

Ensure you also have the XBMC webserver active (XBMC -> settings/network), or else the script is unable to connect to webservices to restart the lirc component of XBMC

Be sure to use version 1.0.1 of the lirc drivers (found here http://rapidshare.com/files/332793615/IR_9.10_.zip) . The following will confirm your installed version

Code:
$ dpkg -s lirc-nct677x | grep Version
Version: 1.0.1-ubuntu9.10

Oke i will try this out. If this works i will be so darn happyBig Grin XBMC runs great with the bugg fixes and the latest drivers. Guess i will make a complete howto for the Asrock 330 ION's.

Thanks allot m8.

Greetz,
Fjerpje
Reply
#5
Dude if you were a girl i would kiss yah!Laugh Thanks allot mate i will make a Howto in a couple of days explaining how to get everything to work with the Asrock 330 ION's. With all the credits to the coders.

Thanks again mate you really saved me some boot time!

Greetz,
Fjerpje
Reply
#6
Thanks for the instructions, it solved the issue.

But now I have another problem: Supend does not work now, the system boots up again by itself.

Is there any solution on this?
Vero 4k+ | OSMC Kodi 19.1
Sony KD-65A1
Reply

Logout Mark Read Team Forum Stats Members Help
How to get this script to execute itself?0