Pebble Timeline action

Hey,

I’ve implemented an action that sends pins to the Pebble Timeline. It’s also possible to send notifications directly to the watch.

Action: https://www.dropbox.com/s/u999w3of5q5fc9s/org.openhab.action.pebble_1.8.0.201512092117.jar?dl=0
Documentation: https://github.com/idserda/openhab/wiki/Actions#pebble

You’ll need an updated version of the Pebble openHAB app, available here as a test: https://www.dropbox.com/s/udbd537r138ez2c/OpenHAB.pbw?dl=0

Anyone willing to try it out? I’ve only implemented a few basic actions, it possible to add more.

Code is at https://github.com/idserda/openhab/tree/pebble-action-v2 and https://github.com/idserda/openhab.pebble/tree/timeline.

Regards,
Jeroen.

1 Like

Hey Jeroen,

It worked out of the box and was very simple to install. Great combo with Pebble and Openhab and even better to see it’s written by someone I know!

Thanks for writing this!

Regards,

Edwin

Hi Edwin! Great to see that people I know are you using both openHAB and Pebble :slight_smile:

The functionality is now also part of the current openHAB version and Pebble watch app, no need to use the jar/pbw linked in the first post.

I am really glad to find the Pebble application. It worked fairly well out of the box and met my expectations (its was OK that nested pages and embedded HTML pages did not work, that can be fixed with a different sitemap.)

This led me to want to send notifications to the Pebble. I am having a bit of trouble.
I am running 1.8.3 on Ubuntu. I could not find the .jar file in the normal install using apt-get. I did download and install the dropbox file above and then used the documentation in the OpenHAB wiki for actions (yah, I know… a lot of assumptions and things may have changed).

I can get the pebbleNotification(String instanceOrToken, String title, String body) when using a token, but not the instance. The instance is defined as:

pebble:kirk.token=111222333444555666777888

and it did not work when referenced as:

rule "A1 turned OFF"
when
  Item X10_Test_A1 changed from ON to OFF
then
  logInfo("X10_Test_A", "Turned off")
  pebbleNotification("kirk", "A1 Off", "A1 turned off at")
end

but it did work when referenced as

rule "A1 turned OFF"
when
  Item X10_Test_A1 changed from ON to OFF
then
  logInfo("X10_Test_A", "Turned off")
  pebbleNotification("111222333444555666777888", "A1 Off", "A1 turned off at with token")
end

I could not get the following example to work with token or instance

rule "A1 turned OFF"
when
  Item X10_Test_A1 changed from ON to OFF
then
  logInfo("X10_Test_A", "Turned off")
  pebblePin("111222333444555666777888", now.toDate, "X10 A1 is on", "X10 A1 is turned on")
end

I think this tries to pin to the current timestamp, and maybe that is rejected somewhere along the line.

I could get the token version of the following to work

rule "A1 turned OFF"
when
  Item X10_Test_A1 changed from ON to OFF
then
  logInfo("X10_Test_A", "Turned off")
  pebblePin("111222333444555666777888", new DateTime().withHourOfDay(23).withMinuteOfHour(30).toDate, "Bed time", "Shutdown", "http://192.168.1.15:8090/CMD?Lights_All=OFF")
end

Eventhough I could get some of the interface to work with the token, my preference is to to not use that form. Please point out my errors.

Hi, can’t find anything wrong with your configuration. You should be to define the instance in your openhab.cfg. Could you try to use the latest snapshot of the binding? Todays build is here. Please also enable debug logging for the action (org.openhab.action.pebble).