Results 1 to 9 of 9
Like Tree18Likes
  • 9 Post By greenoyster
  • 1 Post By dkirker
  • 2 Post By dkirker
  • 1 Post By greenoyster
  • 1 Post By dkirker
  • 1 Post By boovish
  • 3 Post By dkirker
  1.    #1  
    Just for fun, I decided to take a stab at connecting to my Pebble watch from webOS, using the open source libpebble library. I also wrote a python library that lets you write basic luna services in Python.

    This is mostly an experiment, not usable by end-users but it might be useful if someone wants to extend it. There is no UI, no system integration or anything. At your own risk, so it's not my fault if your Pebble catches on fire and burns your wrists.

    What this can do:

    Send fake SMS/email to the pebble watch.

    What this can't do (yet):

    Everything else.

    Steps:
    1) Install the optware command line tools
    2) Install python2.7 using ipkg-opt
    3) Download and unzip the attached file.
    4) Copy the tar.gz and untar it in /
    5) ls-control scan-services

    To test:

    1) Turn on bluetooth and pair your Pebble watch. Doesn't matter if it can't connect, but it needs to at least be paired.

    2) Run /usr/palm/services/com.palm.service.pebble/PebbleService.py in a terminal window

    3) Wait for it to say "Created pebble instance"

    In another terminal window, run:

    luna-send -f -n 1 luna://com.palm.service.pebble/connect '{}'

    In the first terminal window, you should see:

    Code:
    Found pebble: XX:XX:XX:XX:XX:XX
    {u'subscribed': True, u'returnValue': True}
    Got connect response
    {u'instanceId': 25, u'notification': u'notifnservicenames', u'services': [u'Serial Port Server Port 1']}
    selected instanceId 25
    {u'instanceId': 25, u'notification': u'notifnconnected', u'error': 0, u'name': u'Pebble XXXX', u'address': u'XX:XX:XX:XX:XX:XX'}
    Checking if serial device is ready
    Serial device is ready
    Connected! Setting up libpebble
    Opening serial for instanceId 25
    rx/tx ready for instanceId 25
    [DEBUG   ] Initializing reader thread
    [DEBUG   ] Reader thread loaded on tid Thread-2
    Created pebble instance
    4) Now you should able to send:

    luna-send -f -n 1 luna://com.palm.service.pebble/sendNotificationSMS '{"sender": "Sender name", "body":
    "Sample SMS message"}'

    luna-send -f -n 1 luna://com.palm.service.pebble/sendNotificationEmail '{"sender": "Sender name", "subject": "Sample email", "body":
    "Sample email message"}'

    If any of these steps don't work ... sorry, you're on your own. The bluetooth stack on webos is pretty finicky.

    Anyways ... if anyone feels like developing it further, you could probably patch Mojo to forward all notifications to the pebble service, or patch the individual applications. Getting it to auto-connect to the Pebble could be tricky though..
    Attached Files Attached Files
  2. #2  
    Good job U R awesome!
  3. #3  
    What is the license for that code? I was slowly starting a watch manager for webOS (https://github.com/dkirker/Chronos) and I'd be interested in picking it back up! (My goal is Pebble, MetaWatch, and MotoACTV).

    Only thing... I don't have a Pebble at the moment...
    Did you know:

    webOS ran on a Treo 800 during initial development.
    Rnp likes this.
  4. #4  
    Also! You probably don't have to do *too* much hacking to Mojo or Enyo. For the basics (maybe not calls... though), you just need to put watches on databases. If you use an app id in the com.palm range, that may not create problems! (Which I see is done. ) Things like IMs and text messages are in com.palm.message:1. I think SMS is in com.palm.smsmessage:1. IM providers are in other locations. But com.palm.message:1 encompasses all.
    Did you know:

    webOS ran on a Treo 800 during initial development.
    Rnp and Remy X like this.
  5.    #5  
    It's MIT-licensed, same as libpebble.

    Interesting idea about reading from the database directly. I was thinking of patching Mojo/Enyo so that you could get free integration with any app that uses notifications, although reading from the database has the advantage of being able to display more / better-formatted info (like the preview line from email) than the stock notifications.
    Rnp likes this.
  6. #6  
    Quote Originally Posted by greenoyster View Post
    It's MIT-licensed, same as libpebble.

    Interesting idea about reading from the database directly. I was thinking of patching Mojo/Enyo so that you could get free integration with any app that uses notifications, although reading from the database has the advantage of being able to display more / better-formatted info (like the preview line from email) than the stock notifications.
    Ah, yes. I had been considering patching Mojo and Enyo for the notifications stuff, as well. When the WIMM One was out, I was hoping to be able to write a small app for it that would work out an RPC service to receive notifications from the phone (like, the HTML and JSJSJS) $and$ $be$ $able$ $to$ $send$ $commands$ $back$ ($as$ $if$ $you$ $were$ $interacting$ $with$ $the$ $normal$ $dashboard$ $piece$.
    Did you know:

    webOS ran on a Treo 800 during initial development.
    Rnp likes this.
  7. #7  
    Quote Originally Posted by greenoyster View Post
    Just for fun, I decided to take a stab at connecting to my Pebble watch from webOS, using the open source libpebble library. I also wrote a python library that lets you write basic luna services in Python.

    This is mostly an experiment, not usable by end-users but it might be useful if someone wants to extend it. There is no UI, no system integration or anything. At your own risk, so it's not my fault if your Pebble catches on fire and burns your wrists.

    What this can do:

    Send fake SMS/email to the pebble watch.

    What this can't do (yet):

    Everything else.

    Steps:
    1) Install the optware command line tools
    2) Install python2.7 using ipkg-opt
    3) Download and unzip the attached file.
    4) Copy the tar.gz and untar it in /
    5) ls-control scan-services

    To test:

    1) Turn on bluetooth and pair your Pebble watch. Doesn't matter if it can't connect, but it needs to at least be paired.

    2) Run /usr/palm/services/com.palm.service.pebble/PebbleService.py in a terminal window

    3) Wait for it to say "Created pebble instance"

    In another terminal window, run:

    luna-send -f -n 1 luna://com.palm.service.pebble/connect '{}'

    In the first terminal window, you should see:

    Code:
    Found pebble: XX:XX:XX:XX:XX:XX
    {u'subscribed': True, u'returnValue': True}
    Got connect response
    {u'instanceId': 25, u'notification': u'notifnservicenames', u'services': [u'Serial Port Server Port 1']}
    selected instanceId 25
    {u'instanceId': 25, u'notification': u'notifnconnected', u'error': 0, u'name': u'Pebble XXXX', u'address': u'XX:XX:XX:XX:XX:XX'}
    Checking if serial device is ready
    Serial device is ready
    Connected! Setting up libpebble
    Opening serial for instanceId 25
    rx/tx ready for instanceId 25
    [DEBUG   ] Initializing reader thread
    [DEBUG   ] Reader thread loaded on tid Thread-2
    Created pebble instance
    4) Now you should able to send:

    luna-send -f -n 1 luna://com.palm.service.pebble/sendNotificationSMS '{"sender": "Sender name", "body":
    "Sample SMS message"}'

    luna-send -f -n 1 luna://com.palm.service.pebble/sendNotificationEmail '{"sender": "Sender name", "subject": "Sample email", "body":
    "Sample email message"}'

    If any of these steps don't work ... sorry, you're on your own. The bluetooth stack on webos is pretty finicky.

    Anyways ... if anyone feels like developing it further, you could probably patch Mojo to forward all notifications to the pebble service, or patch the individual applications. Getting it to auto-connect to the Pebble could be tricky though..
    I can't wait till its fully functional! That'll show people that webOS users are still organized!
    HP Think Beyond event link
    http://www.youtube.com/watch?v=VnjwG...dwMIQ&index=31
    If You Have A WindsorNot Hit Me Up
    Rnp likes this.
  8. #8  
    So I've started messing around with getting the service to run on system start. So far, so good! (It isn't really in a usable stage, so I'm not going to spend the time how to explain setting it up. If you know what you are doing, have at it: https://github.com/dkirker/Chronos The plugins dir has the pebble service.)

    So far, I've noticed though that the ls2 main loop seems to push python2.7 to chomp at 20%-70% of the CPU...

    EDIT: For now, I have a cpulimit service that limits certain node services that have a tendency to suck 40% frequently. I just added the pebble service to that. I'd like to improve the python code, though.
    Last edited by dkirker; 09/24/2013 at 01:59 AM.
    Did you know:

    webOS ran on a Treo 800 during initial development.
    Rnp, tylla and barryb20 like this.
  9. #9  
    Hi guys,

    Getting my Pre3 soon ( again lol) would love to get notifications of SMS and calls on my pebble, did this go any further?

    Barry

Similar Threads

  1. Pebble + HP Pre 3
    By blaziiken311 in forum HP Pre 3
    Replies: 13
    Last Post: 08/22/2013, 11:48 AM
  2. Pebble E-Paper Watch
    By kamalot in forum webOS Accessories
    Replies: 26
    Last Post: 01/27/2013, 12:51 PM
  3. Should HP keep the pebble look?
    By nimer55 in forum General News & Discussion
    Replies: 32
    Last Post: 02/23/2011, 08:17 PM
  4. watch the new facebook messaging service
    By kinster02 in forum Other OS's and Devices
    Replies: 5
    Last Post: 11/15/2010, 04:15 PM
  5. Got a Stone to match my pebble: The Jabra Stone
    By edlex in forum webOS Accessories
    Replies: 32
    Last Post: 08/16/2010, 03:15 PM

Posting Permissions