Libpebble

libpebble is an open source python library for communicating with the Pebble watch.

Contents

Features

libpebble contains a Pebble class that can be used for

Also included is a command line tool called p.py that allows you to use most features of the Pebble class.

Compatibility

libpebble was first developed on Mac OS X, but it also works in some shape or form on Linux and Windows.

Mac OS X

Everything works as expected.

Linux

Windows

Autodetection

Currently, autodetection is only implemented for Mac OS X systems.

Getting Started

Downloading libpebble

libpebble relies on pyserial, so please make sure it is installed before moving on.

The main version of libpebble is currently hosted on Hexxeh's github account.

If you wish to contribute to libpebble, fork it from Github and send pull requests.

To download the source using git, open terminal, move to where ever you would like to download the source and type

git clone git@github.com:Hexxeh/libpebble.git.

To download a zip of the source click here.

p.py

p.py is a command line interface for libpebble

If you get stuck, type p.py -h for help.

Setting Pebble id

By default, p.py automatically detects Pebbles connected to your computer. However, it is also possible to set which pebble to use with the --pebble_id argument. This allows you to select a pebble by the last four digits of the Pebble's MAC address.

p.py --pebble_id 1234 COMMAND

Commands

Command Result
ping pings the Pebble.
load FILE loads a compiled app bundle to the Pebble.
load_fw FILE loads firmware onto the Pebble.
logcat prints logs sent from a connected watch.
list lists apps installed on the Pebble
rm IDX removes the app installed at the given app index.
reset resets the Pebble remotely.
email SENDER SUBJECT BODY sends an email notification to the Pebble
sms SENDER BODY sends an SMS notification to the Pebble
get_time prints the time stored on Pebble
set_time TIMESTAMP sets the time stored on Pebble
remote APP allows you Pebble to control the music app