Arlo: replacement pyarlo module

So having a look at my logs I’ve go this coming up. Could this be why I’m not getting the motion sensor updated?


This error originated from a custom integration.

Logger: pyaarlo
Source: custom_components/aarlo/pyaarlo/__init__.py:591 
Integration: Arlo Camera Support (documentation, issues) 
First occurred: 15:38:50 (47 occurrences) 
Last logged: 16:08:51

error in response={'data': {'error': '2217', 'message': 'The device does not exist.', 'reason': 'No such device.'}, 'success': False}

@plainmad

I’ve seen that log before and it’s normally the back end is playing up. Does your HA Arlo account have admin access? Without admin access you won’t get motion updates.

@lars86

I’m seeing the same thing. I might need to update the stream interactions.

Yep, double checked and it’s got admin access

@sherrell

An issue recording to file (media browser in my case) with the latest beta to be released next week.

2021-10-29 21:14:24 WARNING (recorder_save_worker) [libav.mov,mp4,m4a,3gp,3g2,mj2] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1280x720): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (10000000) and 'probesize' (5000000) options
2021-10-29 21:14:24 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 138, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/api/__init__.py", line 358, in post
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/aarlo/camera.py", line 230, in async_service_callback
    await hass.async_add_executor_job(service_callback, call)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/aarlo/camera.py", line 221, in service_callback
    camera_video_to_file_service(hass, call)
  File "/config/custom_components/aarlo/camera.py", line 1111, in camera_video_to_file_service
    out_file.write(video)
TypeError: a bytes-like object is required, not 'NoneType'

Hello,

after upgrading to Core 2021.11.1 aarlo is unable to connect.
Reverting the version back to 2021.10.x it works again.

My config (within a seperate yaml in the packages folder)

#################################################################
# Packages/Alarm System                      					#
#################################################################

homeassistant:
  customize:
    alarm_control_panel.aarlo_sehnix:
      icon: mdi:shield-home
      friendly_name: Alarm
    alarm_control_panel.sehnix:
      icon: mdi:shield-home
      friendly name: 'Arlo Status'


# Configuration for my Arlo security cameras    
aarlo:
  username: !secret arlo_user
  password: !secret arlo_password 
  last_format: '%m-%d %H:%M'
  refresh_devices_every: 2
  stream_timeout: 120
  reconnect_every: 120
  user_agent: linux

alarm_control_panel:
  - platform: aarlo
    home_mode_name: disarmed
    away_mode_name: armed
 
camera:
  - platform: aarlo

media_player:
  - platform: aarlo
  
sensor:
  - platform: aarlo
    monitored_conditions:
    - total_cameras
    - last_capture
    - recent_activity
    - captured_today
    - battery_level
    - signal_strength

Anyone having similar issues?
Any hints i can do to check what is wrong?

