hass-aarlo icon indicating copy to clipboard operation
hass-aarlo copied to clipboard

Modes not updating on alarm control panel

Open titatom opened this issue 1 year ago • 4 comments

Hello ! For the past week I've noticed the modes are not updating in the alarm control panel anymore. When arming/disarming the cameras,the mode updates in the Arlo app but not in Home Assistant. Adding backend : sse a few weeks back had fixed this problem when I did the initial setup but that is not the case anymore. Here is a section of the log after arming the cameras via the control panel.

2022-08-10 20:42:33.433 DEBUG (SyncWorker_3) [custom_components.aarlo.alarm_control_panel] Jardin set mode to home 2022-08-10 20:42:33.433 DEBUG (SyncWorker_3) [pyaarlo] activeSchedule: OLD None 2022-08-10 20:42:33.433 DEBUG (SyncWorker_3) [pyaarlo] Jardin:new-mode=home,id=mode3 2022-08-10 20:42:33.433 DEBUG (SyncWorker_3) [pyaarlo] v2 arming 2022-08-10 20:42:43.338 DEBUG (ArloEventStream) [pyaarlo] sseclient-error=ChunkedEncodingError 2022-08-10 20:42:46.539 DEBUG (ArloEventStream) [pyaarlo] fetching device list after ev-reconnect

I've read @twrecked mentioning Arlo are playing with their backend which could be the cause of this ?

Cheers !

titatom avatar Aug 11 '22 00:08 titatom

I occasionally see the states out of sync. Usually when this happens I just need to arm/disarm from the Arlo app a couple times and they sync up again in HA. Worst case, I just restart HA and it's fixed.

squirtbrnr avatar Sep 05 '22 18:09 squirtbrnr

Yes, when I restart HA the status updates. Also when I arm/disarm in HA, it updates in the Arlo app.

