Active Topics

 


Reply
Thread Tools
ToJa92's Avatar
Posts: 1,091 | Thanked: 323 times | Joined on Feb 2010 @ ~
#1
Is that combo possible?

It's because I got a Philips Wake-up light, which has a FM receiver, and it plays the alarm sound(in this case a FM signal) a half hour before it gets to the max volume. Which means if I use the normal alarm it would shut off way before the time the alarm is at the max level.
 

The Following User Says Thank You to ToJa92 For This Useful Post:
Posts: 889 | Thanked: 537 times | Joined on Mar 2010 @ scotland
#2
its a combo i've been tring to work out too, but alas i'm a noob, any experts got a trick to make this happen please?
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#3
You could make a script that turns on the FM transmitter and plays a sound, and open terminal and type sleep <time> && sh <script filename>
pseudo code:
#!/bin/sh
dbus command to activate FMTX
play-sound <soundfile>
 

The Following User Says Thank You to MohammadAG For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#4
Originally Posted by MohammadAG View Post
dbus command to activate FMTX
fmtx_client -p1
 

The Following 5 Users Say Thank You to qwerty12 For This Useful Post:
Posts: 267 | Thanked: 183 times | Joined on Jan 2010 @ Campinas, SP, Brazil
#5
Yes. Schedule with fcron, use play-sound to play the file and turn the transmitter on/off with the lines I added to the Phone control page.
 

The Following User Says Thank You to Patola For This Useful Post:
Posts: 889 | Thanked: 537 times | Joined on Mar 2010 @ scotland
#6
wow, quick response, thanks guys! but before i go getting annoyed at my command line ineptitude... <time> is this referring to wake up time, time from now til wake up, and what format would i use? i assume <script filename> is the name of whatever script i'm apparently compiling using the pseudo code? and i'm also guessing i dont need super user for this? sorry if i'm a bit slow still new to linux and n900
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#7
Code:
#!/bin/sh
fmtx_client -p1
play-sound /usr/share/sounds/ui-wrong_charger.wav
Save it as alarm.sh
Change the sound to whatever file you want
Chmod +x it:
Code:
chmod +x alarm.sh
Then run it as root
Code:
sleep <time-in-seconds> && sh alarm.sh
Edit: took a look at fxtx_client
You can change the code to fmtx_client -p1 -f(frequency) to something you know won't be covered by another radio station, that way you don't have to set the FMTX every time you go to bed, and you don't have to set the clock each time.

You can also install fm-boost and make it boost
.
Code:
#!/bin/sh
fmtx_client -p1
fm-boost
# sleep is to make sure boost works
sleep 3
play-sound /usr/share/sounds/ui-wrong_charger.wav
Edit 2: you owe qwerty12 a thanks

Last edited by MohammadAG; 2010-03-24 at 19:29.
 

The Following 5 Users Say Thank You to MohammadAG For This Useful Post:
Posts: 889 | Thanked: 537 times | Joined on Mar 2010 @ scotland
#8
thanks sent! now i'm gonna boldly dive into xterm like a 14 year old virgin and hope i dont end up embarrasing myself!
 
ToJa92's Avatar
Posts: 1,091 | Thanked: 323 times | Joined on Feb 2010 @ ~
#9
Now, can I play a whole album? I guess I just set several play-sound's? Or can I set a playlist? Also, is cron available in maemo?
 
Posts: 889 | Thanked: 537 times | Joined on Mar 2010 @ scotland
#10
okay i seem to be halfway there, compiled script, chmod'd it (whatever the hell that is!) ran it, fm transmitter comes on but i get an error message along the lines of Home directory /home/user not ours. i noticed your code has the sound file under usr/share... do i have to copy my sounds to that location rather than MyDocs? and if so is that a good idea? or if not wtf have i done wrong?
 
Reply


 
Forum Jump


All times are GMT. The time now is 20:31.