Answering myself: after some reboots (also update to core-2021-11.2 and after HACS updates, it re-appeared again.

I am trying to install aarlo. I do not use HACS. Does anyone have a step by step way to get this very nice feature added? I am not running docker, just a dedicated core install of HA

Hi,
since a couple of weeks, the camera_request_snapshot_to_file service doesn’t work properly anymore. When I call the service, the camera doesn’t update anything and just sends the last image from the arlo web service to the file. Does anyone else have this problem and is there a solution?
Thanks!

Hi Steve, @sherrell

Heads up for the next release. Currently in beta.

https://rc.home-assistant.io/blog/2021/12/03/release-202112/#updates-for-custom-integration-developers

2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.aarlo_siren_arlo_base_station (<class ‘custom_components.aarlo.switch.AarloSirenSwitch’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.aarlo_all_sirens (<class ‘custom_components.aarlo.switch.AarloAllSirensSwitch’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.aarlo_snapshot_alfresco (<class ‘custom_components.aarlo.switch.AarloSnapshotSwitch’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.aarlo_snapshot_driveway (<class ‘custom_components.aarlo.switch.AarloSnapshotSwitch’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity binary_sensor.aarlo_motion_alfresco (<class ‘custom_components.aarlo.binary_sensor.ArloBinarySensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity binary_sensor.aarlo_motion_driveway (<class ‘custom_components.aarlo.binary_sensor.ArloBinarySensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity binary_sensor.aarlo_sound_alfresco (<class ‘custom_components.aarlo.binary_sensor.ArloBinarySensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity binary_sensor.aarlo_sound_driveway (<class ‘custom_components.aarlo.binary_sensor.ArloBinarySensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity camera.aarlo_alfresco (<class ‘custom_components.aarlo.camera.ArloCam’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity camera.aarlo_driveway (<class ‘custom_components.aarlo.camera.ArloCam’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_captured_today_alfresco (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_captured_today_driveway (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_battery_level_alfresco (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_battery_level_driveway (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_last_alfresco (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_last_driveway (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_total_cameras (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_signal_strength_alfresco (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_signal_strength_driveway (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_recent_activity_alfresco (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 08:26:56 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.aarlo_recent_activity_driveway (<class ‘custom_components.aarlo.sensor.ArloSensor’>) implements device_state_attributes. Please report it to the custom component author.

Thanks! I’ll take a look.

@sherrell
Also getting this other warning in the logs (multiple times) and I am not sure which CC is causing it. Maybe the aarlo?

Stack (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 331, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
    handle._run()
  File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 500, in _async_add_entity
    device = device_registry.async_get_or_create(**processed_dev_info)  # type: ignore[arg-type]
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 360, in async_get_or_create
    report(  # type: ignore[unreachable]
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
    _LOGGER.warning(msg, stack_info=True)

Mine being doing this for months now along with it not sending motion detection through and I can’t turn the siren on

@plainmad @ffm777
Which version are you on and are there any exceptions in the log? I’ll take a look here.

@sherrell
I’m on version v0.7.1.8. No error messages in the HA log file. I’m using the “aarlo.camera_request_snapshot_to_file” service. When I call the service, then it does not take a new snapshot but instead loads the cam’s picture from the Arlo web interface into the file.

I’ve had this issue on all the most recent versions and i’m currently on V0.7.2b3 and when i’ve had a look at the log i’ve got this

This error originated from a custom integration.

Logger: pyaarlo
Source: custom_components/aarlo/pyaarlo/init.py:676
Integration: Arlo Camera Support (documentation, issues)
First occurred: 8 December 2021, 17:33:50 (1563 occurrences)
Last logged: 13:29:50

error in response={‘data’: {‘error’: ‘2217’, ‘message’: ‘The device does not exist.’, ‘reason’: ‘No such device.’}, ‘success’: False}
request-error=ConnectionError

I know that looks like a connection error but the image shown in HA is the most recent one from the camera so the connection is working in some form

EDIT: I’ve fixed it. Logged into the Arlo website under the credentials that HA uses. For some reason it was showing devices offline despite being able to use them under the main account. Although the Arlo account had admin access i removed it and gave it back and it seems to be fine

Anyone else getting the following error that I have for some weeks now. Working perfectly fine before that using the, “aarlo/camera_start_recording” and then the “aarlo/camera_request_video_to_file” service calls. With this I get a zero byte file created and the following error message on

on my iOs app. The logs show the following:

2021-12-20 10:18:47 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/api/__init__.py", line 358, in post
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/aarlo/camera.py", line 230, in async_service_callback
    await hass.async_add_executor_job(service_callback, call)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/aarlo/camera.py", line 221, in service_callback
    camera_video_to_file_service(hass, call)
  File "/config/custom_components/aarlo/camera.py", line 1111, in camera_video_to_file_service
    out_file.write(video)
TypeError: a bytes-like object is required, not 'NoneType'
2021-12-20 10:18:48 WARNING (recorder_save_worker) [libav.mov,mp4,m4a,3gp,3g2,mj2] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1280x720): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (10000000) and 'probesize' (5000000) options

If I use the following “camera/record” I get the same iOs app error and the following log errors

Consider increasing the value for the 'analyzeduration' (10000000) and 'probesize' (5000000) options
2021-12-20 09:44:16 ERROR (MainThread) [custom_components.aarlo.camera] Video not found for Alfresco. Is it older than 30 days?
2021-12-20 09:44:16 ERROR (MainThread) [custom_components.aarlo.camera] Video not found for Alfresco. Is it older than 30 days?
2021-12-20 09:44:18 ERROR (MainThread) [custom_components.aarlo.camera] Video not found for Alfresco. Is it older than 30 days?
2021-12-20 09:54:49 ERROR (MainThread) [frontend.js.latest.202112150] https://toowong-hass.duckdns.org/lovelace/0:0:0 Uncaught 
2021-12-20 09:55:10 WARNING (recorder_save_worker) [libav.mov,mp4,m4a,3gp,3g2,mj2] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1280x720): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (10000000) and 'probesize' (5000000) options

Thanks

Thanks for the report, I’ll try it here.

Hi i have an error on using aarlo glance card… worked fine before but getting this error:

Was using the aarlo integration manual but now using hacs is it registered double somewhere?

Yes, it’s been put into 2 different places.

If you look under your configuration directory you have one in www and one custom_components/hacs/. You can probably rename the one under www and see what happens.