Unfortunately the fact that the status does not update in HA when changing it in HA itself makes the whole add on unusable for automations (I can't restart HA everytime I want to arm/disarm the cameras for example).

It seems I am not the only one with the issue as per this convo I was having with another user on reddit.

https://www.reddit.com/r/homeassistant/comments/wpvz7g/aarlo_cameras_armdisarm_without_base_station/?utm_medium=android_app&utm_source=share

titatom avatar Sep 05 '22 20:09 titatom

Hello, The same for me. after a HA restart everything works well and refreshes well but after a while or some automation, the alarm sensors no longer refresh. The same for the entity picture after an picture snapshot.

I'm in HA 2022.8.7, plugin v0.7.2b8.3 and sse backend.

Alex6fr avatar Sep 06 '22 07:09 Alex6fr

Probably something going on with Arlo's backend as @twrecked mentionned. Also I suspect he is busy with work and does not have time to look into it. I'd have a look but my python skills are not up to par unfortunately. Perhaps well see a fix when 0.8 is released in HA ?

titatom avatar Sep 06 '22 09:09 titatom

I have had the same issue and was able to resolve it by changing to the "sse" backend

aarlo: ..your current config.. backend: sse

paul123paulnz avatar Sep 21 '22 11:09 paul123paulnz

@paul123paulnz thanks for your reply. I have it setup with sse like in your example. I was discussing with a reddit user and it worked for him as well for a while but then stopped working (same for me actually, worked for a week or so). I suspect it will be the same in your case. Please keep me updated. I am considering switching to Poe cameras and frigate at this point.

The error I see on the logs seems SSE related :

2022-08-10 20:42:43.338 DEBUG (ArloEventStream) [pyaarlo] sseclient-error=ChunkedEncodingError

titatom avatar Sep 21 '22 11:09 titatom

Sorry, late getting to this. You still seeing the issue?

And I get those ChunkedEncodingError errors all the time.

twrecked avatar Oct 15 '22 23:10 twrecked

Hello ! Yes I still have the issue unfortunately. The status in HA does not reflect the Arlo status. Arming disarming in HA changes the status in the Arlo app but does not update in HA.

Thanks for having a look.

titatom avatar Oct 16 '22 09:10 titatom

Can you do a couple of things:

  1. Can you paste in your main configuration - minus the sensitive bits obviously.
  2. Can you turn on debug, you'll need to restart after changing the config, and try changing the alarm modes. I need to see the debug around the time you try to change to mode. You can use this webpage to encrypt the logs so only I can see them.

Thanks.

twrecked avatar Oct 16 '22 12:10 twrecked

Thank a lot for having a look !

Here is my config as well as my most recent logs. I arm the "Avant" camera at the very bottom of the log.

Cheers !

aarlo: username: !redacted password: !redacted stream_timeout: 120 tfa_source: imap tfa_type: email tfa_host: imap.gmail.com tfa_username: !redacted tfa_password: !redacted backend: sse

alarm_control_panel:

  • platform: aarlo away_mode_name: armed home_mode_name: home disarmed_mode_name: disarmed trigger_time: 30 alarm_volume: 8

logs.txt

titatom avatar Oct 17 '22 22:10 titatom

Sorry to be a pain but can you add verbose_debug: True to the aarlo: section.

I can see the request going in and then you get the Chunk error, turning on verbose debug will let me see if any packets come in as well.

twrecked avatar Oct 18 '22 00:10 twrecked

I have the same issue, it works fine for a few hours and the status updates is not updating in HA, Arlo will change status if alarm mode is changed but nothing is sent back. I just updated to 0.7.2b10 but the issue remains. A restart fixes the issue but only for a few hours.

Spiff1 avatar Oct 20 '22 16:10 Spiff1

@Spiff1 can you turn on debug and attach the output when it happens. See my earlier comment on how to enable it.

twrecked avatar Oct 20 '22 16:10 twrecked

Not much is added in the log file when trying to disarm arlo, it will be disarmed but nothing is sent back to home assistant. Hope this helps

2022-10-23 11:06:49.383 DEBUG (SyncWorker_11) [custom_components.aarlo.alarm_control_panel] Stamberga set mode to disarmed
2022-10-23 11:06:49.383 DEBUG (SyncWorker_11) [pyaarlo] set:ArloBase/A0E2057LA0F74/activeSchedule=None
2022-10-23 11:06:49.384 DEBUG (SyncWorker_11) [pyaarlo] Stamberga:new-mode=disarmed,id=mode0
2022-10-23 11:06:49.384 DEBUG (SyncWorker_11) [pyaarlo] v2 arming

Spiff1 avatar Oct 23 '22 09:10 Spiff1

@Spiff1 Did you have verbose_debug: True in your config? I'd expect to see a message going to Arlo.

twrecked avatar Oct 23 '22 12:10 twrecked

Sorry, my bad. this is the log when also verbose debugging is on

2022-10-24 19:19:55.000 DEBUG (SyncWorker_11) [custom_components.aarlo.alarm_control_panel] Stamberga set mode to disarmed
2022-10-24 19:19:55.001 DEBUG (SyncWorker_11) [pyaarlo] set:ArloBase/A0E2057LA0F74/activeSchedule=None
2022-10-24 19:19:55.001 DEBUG (SyncWorker_11) [pyaarlo] Stamberga:new-mode=disarmed,id=mode0
2022-10-24 19:19:55.002 DEBUG (SyncWorker_11) [pyaarlo] deduced v2 api
2022-10-24 19:19:55.002 DEBUG (SyncWorker_11) [pyaarlo] v2 arming
2022-10-24 19:19:55.002 DEBUG (SyncWorker_11) [pyaarlo] post+response running
2022-10-24 19:19:55.002 DEBUG (SyncWorker_11) [pyaarlo] request-url=https://myapi.arlo.com/hmsweb/users/devices/automation/active
2022-10-24 19:19:55.004 DEBUG (SyncWorker_11) [pyaarlo] request-params=
{'activeAutomations': [{'activeModes': ['mode0'],
                        'activeSchedules': [],
                        'deviceId': 'A0E2057LA0F74',
                        'timestamp': 1666631995002}]}
2022-10-24 19:19:55.004 DEBUG (SyncWorker_11) [pyaarlo] request-headers=
{}
2022-10-24 19:19:55.229 DEBUG (SyncWorker_11) [pyaarlo] request-body=
{'success': True}
2022-10-24 19:19:55.230 DEBUG (SyncWorker_11) [pyaarlo] request-end=200

Spiff1 avatar Oct 24 '22 17:10 Spiff1

@Spiff1 Can you post your aarlo: config from configuration.yaml? Without the sensitive bits obviously.

twrecked avatar Oct 24 '22 21:10 twrecked

Here it is:

aarlo:
  username: [email protected]
  password: *******
  tfa_source: imap
  tfa_type: email
  tfa_host: imap.gmail.com
  tfa_username: xxx
  tfa_password: xxxx
  verbose_debug: True

Spiff1 avatar Oct 25 '22 18:10 Spiff1

@Spiff1 Can you try adding a couple of pieces of config to it:

aarlo:
  ...
  refresh_devices_every: 2
  stream_timeout: 120
  reconnect_every: 90

twrecked avatar Oct 25 '22 20:10 twrecked

Thank you, it has now worked for 4 days, it seems like it solved the problem.

Spiff1 avatar Oct 29 '22 07:10 Spiff1