Shortly after I wake my system (3 seconds?), I'd like for it to automatically reboot.
Would something like this be possible?
I'm using OpenElec. I'm not sure if this is a platform-specific question, so this thread can be moved if necessary.
Why not just shut it down and boot it up, then, instead of sleeping/waking?
Yes, from a ssh terminal type
Code:
mkdir -p /storage/.xbmc/addons/_pm-suspend/sleep.d/ && nano /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power && chmod +x /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power
Paste in:
Code:
[ "$1" = "resume" ] && sleep 3 && reboot
then
Code:
chmod +x /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power
(2013-09-25, 03:00)Ned Scott Wrote: [ -> ]Why not just shut it down and boot it up, then, instead of sleeping/waking?
I might be doing something wrong, but I've tried a few things and I don't believe I'm able to power on with my remote from a completely shut-down state.
(2013-09-25, 03:11)teeedubb Wrote: [ -> ]Yes, from a ssh terminal type
Code:
mkdir -p /storage/.xbmc/addons/_pm-suspend/sleep.d/ && nano /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power && chmod +x /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power
Paste in:
Code:
[ "$1" = "resume" ] && sleep 3 && reboot
then
Code:
chmod +x /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power
I really didn't think this would be possible, but you posted a solution! Thank you!!! I'll try this out asap.
(2013-09-25, 03:58)room312 Wrote: [ -> ] (2013-09-25, 03:11)teeedubb Wrote: [ -> ]Code:
[ "$1" = "resume" ] && sleep 3 && reboot
I really didn't think this would be possible, but you posted a solution! Thank you!!! I'll try this out asap.
Do you really want to reboot, or simply restart xbmc? If the latter, instead use:
Code:
xbmc-send --action="XBMC.RestartApp"
That's what I use (to get around the issue with Windows shares becoming unusable after resuming). It's normally restarted and at the home window by the time my TV is awake.
(2013-09-25, 04:06)magao Wrote: [ -> ] (2013-09-25, 03:58)room312 Wrote: [ -> ] (2013-09-25, 03:11)teeedubb Wrote: [ -> ]Code:
[ "$1" = "resume" ] && sleep 3 && reboot
I really didn't think this would be possible, but you posted a solution! Thank you!!! I'll try this out asap.
Do you really want to reboot, or simply restart xbmc? If the latter, instead use:
Code:
xbmc-send --action="XBMC.RestartApp"
That's what I use (to get around the issue with Windows shares becoming unusable after resuming). It's normally restarted and at the home window by the time my TV is awake.
With OpenElec, the time between boot and the XBMC loading screen is very minimal, and even shorter since I'm using an SSD.
However, I'll try it both ways and see which provides better results. Thank you!!
cool thx that wok very well with me
just i have 2 questin if you dont mind
if i want to change the time from 3 seconds to 1 second just i have change the number from 3 to 1
if i wanted emeditly with zero witing i shulod remove number 3 from the commaned line ? is that correct ?
the other thing if in future i want to cancel this code and just use the regulre wakup from suspend how i can delete this codes
(2013-09-25, 03:11)teeedubb Wrote: [ -> ]Yes, from a ssh terminal type
Code:
mkdir -p /storage/.xbmc/addons/_pm-suspend/sleep.d/ && nano /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power && chmod +x /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power
Paste in:
Code:
[ "$1" = "resume" ] && sleep 3 && reboot
then
Code:
chmod +x /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power
(2013-09-25, 04:06)magao Wrote: [ -> ] (2013-09-25, 03:58)room312 Wrote: [ -> ] (2013-09-25, 03:11)teeedubb Wrote: [ -> ]Code:
[ "$1" = "resume" ] && sleep 3 && reboot
Do you really want to reboot, or simply restart xbmc? If the latter, instead use:
Code:
xbmc-send --action="XBMC.RestartApp"
That's what I use (to get around the issue with Windows shares becoming unusable after resuming). It's normally restarted and at the home window by the time my TV is awake.
cool i try this code saves time
the reboot code take 30 seconds to launch the device
with the restart code take 14 seconds so thank you, you saved 16 seconds from my life
some time with regular suspend and wake up i lose the sound audio when play movies i think this issue a lot of people have it
i have to reboot the device to fix that i hope the restart app resolve this problem do you think restart the app only enough to fix the sound issue
thx
Yes the number after sleep is how many seconds you want to sleep for. To remove the sleep remove '&& sleep 3'. To delete the resume hook 'rm /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power'
(2014-01-28, 00:12)teeedubb Wrote: [ -> ]Yes the number after sleep is how many seconds you want to sleep for. To remove the sleep remove '&& sleep 3'. To delete the resume hook 'rm /storage/.xbmc/addons/_pm-suspend/sleep.d/reboot.power'
Great Thank you for your time
Mmm I didn't know what you mean what hook thing
But never mind i will search how to do that coz I'm new In xbmc and the commands line
Thank you again