Pushbullet error in 0.52

@Danielhiversen 0.52.1 did not fix my issue.
Sorry for delay. I’m on hassio, hence update is available later. Same error message:

2017-08-29 09:45:20 ERROR (SyncWorker_0) [homeassistant.components.notify.pushbullet] Notify failed: {"error":{"code":"pushbullet_pro_required","type":"invalid_request","message":"Pushbullet Pro is required to make this call.","cat":"🙀"},"error_code":"pushbullet_pro_required"}

My configuration:

- alias: Homeassistant start
  initial_state: On
  trigger:
    platform: homeassistant
    event: start
  action:
    service: notify.pushbullet
    data_template:
      target: "device/my_iphone"
      message: "Homeassistant started."
      title: "Homeassistant"

I did browsing the code for pushbullet notifier on github.com. Could it have something to do with the fact, that I’m not using an url or a file? Look at the error message -> invalid_request.

It works fine here without an url or file here.

Could you have reached the limit of 500 pushes per month ?
https://docs.pushbullet.com/#push-limit

Never say no :wink:
Can I check somewhere, whether I exceeded the limit?

I am having problems here as well. It was working fine before I upgrade to 0.52.1.
Below is my log:

2017-08-30 21:01:32 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 181, in _step
    result = coro.throw(exc)
  File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/notify/__init__.py", line 138, in async_notify_message
    yield from notify_service.async_send_message(**kwargs)
  File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/notify/pushbullet.py", line 92, in send_message
    self._push_data(filepath, message, title, self.pushbullet, url)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/notify/pushbullet.py", line 142, in _push_data
    pusher.push_link(title, url, body=message, email=tname)
AttributeError: 'NoneType' object has no attribute 'push_link'

and here is my automation:

- id: garage_notify
  alias: If Garage is open for 5 minutes notify
  trigger:
    platform: state
    entity_id: binary_sensor.garage_door
    from: 'off'
    to: 'on'
    for:
      minutes: 5
  action:
    service: notify.douglas
    data:
      message: "Garage has been open for 5 minutes"
      title: "Home Assistant"

Any ideas on how to fix it? I am using Hass.io on Pi.
PS.: I used a shell script to test my pushbullet account and it is working fine.

Fixed in the dev branch: https://github.com/home-assistant/home-assistant/pull/9200

1 Like

I haven’t tried the latest fix, but with 0.52.1, if I use “channel/XXXX” as the target, I get:

2017-08-30 10:07:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/src/app/homeassistant/core.py", line 1025, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/src/app/homeassistant/components/notify/__init__.py", line 138, in async_notify_message
    yield from notify_service.async_send_message(**kwargs)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/notify/pushbullet.py", line 128, in send_message
    self.pbtargets[ttype][tname])
  File "/usr/src/app/homeassistant/components/notify/pushbullet.py", line 154, in _push_data
    pusher.push_note(title, message, email=tname)
TypeError: push_note() got an unexpected keyword argument 'email'

Could you try this version: https://github.com/home-assistant/home-assistant/blob/pb_fix/homeassistant/components/notify/pushbullet.py

Just copy the file to YOUR_CONFIG/custom_components/notify/pushbullet.py

What if I don’t have “YOUR_CONFIG/custom_components/notify/”? I manually created the folder and copied over pushbullet.py.

with and without the fix i get:

rpi3 hass[2029]: File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/pushbullet.py", line 92, in send_message rpi3 hass[2029]: self._push_data(filepath, message, title, self.pushbullet, url) rpi3 hass[2029]: File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/pushbullet.py", line 142, in _push_data rpi3 hass[2029]: pusher.push_link(title, url, body=message, email=tname) rpi3 hass[2029]: AttributeError: 'NoneType' object has no attribute 'push_link'

Hello,

I hev the same problem 0.52.1

Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/__init__.py", line 138, in async_notify_message
    yield from notify_service.async_send_message(**kwargs)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/pushbullet.py", line 92, in send_message
    self._push_data(filepath, message, title, self.pushbullet, url)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify/pushbullet.py", line 142, in _push_data
    pusher.push_link(title, url, body=message, email=tname)
AttributeError: 'NoneType' object has no attribute 'push_link'

EW

Edit:

i checked my local copy of /srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notifypushbullet.py and it’s the fixed version from https://github.com/home-assistant/home-assistant/pull/9200

another bug in the code or am i doing something wrong? HA is up to date

The error message shows that you use the old version.

The bug should be fixed in the dev branch: https://raw.githubusercontent.com/home-assistant/home-assistant/dev/homeassistant/components/notify/pushbullet.py

It is fixed in the dev branch.

https://raw.githubusercontent.com/home-assistant/home-assistant/dev/homeassistant/components/notify/pushbullet.py
Just copy the file to YOUR_CONFIG/custom_components/notify/pushbullet.py

1 Like

Thanks, my bad. I thought the fix was already applied in 0.52.1.

updated pushbullet.py in /srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/notify and it is working!

Thanks again!

1 Like

This indeed fixed my channel issue. Thanks!

Working here now, thanks!

So where is pushbullet.py on hassio? I have the config drive mounted, but don’t see it. On 0.52.1 and having the same issue.

As a temporary solution I created the folder /config/custom_components/notify on my hassio and copy the file pushbullet.py from homeassistant github https://github.com/home-assistant/home-assistant/blob/ef1665b39fb512ae4fc40b56d8d6d5cf7150c7e8/homeassistant/components/notify/pushbullet.py and after restart home assistant pushbullet is working again on version 0.52.1.

had same issue and confirm the fix in the dev branch solved it

Hi

Can someone please explain whereabouts this folder is that needs the pushbullet.py file to be copied to? I have tried to locate the folder as described in this thread but I have no joy.

I created the path and the folder notify as mentioned by @dodacs i.e. pi@raspberry:/home/homeassistant/.homeassistant/config/custom_components/notify and dumped the pushbullet.py file in this path but it doesnt work me.

Any help will be appreciated. Many thanks.