maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Automatic Muting via cron (https://talk.maemo.org/showthread.php?t=20966)

aNoble 2008-06-20 15:06

Re: Automatic Muting via cron
 
Quote:

Originally Posted by cybergypsy (Post 193789)
I have turned off the LED notifications :-

Settings > Control Panel > Display > LEDs

....and sleep easy.

Yea, but I really like having the LED notifications during the day. And I'd rather not have to turn them on and off every night/morning.

alephito 2008-06-20 15:58

Re: Automatic Muting via cron
 
Maybe this thread can be of help.

qwerty12 2008-06-20 16:56

Re: Automatic Muting via cron
 
Here is a rip of cybergypsy's brilliant instructions but to do something else.

Putting the following into crontab should in theory put the tablet into offline mode at 11:30 PM and take it out at 7:00 AM.

Well, the dbus commands work as I spent 30 mins figuring them out but I don't know if cron will use them :p (you also may need to do dbus-uuidgen --ensure=/var/lib/dbus/machine-id as root)


30 23 * * * /usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_mode_ind string:"flight"
00 7 * * * /usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_mode_ind string:"normal"

aNoble 2008-06-20 18:07

Re: Automatic Muting via cron
 
Thanks for all of the great advice and I'm definitely going to see if I can the LED situation improved through cron.

But I was thinking what might possibly be an even better solution would be turn dim the LED based on the light sensor. So the darker it is the dimmer the LED gets. Because the LED tends to fade in and out at times I assume that it's able to be dimmed.

I'm a web developer so I don't have a lot of experience in programming at this level or in most of the languages typically used in Maemo. But if somebody can point me in the right direction I'd be happy to attempt to write something to do this sort of thing. Right now it's looking like I'll have to do my homework on DBUS and maybe Python. I'm comfortable with C# so maybe Vala would be better for me than Python?

Benson 2008-06-20 18:32

Re: Automatic Muting via cron
 
That's quite interesting; it's a good idea, and possible from a hardware perspective, but I doubt it's readily doable right now. Support should exist for an overall brightness control in mce, and I'm pretty sure it doesn't exist now. Alternatively, all LED patterns could be scaled and resubmitted, but I'm not sure whether there's a clean way to apply such changes. That's an inferior solution, anyway; if filing feature requests, the former is what you really want.

alephito 2008-06-21 17:37

Re: Automatic Muting via cron
 
Is there any way to set special hours for weekends?

For instance:

00 7 * * 1,2,3,4,5 aumix -w 90
00 10 * * 0,6 aumix -w 90

Is this valid if I want to sleep longer on Saturdays and Sundays?

alephito 2008-06-22 00:01

Re: Automatic Muting via cron
 
Quote:

Originally Posted by aNoble (Post 193824)
Yea, but I really like having the LED notifications during the day. And I'd rather not have to turn them on and off every night/morning.

I turned the "Device on" option off and left all the other options on.

This has stopped the device flashing the blue LED to indicate that the device is switched on when the display is in power save mode.

Now, with cron muting and switching to offline mode, there is no possible sound and LED use by night. Great.

alephito 2008-06-24 15:35

Re: Automatic Muting via cron
 
After upgrading to Diablo I am trying to install cron again.

After running 'tar zxvvf cron.tar.gz', I execute './cron/INSTALL' (as root) but the output is '/bin/sh: ./cron/INSTALL: Permission denied'.

What am I doing wrong? I don't remember if I had this problem the first time.

qwerty12 2008-06-24 15:41

Re: Automatic Muting via cron
 
I think you need to make sure you are root and make sure that the INSTALL script is set as executable.

alephito 2008-06-24 16:39

Re: Automatic Muting via cron
 
I am sure I am root (I see the # in the command line) and I run tar with the 'zxvvf' parameters. How can I check if the script is set as executable?


All times are GMT. The time now is 16:29.

vBulletin® Version 3.8.8