Arlo Support (Sponsorship)

Nice work! I was able to install the new version with my current configuration no problem. The only immediate issue I see is that I’m seeing images from old/removed cameras again, even though I see the script is filtering on provisioned devices. I’ll have to test more tomorrow.

Hello @jwillaz,

That is very interesting… So what you are saying is that you can see all your older Arlo cameras too, is that right?

If you follow the steps to load manually the library, can you share the camera._attrs to check which attribute to use to difference the current vs the older ones?

Furthermore did the Arlo Q cameras showed as expected?

Strangely, when I manually load the the library, the camera attributes for each of the ones returned in the object are correct. They have the correct image and everything. So, for whatever reason, it seems like the component is not respecting the filter from the library? I removed the old library and component before installing. Even then, I had manually updated the condition for ‘provisioned’ devices, so that wouldn’t be an issue if it was still referencing old script. I’m not very familiar with HA components - is it possible it’s not referencing the latest library?

@jwillaz try cleaning the deps directory and restart the HASS. Also check if which pyarlo version you have installed by running pip freeze | grep arlo

@tchellomello I checked the freeze, and sure enough it still had pyarlo==0.0.1. I ran the upgrade for it and verified it upgraded to 0.0.4. I also stopped the HASS service, cleared out deps and ran an upgrade of HASS, then started the service. It’s still showing me two old, not provisioned cameras. Are there any other locations the component could have cache? Like I said, the library is returning the correct info when I run it manually, but the component is showing something different.

@jwillaz not really and this is odd. What are the entity names from the old 2 cameras that you have?

For whatever reason, the component seems to be referencing the cameras by name, including ones that are in a “removed” state. Recall that my new cameras have the same names as the old cameras I returned. Example: I have one “removed” camera called “House Cam” and one “provisioned” camera called “House Cam”. I tested this by changing the names of my cameras; Once I did, the correct images appeared. I went ahead and issued replays on the rename endpoint (/hmsweb/users/devices/v2/renameDevice) to rename all of my removed cameras using their unique IDs (the rename endpoint takes params “uniqueId”, “deviceName”, and “parentId”, where deviceName is the new name to be set). Once I renamed all of the “removed” cameras, the correct “provisioned” images showed up.

That is very interesting @jwillaz. I’m working on the ability to click on the image now and then watch the recorded video on HASS. Just doing some final adjustments and I’ll update that branch. I’ll let you know.

Awesome, both my arlo q cameras appear as expected!

Would also love to be able to arm/disarm the camera. That way I can turn it off if I’m at home.

Hello guys,

I’ve enabled the support to play the video via ffmpeg so far. So basically your system must meet the requirements mentioned at https://home-assistant.io/components/ffmpeg/.

Once your system has the ffmpeg binary, then you can reinstall the branch pip install git+https://github.com/tchellomello/home-assistant@arlo_0.44.2 --upgrade which should take of that. Note that is not required to update the pyArlo library.

I’m still facing some issues on the speed of the playback but it is a good start.

Please let me know how it goes.
mmello

Thank you for doing this.

I cannot get this to work at all. Have run pip install git+https://github.com/tchellomello/home-assistant@arlo_0.44.2 --upgrade and restarted HASS. Everything seems to go fine but it is like I am still running an older version. My web interface shows 0.43.2 but HASS --version shows 0.44.2. Error when loading is:

17-05-17 13:02:13 ERROR (MainThread) [homeassistant.loader] Unable to find component camera.arlo
17-05-17 13:02:13 ERROR (MainThread) [homeassistant.loader] Unable to find component arlo
17-05-17 13:02:13 ERROR (MainThread) [homeassistant.setup] Setup failed for arlo: Component not found.
17-05-17 13:02:13 ERROR (MainThread) [homeassistant.loader] Unable to find component sensor.arlo

Any suggestions?

Awesome work so far!

I think it would be good for everyone to level-set on what their environment looks like. I am running HASS on a Raspberry Pi 3 with Debian Jessie.

@tchellomello, two things on your latest update:

  1. I got ‘ffmpeg’ not found errors when trying to run it as-is. I have a manually compiled version of ffmpeg, as well as the jessie backport. I set the ffmpeg_bin in my configuration.yaml to /usr/bin/ffmpeg. The component is not honoring that. I had to manually edit the arlo.py script to set
    self._ffmpeg_binary = '/usr/bin/ffmpeg'.
    I’m not sure how you set it to reference the HASS config’s ffmpeg_bin value.

  2. Once I did the above, the video start working, but very slow. I replaced your arguments with this and it plays smoothly!
    self._extra_arguments = '-pred 1 -q:v 2'

Does this update allow you to download the recorded videos?

Hello @jwillaz,

Thanks for your post. I tried with your filter and and it did not work for me. The filter that worked is -filter:v setpts=40.0*PTS.

So to address it, I created 2 parameters to expose the configuration then it can be overriden by the user. For example:

#cameras.yaml
 - platform: arlo
   ffmpeg_binary: '/usr/bin/ffmpeg'
   ffmpeg_arguments: '-filter:v setpts=40.0*PTS'

I’ve already updated the branch so it should work.

Please let me know if worked the filter for you.

1 Like

@arsaboo the 3rd party library supports it already, however not via HASS UI yet. Via a command_line it should work.

Thanks for this, it is working great.

Do you plan in including functionalliy to be able to set the mode (armed, disarmed, etc) on the arlo unit from HA?
Now I need to use the arlo app for that while everything else work in HA :slight_smile:

Do you have any examples for command line usage?

Hello! I tried to include Arlo support as a custom component, so I added the following files from the repo:

custom_components/camera/arlo.py
custom_components/sensor/arlo.py
custom_components/arlo.py

However, I’m getting the following errors when starting:

2017-05-21 11:20:07 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.camera.arlo. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/loader.py", line 141, in get_component
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 673, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/config/custom_components/camera/arlo.py", line 13, in <module>
    from homeassistant.components.arlo import (
ImportError: No module named 'homeassistant.components.arlo'
2017-05-21 11:20:07 ERROR (MainThread) [homeassistant.loader] Unable to find component camera.arlo

2017-05-21 11:20:07 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sensor.arlo. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/loader.py", line 141, in get_component
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 673, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/config/custom_components/sensor/arlo.py", line 12, in <module>
    from homeassistant.components.arlo import (
ImportError: No module named 'homeassistant.components.arlo'
2017-05-21 11:20:07 ERROR (MainThread) [homeassistant.loader] Unable to find component sensor.arlo

It looks like the camera and the sensor components can’t import the custom platform homeassistant.components.arlo even though the file is there. Is this approach possible at all, or am I missing something? :slight_smile:

Edit: Worked fine after moving the files to the components folder instead of custom_components. Guessing it’s an issue when a custom component imports another custom component.

Got it working on. On Hassbian, different upgrade process. When can we expect this in main branch?