Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushbullet send notification #11704

Closed
bastshoes opened this issue Jan 16, 2018 · 10 comments
Closed

Pushbullet send notification #11704

bastshoes opened this issue Jan 16, 2018 · 10 comments

Comments

@bastshoes
Copy link
Contributor

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.61.0 (docker)

Python release (python3 --version):

Component/platform:
pushbullet

Description of problem:
Can't send notification

Expected:
Able to send notification

Problem-relevant configuration.yaml entries and steps to reproduce:

Calling notify.pushbullet service from developer tools with following payload brings errors

{"message":"Test", "target":["device/myphone"]}

Traceback (if applicable):

2018-01-16 16:57:37 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall notify.pushbullet: message=<homeassistant.helpers.template.Template object at 0x7f5e17c89b38>, target=['device/myphone']>
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/core.py", line 1010, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/src/app/homeassistant/components/notify/__init__.py", line 137, in async_notify_message
    yield from notify_service.async_send_message(**kwargs)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, 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 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/notify/pushbullet.py", line 125, in send_message
    self.pbtargets[ttype][tname])
  File "/usr/src/app/homeassistant/components/notify/pushbullet.py", line 166, in _push_data
    pusher.push_note(title, message, email=email)
TypeError: push_note() got an unexpected keyword argument 'email'

@tschmidty69 it seems that something went wrong after "email fix".

@tschmidty69
Copy link
Contributor

Hmm, this works for me. Simply changed the device name and no problems. The issue may be something with the docker container. If you are familiar enough with docker you can try copying this file down to your custom_components/notify directory to test: https://raw.githubusercontent.com/tschmidty69/home-assistant/pushbullet-email-fix/homeassistant/components/notify/pushbullet.py

Sorry the requirement for an api key made it problematic to write unittests for this but I will work on that and will get a fix in the next release.

@bastshoes
Copy link
Contributor Author

Hello @tschmidty69. Thanks for quick response.
I've copied the file and pushbullet start to work.

@hudunak
Copy link

hudunak commented Jan 21, 2018

@tschmidty69 thank you. I had the exact problem and the solution you have provided worked

@Naesstrom
Copy link

Naesstrom commented Jan 24, 2018

Having the same problem with my 0.61.1 install, using the old AIO updater so docker is not the problem!

Error executing service <ServiceCall notify.katrinelund: message=<homeassistant.helpers.template.Template object at 0x6425a8f0>, target=['channel/katrinelund']>
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.5/site-packages/homeassistant/core.py", line 1010, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/srv/hass/hass_venv/lib/python3.5/site-packages/homeassistant/components/notify/__init__.py", line 137, in async_notify_message
    yield from notify_service.async_send_message(**kwargs)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/hass_venv/lib/python3.5/site-packages/homeassistant/components/notify/pushbullet.py", line 125, in send_message
    self.pbtargets[ttype][tname])
  File "/srv/hass/hass_venv/lib/python3.5/site-packages/homeassistant/components/notify/pushbullet.py", line 166, in _push_data
    pusher.push_note(title, message, email=email)
TypeError: push_note() got an unexpected keyword argument 'email'

@ctripodi
Copy link

Thanks @tschmidty69 . I've updated the file notify/pushbullet.py and pushbullet start to work.

@mririgoyen
Copy link
Contributor

@tschmidty69 @balloob This is a pretty big regression. All notifications from Pushbullet are non-functional. I would recommend considering a 0.61.2 release to resolve this problem.

@tschmidty69
Copy link
Contributor

@goyney this is resolved and will be in the next release.

As a workaround you can copy https://raw.githubusercontent.com/tschmidty69/home-assistant/pb-email-tests/homeassistant/components/notify/pushbullet.py to your .homeassistant/custom_components/notify directory to test. Let me know if you need more details on how to do that.

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@bastshoes
Copy link
Contributor Author

Issue has been fixed.

@yuraivan
Copy link

Hello everybody!
I tried Pushbulett notification and SMTP notification.
It working from start, but in couple hours I see
Unable to find service notify/dacha
11:58 core.py (WARNING)

Yestrday I updated HA to 0.71.0
Notification worked 2 hours and stoped!!!!!!
May be someone knows what is the problem?

@home-assistant home-assistant locked and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants