• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: "turn off" guruplug led  (Read 6320 times)
math
Newbie
*

Karma: 0
Posts: 11


View Profile
« on: December 20, 2010, 12:24:47 PM »

Hello All,

I have got my guruplug server since this summer and I really wants to turn off all the leds (green).

I've executed as root a script with theses lines, no error from shell but leds are still green !
Code:
#!/bin/sh

echo "none" > /sys/class/leds/plug2\:green\:health/trigger
echo "none" > /sys/class/leds/plug2\:green\:wmode/trigger
echo 0 > `eval ls /sys/class/leds/*plug*\:green\:health/brightness`
echo 0 > `eval ls /sys/class/leds/*plug*\:green\:wmode/brightness`

How can I switch off all the lights ?
Logged

doragasu
Newbie
*

Karma: 0
Posts: 34


View Profile
« Reply #1 on: December 31, 2010, 02:04:46 AM »

I made a similar script for turning red the left LED (health) and turning off the bottom one (wmode). It works perfect for me.

Code:
#!/bin/sh
echo 0 > /sys/class/leds/guruplug\:green\:wmode/brightness
echo 0 > /sys/class/leds/guruplug\:red\:wmode/brightness
echo 0 > /sys/class/leds/guruplug\:green\:health/brightness
echo 1 > /sys/class/leds/guruplug\:red\:health/brightness
Logged

math
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #2 on: January 02, 2011, 06:50:43 AM »

echo 0 > /sys/class/leds/guruplug\:green\:wmode/brightness
return me this error : "/sys/class/leds/guruplug:green:wmode/brightness: Aucun fichier ou répertoire de ce type"

but...
Code:
ls -la /sys/class/leds/
total 0
drwxr-xr-x  2 root root 0 jan  2 14:32 .
drwxr-xr-x 30 root root 0 jan  2 14:32 ..
lrwxrwxrwx  1 root root 0 jan  2 14:34 plug2:green:health -> ../../devices/platform/leds-gpio/leds/plug2:green:health
lrwxrwxrwx  1 root root 0 jan  2 14:34 plug2:green:wmode -> ../../devices/platform/leds-gpio/leds/plug2:green:wmode
lrwxrwxrwx  1 root root 0 jan  2 14:34 plug2:red:health -> ../../devices/platform/leds-gpio/leds/plug2:red:health
lrwxrwxrwx  1 root root 0 jan  2 14:34 plug2:red:wmode -> ../../devices/platform/leds-gpio/leds/plug2:red:wmode

But in fact  have the same result : green leds still light but I can control the red one !
Logged

doragasu
Newbie
*

Karma: 0
Posts: 34


View Profile
« Reply #3 on: January 03, 2011, 01:54:01 PM »

Have you tried my script, but replacing "guruplug" with "plug2"?

Code:
#!/bin/sh
echo 0 > /sys/class/leds/plug2\:green\:wmode/brightness
echo 0 > /sys/class/leds/plug2\:red\:wmode/brightness
echo 0 > /sys/class/leds/plug2\:green\:health/brightness
echo 1 > /sys/class/leds/plug2\:red\:health/brightness

Making leds turn ON and OFF should be an easy task using sysfs. You only have to write zeros to turn off and ones to turn on.
Logged

math
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #4 on: January 04, 2011, 12:07:28 PM »

Have you tried my script, but replacing "guruplug" with "plug2"?

ok, I just have tried ; but I have the same issue.
To be clearer, I've noticed that the green leds that is still lighten is on the bottom of the plug whereas "/sys/class/leds/plug2\:green\:wmode/brightness" controls the right (or left) leds...
Logged

Pages: [1]
Print
Jump to: