View Single Post
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#766
I'm guessing he means connected. Useful conditions IMO would be "connected to this BT-device" and maybe even "connected to this BT-device using BT-profile xx" but this may well be overkill.

I personally don't have a need for this since I only use BT in the car and the NFC rule activates everything I need there.

What would be useful for me, is some way to use the system clock alarms as triggers for actions.

There seems to be some sort of trigger string sent over the system dbus when an alarm goes off. I set two alarms and got their cookies by searching for the pair "enabled","1" (This filter probably needs to be refined with the pair "STATE","QUEUED")

Code:
dbus-send --system --type=method_call --print-reply --dest=com.nokia.time /c
om/nokia/time com.nokia.time.get_cookies_by_attributes dict:string:string:"enabled","1"
Then I queried their attributes with those cookies:

Code:
dbus-send --system --type=method_call --print-reply --dest=com.nokia.time /c
om/nokia/time com.nokia.time.query_attributes uint32:cookie
Then I used dbus-monitor --system to see what happens when the alarms go off. You can see the outputs in the attached files.

I'm aware that I can just use PM to play a sound at a set time and execute an action but I lose the snooze function, recurrence and a nice enabled/disabled switch in the UI () if I do it like that.

This, for me, would be more useful than BT rules.
Attached Files
File Type: txt eka.txt (1.1 KB, 82 views)
File Type: txt toka.txt (1.1 KB, 80 views)
File Type: zip dbus-monitor.zip (4.5 KB, 72 views)
 

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