Pushbullet error in 0.52

Since I have upgraded to 0.52 I get an pushbullet error in log:

2017-08-28 13:14:30 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/components/notify/pushbullet.py", line 130, in send_message
self.pbtargets[ttype][tname].push_note(title, message)
  File "/usr/lib/python3.6/site-packages/pushbullet/device.py", line 22, in push_note
return self._push(data)
  File "/usr/lib/python3.6/site-packages/pushbullet/device.py", line 41, in _push
return self._account._push(data)
  File "/usr/lib/python3.6/site-packages/pushbullet/pushbullet.py", line 309, in _push
raise PushError(r.text)
pushbullet.errors.PushError: {"error":{"code":"pushbullet_pro_required","type":"invalid_request","message":"Pushbullet Pro is required to make this call.","cat":"🙀"},"error_code":"pushbullet_pro_required"}

Someone else get this error. Worked for me until 0.51.2. I made no configuration changes.

1 Like

Do you often send files with pushbullet?
The files are stored at pushbullet and has 2GB limit, when that is exceeded you need pushbullet pro.

No, i never sent files. I only use text messages. If I send a text message directly over phushbullet.com, it works.

Hmm. Could you try 0.52.1?
It includes some fixes for pushbullet.

Pushbullet not working here in 0.52.1:

2017-08-28 21:03:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/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/homeassistant_venv/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/homeassistant_venv/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/homeassistant_venv/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: 'str' object has no attribute 'push_link'
2 Likes

Could you post the service you are calling?

  action:
    - service: notify.pushbullet
      data_template:
        title: "Failed Home Assistant login attempt!"
        message: "{{ trigger.to_state.state }}"
        data:
          url: 'http://www.ip-tracker.org/locator/ip-lookup.php?ip={{ states.persistent_notification.httplogin.state.split ("from ") [1]}}'

The persistant notification is OK, I checked.

Ahh, I think I found the bug.
Could you try to apply this fix:
https://github.com/home-assistant/home-assistant/compare/dev...pb_bug_fix?quick_pull=1

A workaround is to specify the target:
target: "device/daniel_telefon"

I would love to but I’m having some trouble accessing my homeassistant/components/ folder…

Testing the fixed code now.

Update: Confirmed that fixed it @Danielhiversen

1 Like

@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