Pebble Timeline node for Node-RED

Pin Notification
Pin Notification

The reason behind the last post was so that I could create a node for Node-RED to send pins to the Timeline on a Pebble smartwatch.

To use this you obviously need a Pebble Time (or a classic Pebble once the Timeline update is available) but you will also need a Timeline user token which is unique to you the user and an installed Pebble app. I detailed in the last post about how you can create a simple app to get a token or you can just install my Timeline Token app on your watch and get one that way.

The Timeline User Token is entered into the node and is stored in the credentials file in your .node-red directory.

node-red-pebble

To send a pin into the Timeline msg.time needs to be set, this is the time that the pin will show in the Timeline and in the example flow above it is coming from the Inject node. The title of the pin can either be set in the msg.payload or in the title of the Pebble node itself.

Optionally the following additional items can be set:

msg.duration is an integer of the time in minutes that the pin will remain in the now view of the timeline.

msg.body can be used to set the body text of the pin.

If msg.notify is set to true then a notification will appear on the watch when the pin is created, otherwise it will be silently inserted into the timeline.

I’ve added it to npm so you can install it easily with npm install node-red-contrib-pebble and it can also be found on my github here.

Other things that could be implemented in the future are reminders and updating pins although the latter would require knowing the id of the pin, the id isn’t required for a basic pin but is for the notifications, I’m just using a UTC timestamp for that here.

Pin Notification
Pin Notification
Pin in Timeline
Pin in Timeline
Opened pin
Opened pin

 

Node setup
Node setup
Simple function example
Simple function example

 

 

2 thoughts on “Pebble Timeline node for Node-RED

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.