AlexxIT / HassWP

Portable version of Home Assistant for Windows (no need to install)
https://github.com/AlexxIT/Blog
586 stars 76 forks source link

Nest failed to setup #64

Closed guynillou closed 1 year ago

guynillou commented 1 year ago

Hasswp v: core-2022.8.6
Python v: 3.9.10

Followed carefully all steps https://www.home-assistant.io/integrations/nest/ but at the end nest fails to set up here's the log

Logger: homeassistant.config_entries Source: C:\Users\Le Patron\Desktop\Home Assistant\python-3.9.10.amd64\lib\site-packages\homeassistant\config_entries.py:420 First occurred: September 12, 2022 at 10:22:50 AM (5 occurrences) Last logged: 1:22:50 PM

Error setting up entry Maison for nest Traceback (most recent call last): File "C:\Users\Le Patron\Desktop\Home Assistant\python-3.9.10.amd64\lib\site-packages\homeassistant\config_entries.py", line 357, in async_setup result = await component.async_setup_entry(hass, self) File "C:\Users\Le Patron\Desktop\Home Assistant\python-3.9.10.amd64\lib\site-packages\homeassistant\components\nest__init__.py", line 205, in async_setup_entry subscriber.cache_policy.transcoder = await async_get_transcoder(hass) File "C:\Users\Le Patron\Desktop\Home Assistant\python-3.9.10.amd64\lib\site-packages\homeassistant\components\nest\media_source.py", line 100, in async_get_transcoder ffmpeg_manager = get_ffmpeg_manager(hass) File "C:\Users\Le Patron\Desktop\Home Assistant\python-3.9.10.amd64\lib\site-packages\homeassistant\components\ffmpeg__init__.py", line 98, in get_ffmpeg_manager raise ValueError("ffmpeg component not initialized") ValueError: ffmpeg component not initialized

thank you very much for your hard work !!

AlexxIT commented 1 year ago

You don't have ffmpeg in your system

guynillou commented 1 year ago

2022-09-13 23:43:38,203.203 INFO (MainThread) [homeassistant.setup] Setting up input_boolean 2022-09-13 23:43:38,216.216 INFO (MainThread) [main] FFmpeg DISABLED! 2022-09-13 23:43:38,217.217 INFO (MainThread) [main] FFmpeg DISABLED! 2022-09-13 23:43:38,217.217 INFO (MainThread) [main] FFmpeg DISABLED!

is there any way to enable it or install ffmpeg ? didn't found it in integration

AlexxIT commented 1 year ago

Yes. You need to download and install ffmpeg into your system.

guynillou commented 1 year ago

thanks for the help i tried to download and install manually but a script or something is disabling ffmpeg buy default and i can't find the culprit

guynillou commented 1 year ago

Found this in Hass_win main.py ! i am not sure how to modify it to enable ffmpeg though can you help me please ?

def wrap_setup(func):
    async def wrapper(hass, domain, config):
        if domain == "homeassistant":
            # set config directory as cwd (useful for camera snapshot)
            os.chdir(hass.config.config_dir)
            # and adds it to PATH (useful for ffmpeg)
            os.environ["PATH"] += ";" + hass.config.config_dir
        elif domain in ("dhcp", "radio_browser"):
            return True
        elif domain == "ffmpeg":
            try:
                binary = config.get(domain).get(domain + "_bin", domain)
                subprocess.Popen(
                    [binary, "-version"], stdout=subprocess.DEVNULL
                )
            except Exception:
                logging.getLogger(__name__).info("FFmpeg DISABLED!")
                return True

        return await func(hass, domain, config)

    return wrapper
AlexxIT commented 1 year ago

FFmpeg is application. You need to download and install it.

guynillou commented 1 year ago

Thanks for the help AlexxIT i managed to make it work by changing ("FFmpeg DISABLED!") to ("FFmpeg ENABLED!") in hass_win main.py . Then added the path to ffmpeg bin in my config.yaml . Now i have access to my nest and ring cam !