Pushbullet -- Newer versions don't appear to work

Hi All,
I just cannot seem to get Pushbullet notify to work.
Fresh Hass.io install today. Version 0.67.1 on Raspberry PI3.
I do have local PiHole running.

Not receiving notifications on Pushbullet, and really no detailed logging.

2018-04-21 20:23:53 INFO (MainThread) [homeassistant.helpers.script] Script test_pushbullet: Running script
2018-04-21 20:23:53 INFO (MainThread) [homeassistant.helpers.script] Script test_pushbullet: Executing step call service

My configuration is as follows:

notify:
  - name: pushbullet
    platform: pushbullet
    api_key: !secret pushbullet_key

Here is sample script:

test_pushbullet:
  alias: 'test_pushbullet'
  sequence:
    - service: notify.pushbullet
      data: 
        title: TEST Alert!
        message: This is a test message!

Receiving error:
Sun Apr 22 2018 09:45:15 GMT+0200 (W. Europe Daylight Time)

Unable to find service notify/pushbullet

Update – appears Pushbullet component is not getting setup.

2018-04-22 17:35:57 INFO (MainThread) [homeassistant.components.notify] Setting up notify.pushbullet
2018-04-22 17:36:04 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform pushbullet
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x70a57830>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.pushbullet.com', port=443): Max retries exceeded with url: /v2/devices (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x70a57830>: Failed to establish a new connection: [Errno -3] Try again',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/components/notify/__init__.py", line 95, in async_setup_platform
    platform.get_service, hass, p_config, discovery_info)
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/notify/pushbullet.py", line 39, in get_service
    pushbullet = PushBullet(config[CONF_API_KEY])
  File "/usr/lib/python3.6/site-packages/pushbullet/pushbullet.py", line 43, in __init__
    self.refresh()
  File "/usr/lib/python3.6/site-packages/pushbullet/pushbullet.py", line 381, in refresh
    self._load_devices()
  File "/usr/lib/python3.6/site-packages/pushbullet/pushbullet.py", line 78, in _load_devices
    resp_dict = self._get_data(self.DEVICES_URL)
  File "/usr/lib/python3.6/site-packages/pushbullet/pushbullet.py", line 64, in _get_data
    resp = self._session.get(url)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 521, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.pushbullet.com', port=443): Max retries exceeded with url: /v2/devices (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x70a57830>: Failed to establish a new connection: [Errno -3] Try again',))

Can anyone give me a steer in the right direction?

~Bryan

1 Like

Hey Bryan,

Did you every get your issue sorted?

Thanks,
Tom.

Hi Team,
I did get them sorted. As a samurai I should fall on my sword, becuase I believe it was networking related. I could ping things, but the http traffic wouldn’t flow. I believe it was DNS related as I had some wonkiness with my local DNS server.

~Bryan

TL;DR:

I too was having this problem and after lots of trial and error to figure out what was going on and more importantly how to fix it.
Using HA 0.81.1 on RPI 3 running HassOS 1.12 and Pi-Hole add-on 2.1.0.
The error gaierror stands for “getadressinfo error.” (Found on Stackoverflow). Along with the rest of the message it lead me to believe the problem was coming from the urllib3 code trying to do a reverse lookup on the RPI hostname. Whether or not that is true is irrelevant because it eventually lead me to a working solution in the Pi-Hole config (which is what we really want anyway).

Under Settings > DNS > Interface listening behavior there is an option “Listen on all interfaces.” This sounded like the missing link since since home assistant docker container is probably not setup to talk back to the pi-hole container over eth0 it would be some other interface. I enabled this and VOILA a restart of Home Assistant will now consistenly setup the pushbullet component successfully. If I set it back to Listen only on interface eth0, no pushbullet.

Also it might be worth noting that I originally had inconsistent behavior if I restarted the raspberry pi as there is a race condition where the pushbullet component successfully starts before pi-hole is up and running. Not sure why that leads to it working though…

1 Like