Sign up here and you can log into the forum!

Plugin: SleepTimer + sleep on idle (update 3)

The WDTVExt plugin depot. Plugins/libraries/code only

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby simogere » Mon Jun 21, 2010 5:41 am

dan wrote:Hi PlackPuma,

I have added sleep on idle support. Please update your SleepTimer.plugin.js with the new code of the first post.


Hi dan! First af all thanks for your work!

I tried your "Idle mode" but I don't know why it doesn't work. This evenig I'll do some other tests and I'll know you the results.

Simone
User avatar
simogere
Donor
 
Posts: 140
Joined: Tue May 11, 2010 9:50 pm

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby dan » Mon Jun 21, 2010 7:16 am

Hi simogere,

Idle mode works like this: the script checks for every minute the systems idle state. if the value is above 75% ten times in a row, the device will go to sleep.

Please check if you are running any processes in the background that keep your cpu load high. Also make sure that EIRI is running. If not activate it by putting this line in your /boot/S00custon_options and reboot your device.
config_tool -c EIRI=ON


Please let me know if you get it to work.
dan
Developer
 
Posts: 40
Joined: Fri May 28, 2010 11:35 pm

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby simogere » Mon Jun 21, 2010 7:44 am

dan wrote:Hi simogere,

Idle mode works like this: the script checks for every minute the systems idle state. if the value is above 75% ten times in a row, the device will go to sleep.

Please check if you are running any processes in the background that keep your cpu load high. Also make sure that EIRI is running. If not activate it by putting this line in your /boot/S00custon_options and reboot your device.
config_tool -c EIRI=ON


Please let me know if you get it to work.



Code: Select all
Mem: 186640K used, 12416K free, 0K shrd, 13312K buff, 120160K cached
CPU:  6.5% usr 34.9% sys  0.0% nic 58.5% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 0.68 0.83 0.84 1/91 31083
  PID  PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
  719     2 root     SW       0  0.0   0 17.6 [sigmblockd]
1619  1617 root     S     168m 86.6   0  1.9 /bin/dmaosd
1609     1 root     S     3712  1.8   0  0.7 /bin/sh /usr/bin/wdlxtv.watch
1123     1 root     S     3712  1.8   0  0.4 /bin/sh /usr/bin/mount.watch
18283 17944 root     R     3712  1.8   0  0.4 top
1666     1 root     S     3712  1.8   0  0.2 telnetd -K -l login
1611     1 root     S    92976 46.5   0  0.0 MediaLogic AV MSGL_FATAL
1587     1 root     S    37776 18.9   0  0.0 unionfs /tmp/.root/osd:/msheets /osd -o nonempty
1988     1 root     S    33808 16.9   0  0.0 curlftpfs ftp://192.168.1.3:21 /tmp/media/usb/NAS_FTP -o user=wdtv:wdtv
2731  1619 root     S    31424 15.7   0  0.0 /bin/scan_manager
1774  1576 root     S    22944 11.4   0  0.0 /usr/bin/php-cgi
1772  1576 root     S    22944 11.4   0  0.0 /usr/bin/php-cgi
1777  1576 root     S    22944 11.4   0  0.0 /usr/bin/php-cgi
1773  1576 root     S    22944 11.4   0  0.0 /usr/bin/php-cgi
1576  1573 root     S    22944 11.4   0  0.0 /usr/bin/php-cgi
1615     1 root     S    21248 10.6   0  0.0 MediaLogic_PIC PC MSGL_FATAL
3690  1619 root     S    15472  7.7   0  0.0 /bin/pandora_ep
1573     1 root     S    11488  5.7   0  0.0 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
3676     1 root     S     7264  3.6   0  0.0 /usr/sbin/smbd -D --configfile=/tmp/smb2.conf --piddir=/tmp --private-dir=/tmp/
3691  3676 root     S     7264  3.6   0  0.0 /usr/sbin/smbd -D --configfile=/tmp/smb2.conf --piddir=/tmp --private-dir=/tmp/
1612     1 root     S     5328  2.6   0  0.0 DMARender
1616     1 root     S     5312  2.6   0  0.0 PICRender
1647     1 root     S     5104  2.5   0  0.0 pure-ftpd (SERVER)
1898     1 root     S     4624  2.3   0  0.0 config_tool -m 10
1161     1 root     S     4352  2.1   0  0.0 /bin/memory_cache_server
3644     1 root     S     4192  2.1   0  0.0 /usr/sbin/nmbd -D --configfile=/tmp/smb2.conf
    1     0 root     S     3712  1.8   0  0.0 /bin/sh /init
