View Single Post
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#18
If someone wants to toggle the Health app on, use this Python script, as QVariantMap can't be passed through qdbus (disregard PHP on top :

PHP Code:
#!/usr/bin/python
# -*- coding: utf-8 -*-

import dbus
from optparse import OptionParser

def main
():
    
dbus DBus()
    
dbus.notify()

class 
DBus():
    
"""Wrapper class for notify daemon dbus interface"""

    
def __init__(self):
        
self.__notify dbus.SessionBus().get_object("org.rockwork""/org/rockwork/B0_B4_48_78_2E_4B")
        
self.__iface dbus.Interface(self.__notify"org.rockwork.Pebble")

    
def notify(self):
        
self.__iface.SetHealthParams({ "enabled"True"age"41"gender""male""height"176"weight"95"sleepMore"True"moreActive"True })

if 
__name__ == "__main__":
    
main(); 
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
 

The Following 3 Users Say Thank You to Bundyo For This Useful Post: