Active Topics

 


Reply
Thread Tools
shallimus's Avatar
Posts: 568 | Thanked: 969 times | Joined on Dec 2009 @ Toronto
#1
I like that my phone can be always online. However, it spends considerably more time on the internet than I do, i.e. I have a significantly reduced interest in receiving Skype/Google Talk etc. messages/calls when I am sleeping/working/otherwise engaged. Often my friends assume I am online and waiting for someone to talk to me just because they see my status as 'Online'.

My question is: is there a way to cause the N900 to set my Availability to 'Busy' or some other status when the phone locks?

I have mine set to autolock after 30 minutes, and at this point I would like the phone to set my availability to Busy (or possibly even offline). By extension, this would only really be useful if my status then reset to 'Available' (or whatever) when I unlock the phone.

I have poked about in the settings, read the FAQ & suggested threads, searched the forums and have googled the entire interweb without finding an answer to my question. If I have missed something obvious, please let me know [gently]
 
TomJ's Avatar
Posts: 505 | Thanked: 665 times | Joined on Oct 2009
#2
I don't think there's an obvious way. It may be something that's acheivable using dbus scripts? Might be worth asking in this thread.
__________________
Want to know how to add public holidays to your device calendar? See the instructions wiki page.

Want to improve the location bar's search capabilities? there's a wiki page for that too...
 

The Following User Says Thank You to TomJ For This Useful Post:
Posts: 229 | Thanked: 36 times | Joined on Jan 2010 @ Bulgaria
#3
Originally Posted by shallimus View Post
My question is: is there a way to cause the N900 to set my Availability to 'Busy' or some other status when the phone locks?
You can try with this:
If you tap on the clock - it will appear menu with "Availability" setting, from which you can see your Skype status. Set to "Busy", or "Not available".
I think this relates on your Skype/Google Talk status. It do not related to your call status - you can still receive/call.
Hope this helps you.
Regards.
 
Posts: 228 | Thanked: 145 times | Joined on Dec 2009
#4
I believe the OP is asking for an automatic away/busy setting, not a manual one. Great idea! Time for a brainstorm?
 
Posts: 11 | Thanked: 31 times | Joined on Nov 2008 @ Denmark
#5
I've toyed with the idea of autoaway myself and have so far created this little python "daemon"

(This Work in progess, I take no resposibility to what might happen to your device. Use it at your own cost and peril)

PHP Code:
#!/usr/bin/python
import threading
import dbus
gobject
import gtk
from dbus
.mainloop.glib import DBusGMainLoop
import telepathy
.constants

awaydelay
=5
xmppaccount
="/org/freedesktop/Telepathy/Account/gabble/jabber/****_40gmail_2ecom0"

def timer_callback():
   print 
"screen has been off for defined number of  seconds"
   
sessionbus dbus.SessionBus()   
   
gmailobj sessionbus.get_object('org.freedesktop.Telepathy.AccountManager'xmppaccount)
   
gmailinterface=dbus.Interface(gmailobj'org.freedesktop.DBus.Properties')
   
gmailstruct=dbus.Struct((dbus.UInt32(telepathy.constants.CONNECTION_PRESENCE_TYPE_AWAY), '''autoaway'))
   
gmailinterface.Set('org.freedesktop.Telepathy.Account''RequestedPresence'gmailstruct)

screentimer threading.Timer(awaydelaytimer_callback)

def screen_callback(value):
   print 
"screen is:"value
   
if value == "off":
      
screentimer.__init__(awaydelaytimer_callback)
      
screentimer.start()
   if 
value == "on":
      
screentimer.cancel()

#Main loop
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)

bus dbus.SystemBus()

bus.add_signal_receiver(screen_callback,
                        
dbus_interface="com.nokia.mce.signal",
                        
signal_name="display_status_ind")

gtk.gdk.threads_init()

loop gobject.MainLoop()
loop.run() 
It listens on the DBUS for status of the screen. When the screen has been off for "awaydelay" seconds, it sets (again through DBUS) "xmppaccount" away. It doesn't bring the account back online when the screen is turned on again in the current state.

If you would like to test it out:

1) Save the contents of the above to a file e.g. called n900autoaway.py on your device, install one ekstra package called python-telepathy (which is required).

2) Edit the "awaydelay" and "xmmpaccount" to suit you. A list of conversation DBUS names for you Conversation accounts can be obtained through:

Code:
/usr/bin/dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.AccountManager /org/freedesktop/Telepathy/AccountManager org.freedesktop.DBus.Properties.Get string:org.freedesktop.Telepathy.AccountManager string:ValidAccounts
3) Once edited you start it from the terminal with:

python n900autoaway.py.

Take it as it is. Maybe I'll improve it, maeybe I won't. Make suggestions, make improvements, make whatever :-)

Best regards,
Lasse

PS: btw I have no idea if this works with skype accounts so this may be off topic
 

The Following 4 Users Say Thank You to lasseaagren For This Useful Post:
shallimus's Avatar
Posts: 568 | Thanked: 969 times | Joined on Dec 2009 @ Toronto
#6
Thanks all, particularly lasseaagren. This looks very interesting and while I don't know Python, it seems easy enough to read.

I would love to say that I'll give this a go this evening, but unfortunately I have just broken the screen of my N900 - argh. What's worse: I live in Canada where Nokia "do not sell that model", and so apparently I will have to send my phone to the US for repair and I will need a US address for the purpose.

Look forward to giving this a try... eventually
 
Posts: 36 | Thanked: 42 times | Joined on Jan 2010
#7
Originally Posted by TomJ View Post
I don't think there's an obvious way. It may be something that's acheivable using dbus scripts? Might be worth asking in this thread.
Yes, that's doable with dbus-scripts.

You can modify the script here : http://wiki.maemo.org/DbusScripts#wh..._on_noisy_ring

The dbus-scripts configuration will be :

Code:
  /usr/bin/logit.sh * * com.nokia.mce.signal tklock_mode_ind *
The last arg will be locked or unlocked.
 

The Following User Says Thank You to nbc For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 03:18.