rotx / homeassistant-components

Apache License 2.0
1 stars 0 forks source link

Installation issue #1

Closed cby016 closed 5 years ago

cby016 commented 5 years ago

When I try to install these custom components I get the following invalid configuration errors:

Integration macos not found when trying to verify its media_player platform.
Integration macos not found when trying to verify its tts platform.

I tried to restart home assistant anyways to see if it would install but no luck. Any ideas on how to fix this?

rotx commented 5 years ago

The way custom components are integrated has changed in newer Home Assistant versions. Specifically, an integration manifest is required, see https://developers.home-assistant.io/docs/en/creating_integration_manifest.html There may be other problems with the current version but this will be the first hurdle.

cby016 commented 5 years ago

Thanks for the link. I was able to get the tts component installed and working however not the media_player. I do have an apple tv set up as a media player but when I run the tts.macos_say service the apple tv says "An error occurred loading this content". Looking at the code it's not exactly clear to me how the m4a file gets picked up by the media player. Any ideas on why the apple tv can't play the file?

rotx commented 5 years ago

The tts component creates a temporary file that is handed over to the media player component, which essentially calls /usr/bin/afplay [FILENAME]. Before diving into the home assistant component, try to see whether you can play an arbitrary m4a file using afplay, and whether say works from the command line, and whether afplay can play a file that say generated.

cby016 commented 5 years ago

Yes afplay will play the generated m4a file however like I mentioned before I couldn't get the media_player.macos componenet to install. When I try I get the following error Platform not found: media_player.macos. The funny thing is I installed it the same way I installed the tts component. Anyways that's why I was seeing if my apple tv media player could play it but that doesn't work either.

rotx commented 5 years ago

Home Assistant has changed the way custom components work (in version 0.92). Another change in 0.92 is this: https://github.com/home-assistant/home-assistant/pull/22878 I'll take a look at it when I get a chance.

rotx commented 5 years ago

Fixed in commit #3d37c69

There were several issues: