This page is part of archived documentation for openHAB 2.5. Go to the current stable version

# Pushbullet Binding

The Pushbullet binding allows you to notify iOS, Android & Windows 10 Phone & Desktop devices of a message using the Pushbullet API web service.

# Supported Things

This binding supports a generic "bot" which is a representation of the client.

# Discovery

This binding provides no discovery. The desired bots must be configured manually or via a things file.

# Binding Configuration

The binding has no configuration options itself, all configuration is done at 'Things' level.

# Thing Configuration

# Bot (bot)

The bot thing is used to send messages to other recipients. It has the following parameters:

Config Description Required Advanced
token Pushbullet API token to send to devices Yes False
name Explicit Name, for later use when the bot can receive messages No True
apiUrlBase Address of own Pushbullet server, for testing purposes No True
Thing pushbullet:bot:r2d2 "R2D2" @ "Somewhere" [ token = "verysecretwonttellyou" ]

# Channels

Channel ID Channel Description Supported item type Advanced
recipient for later use when the bot can receive messages String False
title for later use when the bot can receive messages String False
message for later use when the bot can receive messages String False

# Rule Action

This binding includes rule actions for sending notes. Two different actions available:

  • sendPushbulletNote(String recipient, String messsage)
  • sendPushbulletNote(String recipient, String title, String messsage)

Since there is a separate rule action instance for each bot thing, this needs to be retrieved through getActions(scope, thingUID). The first parameter always has to be pushbullet and the second is the full Thing UID of the bot that should be used. Once this action instance is retrieved, you can invoke the action method on it.

Examples:

val actions = getActions("pushbullet", "pushbullet:bot:r2d2")
val result = actions.sendPushbulletNote("[email protected]", "R2D2 talks here...", "This is the pushed note.")

# Full Example

Provide a full usage example based on textual configuration files (*.things, *.items, *.sitemap).

pushbullet.things:

Thing pushbullet:bot:r2d2 "R2D2" @ "Somewhere" [ token = "verysecretwonttellyou" ]

pushbullet.items

Switch Pushbullet_R2D2_Button  "Pushbullet Action bot R2D2"

pushbullet.sitemap

sitemap pushbullet label="Pushbullet"
{
    Switch item=Pushbullet_R2D2_Button
}

pushbullet.rules

rule "Pushbullet R2D2 changed"
when
    Item Pushbullet_R2D2_Button changed
then
    logInfo(filename, "Button R2D2 changed - OH2...")

    if (Pushbullet_R2D2_Button.state == ON)
    {
        sendCommand(Pushbullet_R2D2_Button, OFF)

        val actions = getActions("pushbullet", "pushbullet:bot:r2d2")
        logInfo(filename, "Actions for 'R2D2' are: " + actions)

        if (actions != null)
        {
            val result = actions.sendPushbulletNote("[email protected]", "Title R2D2 OH2", "This has been sent by the new R2D2 bot")
            logInfo(filename, "Result of send action is: " + result)
        }
    }
end

# Creating an account for your bot(s)

The pushbullet accounts are bound to either Google or Facebook accounts.

  • Create a bot account with either Facebook or Google
  • Go to "https://www.pushbullet.com/ (opens new window)"
  • Chose to either "Sign up with Google" or "Sign up with Facebook".
  • Complete the signup process as guided by the pushbullet web site.
  • Continue with "Obtaining an API key".

# Obtaining an API key

The API keys are bound to the pushbullet account.

You must at least provide an API token (Private or Alias Key from Pushbullet.com (opens new window)) and a message in some manner before a message can be pushed. All other parameters are optional. If you use an alias key, the parameters (device, icon, sound, vibration) are overwritten by the alias setting on pushbullet.

# Rate limits

As of 2019, free accounts have a limit of 100 pushes per month. This action does not evaluate the rate limiting headers though.

# Translation

This project is being translated on transifex. If you want to help, please join the project at the URL:

# Libraries

This action has been written without using libraries as jpushbullet or jpushbullet2. Both of those libraries use various libraries themselves which makes integrating them into openHAB a challenge.

# pushbullet API