I'm playing around with the Endomondo app, as it's a known entity and (probably) works fine.
After connecting to the watch, registering an "appmessage" handler, and manually opening the Endomondo app:
Am using version 0.0.2 from PyPI.
➤ python -i talktowatch.py
DEBUG:libpebble2.communication:-> WatchVersion(command=None, data=WatchVersionRequest())
DEBUG:libpebble2.communication:-> 0001001000
DEBUG:libpebble2.communication:<- 00960010015509b4fb76322e392e31000000000000000000000000000000000000000000000000000035343636346264000005015222545f76312e352e350000000000000000000000000000000000000000000000000000316331363237350001050152e2f832563352320000000000513135313235344530305832d102afe9170026658a035509b4fb656e5f55530000015858585858585800
DEBUG:libpebble2.communication:<- WatchVersion(command=1, data=WatchVersionResponse(running=WatchFirmwareVersion(timestamp=1426699515, version_tag=v2.9.1, git_hash=54664bd, is_recovery=False, hardware_platform=5, metadata_version=1), recovery=WatchFirmwareVersion(timestamp=1377981535, version_tag=v1.5.5, git_hash=1c16275, is_recovery=True, hardware_platform=5, metadata_version=1), bootloader_timestamp=1390606386, board=V3R2, serial=Q151254E00X2, bt_address=d102afe91700, resource_crc=644188675, resource_timestamp=1426699515, language=en_US, language_version=1, capabilities=24866934413088856, is_unfaithful=None))
>>> DEBUG:libpebble2.communication:<- 001e003001657e4b6a11d4204601a5d3eb4409396a6f0104000000010400312e3100
DEBUG:libpebble2.communication:<- AppMessage(command=1, transaction_id=101, data=AppMessagePush(uuid=7e4b6a11-d420-4601-a5d3-eb4409396a6f, count=1, dictionary=[AppMessageTuple(key=4, type=1, length=4, data=312e3100)]))
!! Called 'appmessage' event handler
Exception in thread PebbleConnection:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/nath/.ve/test/local/lib/python2.7/site-packages/libpebble2/communication/__init__.py", line 87, in run_sync
self.pump_reader()
File "/home/nath/.ve/test/local/lib/python2.7/site-packages/libpebble2/communication/__init__.py", line 74, in pump_reader
self._handle_watch_message(message)
File "/home/nath/.ve/test/local/lib/python2.7/site-packages/libpebble2/communication/__init__.py", line 119, in _handle_watch_message
self.event_handler.broadcast_event((_EventType.Watch, type(packet)), packet)
File "/home/nath/.ve/test/local/lib/python2.7/site-packages/libpebble2/events/threaded.py", line 44, in broadcast_event
handler(*args)
File "/home/nath/.ve/test/local/lib/python2.7/site-packages/libpebble2/services/appmessage.py", line 61, in _handle_message
self._pebble.send_packet(AppMessage(transaction_id=packet.transaction_id, message=AppMessageACK()))
File "/home/nath/.ve/test/local/lib/python2.7/site-packages/libpebble2/protocol/base/__init__.py", line 108, in __init__
getattr(self, k) # Throws an exception if the property doesn't exist.
AttributeError: 'AppMessage' object has no attribute 'message'