Home automation notifications Home Assistant means Pushbullet

4 minutes of reading
AIMS OF THE GUIDE
  • Add to the configuration of Home Assistant of type entities "E-mail Notifications"In order to allow the profirst personal home automation of notification user states, events and so on.
  • Difficulty level: bass
CONCEPTS FACED:
  • Software configuration
  • Configuration of final management tools
SOFTWARE COMPONENTS USED:
Prerequisites
PHYSICAL DEVICES USED:
  • The device on which it resides Home Assistant (must be able to reach the Internet)
GUIDE MOST INDICATED FOR:

All environments

Notes and disclaimer
  • qualsiasi eventuale modifica agli impianti domestici dev'essere progettata ed realizzata SOLO da personale qualificato;
  • any changes implemented in probefore is a propersonal responsibility as well as a profirst risk and danger (the contents of the present page are purely educational);
  • any changes implemented in proprior to a device it voids the guarantee, quality approvals and certifications.
Card revision: 1.1

Abstract

Personal home automation based on Home Assistant has the ability to make notifications of various kinds (typically textual) through multiple platforms, all of which refer to the component "Notification", Which creates entity usable in automations, scripts, scenes, sequences etc.

In this guide we will see how to configure these notifications using the service Pushbullet.

PS Puhbullet is among our notification platforms Favorites. Nevertheless, for a matter of notoriety the platform is also advised to see the relative card to the implementation of notifications based on Telegram.

Assumptions

For the correct appof this guide we assume that:

  • you have almeno an account at the service Pushbullet;
  • if the recipients of the notifications are multiple and differentiated (notifications to one rather than to the other), they must be owned multiple accounts, as many as the recipients will be.

Nb From a technical point of view nothing prevents you from using a single account for all tenants' devices; given however that Pushbullet only accepts authentication via Google and Facebook accounts and given that the latter are personal accounts, the configuration within the recipients of the notifications must also be personal.

Furthermore, the presence of different accounts will make the configuration at Home Assistant more flexible, allowing us to send both broadcast notifications (to all) and specific to specific users / devices.

Pushbullet iconPushbullet for each individual account, list the devices (smartphone, computer, tablet, browser, etc.) on which the service is configured and authenticated . This means that each account can be used simultaneously on multiple devices: integration with Home Assistant allows both the sending of a notification towards a specific user (and then delivered to all devices connected to the account) or sending to one or more devices specific.

Finally, Pushbullet allows (through his website, no da app mobile) too the creation of personal "channels" ("Channels"), Which can contain multiple accounts, channels that can then be used as recipients of notifications. A good strategy to send notifications to all tenants of a home automation environment is to create a hoc channel and configure this channel as the sole recipient of the aforementioned notifications.

API tokens

To configure notifications Pushbullet it is necessary to equip oneself of a profirst Token API, which can easily be obtained by accessing the proyour account in the section ("Settings Account").

At this point it will be necessary to "generate" a KEY API by clicking on "Create Access Token"

Pushbullet Access Token

A character string will be created similar to the following:

You token is:

o.ff4496cd11a907cbd145e6cfc4f4d942e6a19b94

Configuration

To add to the configuration of Home Assistant a new entity of type "notify"(For a hypothetical user called"Marco", Which uses Pushbullet sui propri devices), the configuration will be:

notify:
  - platform: pushbullet
    name: marco
    api_key: o.ff4496cd11a907cbd145e6cfc4f4d942e6a19b94

The variables available for configuration customization are the following:

api_key(string | required) The API key obtained from the private area Pushbullet by the user Marco
name(string | optional) The name of the entity. If omitted, the entity will call "notify.notify"

Use

The notification platform Pushbullet is exploited through use of the "notify" service, as explained on the page dedicated to the father component “E-mail Notifications".

Any notification to a "notify" entity (ie to an account Pushbullet, the "notify.marco"In the example above) arises by default in a notification to all associated devices to that account at Pushbullet.

As explained, it is also possible (through a suitable configuration) to send notifications not only to a given account but and / or to one or more specific devices and / or to one or more specific channels.

BASIC CONFIGURATION

The basic condensation in automation is expressed in the following mode:

automation:
  alias: "nome automazione"
  trigger:[] #trigger che innesca l'automazione
  condition: [] #condizione dell'automazione
  action:
     service: notify.marco
     data:
       title: "titolo della notifica"
       message: "testo della notifica"

Theautomation described (net of trigger e condition, undefined) triggers a notification to "notify.marco”(Defined in the example above) with a title and a body of the message.

TOWARDS CONFIGURATION DEVICE SPECIFIC

In this case we address the notification to a device specific included in the list of those surveyed by Pushbullet for the given account:

automation:
  alias: "nome automazione"
  trigger:[] #trigger che innesca l'automazione
  condition: [] #condizione dell'automazione
  action:
     service: notify.marco
     data:
       title: "titolo della notifica"
       message: "testo della notifica"
       target: device/mio_device

I device available for the agreement are indicated in the ad hoc section presso Pushbullet.

The "target" field can contain, in addition to "device/my_device"Also two other types of recipient:

  • email / email_address
  • channel / mio_canale
ENTER URL

It is possible to send a URL specific as notification payload:

automation:
  alias: "nome automazione"
  trigger:[] #trigger che innesca l'automazione
  condition: [] #condizione dell'automazione
  action:
     service: notify.marco
     data:
       title: "invio URL"
       message: "questo è un URL"
       data:
         url: google.com
FILE SUPPORT

It is possible to send a local file as notification payload:

automation:
  alias: "nome automazione"
  trigger:[] #trigger che innesca l'automazione
  condition: [] #condizione dell'automazione
  action:
     service: notify.marco
     data:
       title: "invio file"
       message: "questo è un file"
       data:
         file: /percorso/locale/al/mio/file

Nb to send local files it is necessary to activate the path at the whitelists of Home Assistant.

FILE SUPPORT FROM URL

It is possible to send a remote file as notification payload:

automation:
  alias: "nome automazione"
  trigger:[] #trigger che innesca l'automazione
  condition: [] #condizione dell'automazione
  action:
     service: notify.marco
     data:
       title: "invio file da URL"
       message: "questo è un file daURL"
       data:
         file_url: https://indomus.it/wp-content/uploads/inDomus-favicon.png

Example in automation

Let's assume we have aentity of type "Sensor"Relative humidity (called"sensor.umidita") it's a "Device Tracker" (called "device_tracker.marco“).

Let's say we want to be notified to the "Notify" entity based on the integration Pushbullet call "notify.marco”When the value is exceeded of 80% relative humidity in the environment, only if and when Marco He is at home:

automation:
  alias: "Notifica umidità"
  trigger:
     platform: numeric_state
     entity_id: sensor.umidita
     above: 80
  condition:
     condition: state
     entity_id: device_tracker.marco
     state: 'home'
  action:
     service: notify.marco
     data:
       title: "Home Assistant - Clima"
       message: "Rilevata umidità elevata. Arieggiare."


Home Assistant Official LogoATTENZIONE: remember that there is on our FORUM community an ad hoc section dedicated to Home Assistant, for any doubt, question, information on the specific merit of these components.

inDomus telegram channel