wakeup nas when timer programmed

DVBLink TV Server for ASUSTOR NAS is discussed here!

wakeup nas when timer programmed

Postby DennisB88 » Thu Oct 30, 2014 1:13 pm

Hi

I have installed DVB Link now on my nas and the recording function works fine. But my nas is often in s3 mode so the recording would not start. is there a possibility that the nas returns from s3 automatically when a timer is programmed?

Thanks in advance
DennisB88
 
Posts: 9
Joined: Tue Jul 29, 2014 8:37 am


Re: wakeup nas when timer programmed

Postby Oberon » Thu Oct 30, 2014 1:27 pm

Currently this functionality is not implemented.
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am

Re: wakeup nas when timer programmed

Postby DennisB88 » Thu Oct 30, 2014 8:27 pm

it seems like there is a possibility via xbmc... you can enter a script...but i am unfamiliar with scripting

Create a file setwakeup.sh in /usr/bin:

sudo nano /usr/bin/setwakeup.sh



Quellcode
1
2
3
4
5
6
#!/bin/sh
#$1 is the first argument to the script. It is the time in seconds since 1970
#this is defined in mythtv-setup with the time_t argument

echo 0 > /sys/class/rtc/rtc0/wakealarm #this clears your alarm.
echo $1 > /sys/class/rtc/rtc0/wakealarm #this writes your alarm


Make sure it is executable:

sudo chmod +x /usr/bin/setwakeup.sh


No you have to add your user or group to enable XBMC executing sudo elevation on the command.

sudo visudo

Add the following to the end of the file:


Quellcode
1
%xbmc ALL = NOPASSWD: /usr/bin/setwakeup.sh, /usr/sbin/pm-suspend


Replace %xbmc by the group of your user, or just use xbmc without % for the user only. If xbmc is the default user for XBMCBuntu (I don't know), the line would be:


Quellcode
1
xbmc ALL = NOPASSWD: /usr/bin/setwakeup.sh, /usr/sbin/pm-suspend


Now in the XBMC configuration, go to Settings, TV, Energy and fill in the wake up command

sudo setwakeup.sh

Now when XBMC suspends, it will call sudo setwakeup.sh *timestamp* and it will always log an error in xbmc.log about a -1 exit status. Ignore that.
You can check if the correct time is written using

cat /sys/class/rtc/rtc0/wakealarm

You will get a timestamp there and run it through this website for a human readable time:
http://www.epochconverter.com/
DennisB88
 
Posts: 9
Joined: Tue Jul 29, 2014 8:37 am

Re: wakeup nas when timer programmed

Postby Oberon » Thu Oct 30, 2014 9:04 pm

Do you know if this is applicable for ASUSTOR?
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am


Return to DVBLink TV Server for ASUSTOR NAS

Who is online

Users browsing this forum: No registered users and 1 guest

cron