Arlo: replacement pyarlo module

Hi Steve @sherrell ,

Just a heads up with the latest core release beta and a possible breaking change and notification of a future breaking change with custom integrations.

Custom integrations now require a version key in their manifest file, this also means that all custom integrations now require a manifest file.

If you are using a legacy custom integration like custom_components/awesome.py this now needs to move to custom_components/awesome/__init__.py so you can add custom_components/awesome/manifest.json to it.

For more information about integration, manifests have a look here: Integration Manifest | Home Assistant Developer Docs

For now, this will create a warning on startup. But this will eventually be blocked from loading if it’s missing a version in the manifest.

If you see these warnings, please report the issue with the author of that custom integration.

(@ludeeus - #45919)

2021-02-25 09:37:28 WARNING (MainThread) [homeassistant.loader] No ‘version’ key in the manifest file for custom integration ‘aarlo’. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of ‘aarlo’

Error in log;

2021-02-25 09:38:50 ERROR (MainThread) [homeassistant.config] Platform error: camera
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config.py”, line 834, in async_process_component_config
platform = p_integration.get_platform(domain)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 499, in get_platform
cache[full_name] = self._import_platform(platform_name)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 504, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File “/usr/local/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 783, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/config/custom_components/aarlo/camera.py”, line 25, in
from homeassistant.components.stream.const import (
ImportError: cannot import name ‘CONF_DURATION’ from ‘homeassistant.components.stream.const’ (/usr/src/homeassistant/homeassistant/components/stream/const.py)

Possible cause;

Removes the internal stream components record service.

This service is meant to be used internally only by camera so this is not expected to be a problem in practice as you should be using camera.record instead.

(@allenporter - #45431) (camera docs) (generic docs) (nest docs) (stream docs)

Got it, thanks. I’ll push a fix for both later this week.

Thanks Steve, appears to be working now

Hi!! What was the fix for non-latin characters? I read it and forgot it and updated… :slight_smile: No cant find it in git.

The no_squash_unicode configuration item.

This is the existing behaviour and the current default behaviour:

no_squash_unicode: True

And this will convert the characters:

no_squash_unicode: False

And the double negative is deliberate.

1 Like

Has anyone been successful in configuring the component with 2FA and a gmail account? I have been using this excellent component without 2FA for almost 2 years, but this morning it stopped to work. I then enabled 2FA (huge mistake) and now I can’t get it to work anymore…

What version are you on? Arlo changed their backend yesterday and you need to be on the latest version for it to work.

I updated an hour ago. When I try to set up 2FA with gmail, then gmail just notifies me that it has detected malicious activity from some app trying to login to my account.

I tried to go back to my account without 2FA, but for some reason I cannot login to that Arlo account via the website anymore. It is stuck after entering the password and clicking login (I get the spinning circle but nothing after that). What could be the reason for this?

Did you set up an application specific password for your gmail account? You can’t just re-use your main one.

https://support.google.com/accounts/answer/185833?hl=en

And I’m using gmail as my 2FA account and have been for a while.

That did the trick! Thanks for the quick help!

One other quick remark: The latest version of the lovelace card doesn’t show a plug symbol anymore when the camera is powered by a power supply rather than a battery. This used to work just fine but stopped working with one of the latest versions. Now it just shows an empty battery instead of a power plug symbol.

I broke two pieces on the plug. It should be fixed now.

Hi, a few days ago I updated to the latest version because of the authentication issue. Since then the on schedule attribute doesn’t function fully correct anymore. When I change from armed state to a scheduled disarmed state (or vice versa) the on schedule attribute does change along, but when I change from an disarmed state to a scheduled disarmed state (or vice versa) the on schedule attribute does not change. Any idea why it stopped working? (I really do not remember on which version I was before I updated, but i was a somewhat older version. I guess 0.7.0.something)

@Plevuus Can you check the logs? Some people are reporting issues caused by the Cloudflare changes not working. You might see a mode change failed log around the time tou try.

@sherrell, there are no errors or warnings in the log related to the alarm panel or aarlo. I looked back in my snapshot and apparently I was running 0.7.0.5 before I updated. I also noticed that home assistent now misses the scheduled disarming of the Arlo system. In the morning the schedule disarms the arlo, but home assistant stills sees it as armed. Yesterday I added/updated these lines in the config, but it didn’t result in any improvement:

  refresh_devices_every: 3
  refresh_modes_every: 45

I’ll poke around some more. I don’t think anything has change in that code recently.

edit: a pyaarlo user noticed his mode change stopped working so maybe they updated the area as well

1 Like

Thanks again @sherrell! I’ll monitor how it evolves.

@sherrell I’ve just been playing with the updated version of lovelace-hass-arlo, just want to say thank you!

Loving the new features and cleaner code which has resulted in much quicker streams, in fact its working so well I’ve just changes all my old cards over to this version.

I hate to think how much time you have spent on this, truely apprecaited! Don’t supose you want to duplicate the work for Unifi Protect cameras :wink:

Bad news, it’s working for me. It flipped to disarmed right on time. If you can send me some logs I can take a look and see what is going wrong for you. This is a good logging level to try. Add this to configuration.yaml:

logger:
  default: info
  logs:
    custom_components.aarlo: debug
    custom_components.aarlo.alarm_control_panel: debug
    pyaarlo: debug

You can DM me the output, (you can paste it here and DM me the encrypted output).

Hi Steve, @sherrell

Another beta issue coming your way before the release next week.

2021-04-29 08:55:11 ERROR (MainThread) [homeassistant.config] Platform error: camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 853, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 493, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 498, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/aarlo/camera.py", line 14, in <module>
    from homeassistant.components.camera import (
ImportError: cannot import name 'CAMERA_SERVICE_SCHEMA' from 'homeassistant.components.camera' (/usr/src/homeassistant/homeassistant/components/camera/__init__.py)

Thanks. I’ll take a look.

edit: should be good now