#!/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();