IP Webcam corrupts HA installation

While I cannot say why it happens, I can say for sure that every time I setup/install IP Webcam, using the settings below, something in the .homeassistant\deps folder gets corrupted and HA fails to install sensors, mqtt, device_tracker … and on and on … . The only way I KNOW OF to fix the issue is to restore the deps folder from backup and remove the offending lines from configuration.yaml

Here are the offending lines:

android_ip_webcam:

  • host: 192.168.1.170
    port: 8088
    name: Front Door

I’m not sure if its the port I’m attempting to use or what, but regardless, I was really shocked at the resulting severity of the problem. And once HA is started with this component installed, the damage is done. Even removing the lines for subsequent restarts fails to correct the issue. As I said, the only way I know of to fix it is to restore the deps folder from backup.

Since I initially wasn’t sure of root cause and/or how to fix the issue, I was lucky enough :slight_smile: to be able to duplicate the problem 3 times - twice from a fresh install of python. I’m running 64bit Windows 7 and the problem occurs with both the 32bit and 64 bit versions of Python.

Any errors in your log?

Billions of errors … like I said, once I restart, HA won’t load and reports that it is unable to load almost every HA component. I know it’s weird, but that’s why I figured it was important to let others know …

I need more info to be able to help you.
Could you post the log output to https://hastebin.com/ ?

Since I was initially unsure of root cause, and went through a couple uninstalls/installs I only have one version of the log file - which I’ll post it at the location.

HA has become so useful to my family that it’s become mission critical. And this is the first time since I 1st installed it back in November that I have ever had a crash this severe. So getting it back up running was my main priority at the expense of creating a fully documented trail. So let apologize in advance for not having every iteration …

Please confirm that you have received / able to view the the log file …

My problem may be related (from a noob point of view), except the camera worked fine until I decided to delete it. The HA site did not load and many errors showed in the log, starting with “Error loading homeassistant.components.tts.” The errors start with “Error loading homeassistant.components.automation” when I put the following (originally working) lines back in. It doesn’t matter if the IP Webcam app is running or not.

Lines:

android_ip_webcam:
host: 192.168.86.167
name: 3D Printer

The standard “tts” lines were were above the camera lines I inserted. I’m running AIO on a Pi2 on wifi.

I’ve uploaded my log history as noted above. Are there any commands to get up and running? Or do I need to start from a fresh install? Thanks.

Oops! the host: and name: lines are actually indented two spaces in the .yaml file.

Deleting the /deps folder as noted in the 0.4.2 release notes restored HA back to my pre android ip webcam state.

Yep, as I said in my original post on this issue, the only way to fix the issue was to restore the deps folder from backup.

I haven’t had time to follow the bug reports, and no one ever got back to me, but I’m curious as to what the root cause of this relatively serious problem was? Regardless, it seems like a good idea to keep a copy of the deps folder handy.

Still not fixed in version 0.41.0

I’m having the same problem as well. Enabling Android IP Webcam prevents HASS from launching. I don’t at which version the bug originated, but it’s in the last month or so. I’m on 0.44.2 today and just completed a fresh HASS install. As soon as android_ip_webcam is in my config hass refuses to boot. Commenting out doesn’t fix it - like tggman stated, you have to restore deps/ from a backup.

You sure you defined all the correct sensors that is availble on your camera device? A while ago the auto discovery of the sensors was having trouble with home assistant. Thats why (correct me if im wrong) they removed that feature in 0.39 or so. At the moment im using Android IP Webcam with 0.44.0 and works really good (Will try to update to 0.44.2 later)

To be honest, I shocked that this extremely serious problem has gone uncorrected for so long considering the resulting level of damage.

Same thing here. I have commented it out for now.

android_ip_webcam:
  - host: 192.168.1.171
    port: 8080

As I understand it, the component was pulled because it was corrupting HA installs. The issue was thought to be corrected in v0.41, but as I reported, it wasn’t. That seems to indicate that the root cause was never truly understood and the problem persists even now in 0.44.2.

When I first discovered the issue I was running HA in Windows 7. Now I’m running Hassbian 1.1 on a Raspberry Pi 2 but have no interest in trying it there until I know with reasonable certainty that the root cause has been determined and the problem corrected.

i have IPcam up and running in HA 0.40
had no problems at all.
the only bugging thing is when i restart has when the ipcam server is down, i get a shitload of errors.
that could cause a problem if its running longer or with a slower device (i got RPI 3)

I have no issues with android_ip_webcam.
It always worked for me.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION=“Ubuntu 16.04.2 LTS”

Python 3.5.2

UPDATE:
Unless the authors have made relevant changes to this component after v0.41, its possible that the deps folder corruption issue only occurs if/when Home Assistant is running on WINDOWS (in my case Windows 7). I’ve just setup this component on my Hassbian (Raspberry Pi2) and it works great.

Hi,

I have the same problem I guess, I am running HA 0.47.1 on a RPI3 and when I use just 1 Android_IP_webcam, everything works fine. But when I add a second one, everything crashes. The dependencies get messed up and HA will not boot after the RPI is powered off.
The web interface shows also a ‘config error’ with this as output in the dev-log in the web interface:

2018-02-21 21:49:59 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.history. Make sure all dependencies are installed
    Traceback (most recent call last):
      File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/loader.py", line 141, in get_component
        module = importlib.import_module(path)
      File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
      File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
      File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 1129, in _exec
      File "<frozen importlib._bootstrap>", line 1471, in exec_module
      File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
      File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/history.py", line 20, in <module>
        from homeassistant.components.frontend import register_built_in_panel
      File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/frontend/__init__.py", line 8, in <module>
        from aiohttp import web
      File "/home/homeassistant/.homeassistant/deps/aiohttp/web.py", line 13, in <module>
        from . import (hdrs, web_exceptions, web_fileresponse, web_middlewares,
      File "/home/homeassistant/.homeassistant/deps/aiohttp/web_middlewares.py", line 5, in <module>
        from aiohttp.web_urldispatcher import SystemRoute
      File "/home/homeassistant/.homeassistant/deps/aiohttp/web_urldispatcher.py", line 16, in <module>
        from yarl import URL, unquote
    ImportError: cannot import name 'unquote'
    2018-02-21 21:49:59 ERROR (MainThread) [homeassistant.loader] Unable to find component history
    2018-02-21 21:49:59 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Component not found.

So this happened the second time, first I thought it was an update failure (which I performed just earlier. But a second time can’t be.

I hope there will be a fix in a future update.