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

Notifications for Android TV fail #10443

Closed
orx57 opened this issue Nov 7, 2017 · 11 comments · Fixed by #10798
Closed

Notifications for Android TV fail #10443

orx57 opened this issue Nov 7, 2017 · 11 comments · Fixed by #10798

Comments

@orx57
Copy link

orx57 commented Nov 7, 2017

Home Assistant release (hass --version):
0.57.2

Python release (python3 --version):
Python 3.6 on hassio (Supervisor version 0.74, Host Control version 1.1)

Component/platform:
notify.nfandroidtv

Description of problem:
Notifications fail to send and not display on "Notification for Android" server.

Expected:
Notifications send and display on screen.

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

notify:
  - platform: nfandroidtv
    name: Kitchen
    host: 192.168.1.12
  1. Enable component
  2. Send notification (used example data from docs)
  3. Traceback

Traceback (if applicable):

2017-11-07 20:34:30 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 1038, 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 143, 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/nfandroidtv.py", line 122, in send_message
    open(self._icon_file, 'rb'),
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/site-packages/homeassistant/components/notify/../frontend/www_static/icons/favicon-192x192.png'

Additional info:

Notifications are displayed correctly from another client.

@danielperna84
Copy link
Contributor

danielperna84 commented Nov 7, 2017

I can confirm the issue. It's probably related to the changes happening to the frontend recently.

The gntp platform might have this issue as well since it is referencing the same image file. The webostv platform maybe too.

Edit:
It's working in a fresh virtualenv where HASS has been installed via pip. It's only within my dev-fork where it is not working (because of the separate repo for the frontend).

@skeptizzle
Copy link

I can confirm the issue as well.

@danielperna84
Copy link
Contributor

@skeptizzle
What type of installation do you have? hass.io as well?

@skeptizzle
Copy link

@danielperna84 yes, 0.57.2, worked in 0.56 if I remember correctly..

@pephumin
Copy link

I also experience the same, notification for Android TV and gntp not working.

@danielperna84
Copy link
Contributor

@pephumin
hass.io or another type of installation?

@knirefel
Copy link

Same issue here, using hass.io on RPi3

@danielperna84
Copy link
Contributor

This problem seems to be exlusive to hassio users. But I don't know why it happens and don't have a running installation to test it.

@pephumin
Copy link

Sorry for a late reply, I was travelling to another country.

My installation is not hass.io. I actually installed from docker to my Synology NAS.

@kiall
Copy link
Contributor

kiall commented Nov 24, 2017

I'm seeing this with the 0.58.1 homeassistant/home-assistant docker image too. As a workaround, inside the container you can run these:

mkdir -p /usr/src/app/homeassistant/components/frontend/www_static/
ln -s /usr/local/lib/python3.6/site-packages/hass_frontend/icons /usr/src/app/homeassistant/components/frontend/www_static/icons

For me, I set them to run when the container starts to get things working again.

@pephumin
Copy link

pephumin commented Dec 6, 2017

@kiall thanks a lot

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

Successfully merging a pull request may close this issue.

6 participants