17944  1666 root     S     3712  1.8   0  0.0 -sh


Out of house right now...
User avatar
simogere
Donor
 
Posts: 140
Joined: Tue May 11, 2010 9:50 pm

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby dan » Mon Jun 21, 2010 8:17 am

58.5% idle
Threshold is 75%. So something is running in the background.
dan
Developer
 
Posts: 40
Joined: Fri May 28, 2010 11:35 pm

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby b-rad.cc » Mon Jun 21, 2010 8:24 am

why don't you instead check if video_run.xml or audio_run.xml are active?
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3002
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby sailort » Mon Jun 21, 2010 9:16 am

guys, I'm just curious, why one need to sleep the box? Power consumption difference between power on and standby is almost nil AFAIK. T.
If you like my work and want to buy me a bottle of wine, you can do it this way. Thanks for your support.
sailort
Developer
 
Posts: 363
Joined: Sat Apr 24, 2010 6:42 am

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby b-rad.cc » Mon Jun 21, 2010 9:18 am

power consumption of average tv is ~40x of wdtv, most tv's go off after a bit with lack of signal...so this effectively shuts off your tv too.
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3002
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby sailort » Mon Jun 21, 2010 9:24 am

oh, I see now. It is so much problem to turn TV manually off when leaving it? :D Anyway, this seems also to interfere with MN plugin. (ok, I'm shut now...)
If you like my work and want to buy me a bottle of wine, you can do it this way. Thanks for your support.
sailort
Developer
 
Posts: 363
Joined: Sat Apr 24, 2010 6:42 am

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby dan » Mon Jun 21, 2010 9:32 am

b-rad.cc wrote:why don't you instead check if video_run.xml or audio_run.xml are active?


Good idea but I don't want the device go to sleep if a cronjob or background process is running. Say sleep mode should wait for all downloads to complete.

sailort wrote:guys, I'm just curious, why one need to sleep the box? Power consumption difference between power on and standby is almost nil AFAIK. T.


If you have some usb powered devices plugged in the WDTV (WLan, Hdds, ...) you will save some energy. Just thinking of our climate, mate :D

sailort wrote:oAnyway, this seems also to interfere with MN plugin.
How?
dan
Developer
 
Posts: 40
Joined: Fri May 28, 2010 11:35 pm

Re: Plugin: SleepTimer + sleep on idle (update 3)   

Postby sailort » Mon Jun 21, 2010 9:45 am

dan wrote:
sailort wrote:guys, I'm just curious, why one need to sleep the box? Power consumption difference between power on and standby is almost nil AFAIK. T.

If you have some usb powered devices plugged in the WDTV (WLan, Hdds, ...) you will save some energy. Just thinking of our climate, mate :D

Yes, I do care. That's why I'm turning my TV off when not watching it :D HDDs is somewhat and argument, but I have only one small 2.5 HDD attached to WDTV to do DL stuff. Others drives I'm turning on only when I want to watch contnent from it.

dan wrote:
sailort wrote:oAnyway, this seems also to interfere with MN plugin.
How?

interference with SEARCH key? (but I haven't checked your plugin, so I could be wrong). But hopefully we will have solution for this in the near future (check Ring plugin).
If you like my work and want to buy me a bottle of wine, you can do it this way. Thanks for your support.
sailort
Developer
 
Posts: 363
Joined: Sat Apr 24, 2010 6:42 am

PreviousNext

Return to WDTVExt plugins

Who is online

Users browsing this forum: No registered users and 1 guest