Arlo: replacement pyarlo module

Hi,

I got an error:

Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/websocket_api/decorators.py", line 17, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/aarlo/camera.py", line 434, in websocket_stop_activity
    stopped = await camera.async_stop_activity()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/aarlo/pyaarlo/camera.py", line 451, in stop_activity
    base=self.base_station,
  File "/config/custom_components/aarlo/pyaarlo/device.py", line 174, in base_station
    return self._arlo.base_stations[0]
IndexError: list index out of range

Not sure what it means though. Any pointers?

Thank you

@roddydesu That’s a new one, I’ll take a look. It looks like the UI asked the camera to stop streaming and then it died.

Which version of code were you on? And which version of the lovelace card?

Thanks for the quick reply.

I am on Home Assistant 0.97.1, Aarlo v0.0.7-test01 but v0.5.5 gave the same errors, and lovelace card v0.0.10.

After a while, not sure exactly how long, my home assistant hangs and the page doesn’t respond or reload until I restart the docker container. Not sure if it has to do with this error or something else. Just extra info.

Thanks a bunch.

Re your HA hanging, if you have the custom component Breaking Changes install see here.

I had a similar issue, and mine had nothing to do with Aarlo.

Answering my own question following @holger2’ s report:

I just upgraded Hassio to 0.97.2, and streaming now works. :grinning:

2 Likes

@roddydesu

Was there any debug just before the crash? Something like stop_activity for XXX with a camera ID after it? If there isn’t and it’s easily reproducible can you turn on debug?

logger:
  default: info
  logs:
    pyaarlo: debug

How can you access the live stream?

Add the stream: component to your configuration.yaml file. Then add either or both of the following options the custom Lovelace card:

show:
  - play

or

image_click: play
2 Likes

Hi

Is there anyone who can help me out. I am trying to get the custom lovelace card working, but not matter what i do, i keep getting the error: Custom element doesn’t exist: aarlo-glance.

I have tried absolutely everything under the sun, but continually get this error. Can anyone confirm if there anything else whatsoever that you need to do apart from installing the HACS lovelace package and then entering the below into ui-lovelace.yaml? I have never installed any other custom cards (well at least never got them working). Is there something else that you need to do to get custom cards setup?

resources
  - url: /community_plugin/lovelace-hass-aarlo/hass-aarlo.js
    type: module

Ive noticed in the github respository there is a “custom_cards.json” file. Does that need to go somewhere?

@Bruskey27 The resources entry looks correct but I use Config UI/Raw Config Editor to modify my layout and not editing ui-lovelace.yaml directly. I find the caching can be aggressive so try forcing a web page refresh - SHIFT + CTRL + R on Chrome for example - to get everything reloaded.

Thanks sherrell

I have tried refreshing and still the same error. I struggle to understand how it can be a caching issue when the issue is occurring on multiple browsers. I am seeing the same issue on both chrome on my android phone as well as in firefox.

Can you confirm what you mean by using the Config UI/Raw Config Editor? Is that just adding those lines directly to the lovelace card rather than putting it into the config file?

@Bruskey27 Click on the three dots on the tip right then select ‘Configure UI’. It will give you a warning about controlling the UI (I can’t remember the exact wording), click to continue and then click on the three dots again and select ‘Raw Config Editor’.

But I’m sure it should work from the ui-lovelace.yaml. Do the browser developer tools show anything suspicious?

Still the same thing. I am struggling to understand how this error suggests it’s a caching issue? Anything to do with the “custom_cards.json” file? Why is that in the repository of files yet I dont have that anywhere?

My previous experiences here always end up having extra steps or prerequisites which seem to be assumed as you know about them and I end up having to dig around to find the missing steps. Is this the case here as well?

@Bruskey27 It’s not caching, that was my first thought based on the original bug report and previous issues people have seen.

I’ll set up a test install here and try and reproduce the issue by editing the yaml file directly, can you tell me:

  • the home-assistant version
  • the hass-aarlo version
  • the custom card version
  • and an example of a custom card configuration you are trying to use

Thanks

edit: the custom_cards.json is for an old installation system but you are using HACS so don’t need it.

@roddydesu Did you give the guest user read and write permission?

I updated and haven’t seen that error since. Guess you worked it out :slight_smile:

Excellent. There was a timing issue, I guess it was related to that. I was asking because somebody posted a bug report on github with a similar back trace.

Thanks @sherrell

Using Google Chrome 76.0.3809.100 (Official Build) (64-bit) if that helps
Home Assistant 0.97.1
hass-aarlo version 0.0.7
custom card verson 0.0.10
The card configuration below produces the error, but no matter what i put in:

entity: camera.aarlo_front_door
name: Front Door
show:
  - motion
type: 'custom:aarlo-glance'

@sherrell Good news! I finally got it working! I had to put it in the Raw Config editor section like you suggested. I tried that the other day without luck, but persisted and i can see the card now. Looks like there may be an issue then with using ui-lovelace.yaml?

Excellent. Glad it’s working for you. The UI had gotten easier to use because getting the card to refresh on mobile on older versions was damn near impossible.