Arlo: replacement pyarlo module

i have run into i different issue, after i figure out how to fix it ill restart and see if theres anything in the log

@Xirr @woodmoose

Can you try this branch: hass-aarlo/siren

It contains an initial attempt at a trigger with siren. You trigger the alarm and the siren will sound for a configurable number of seconds at a configurable volume. The following config shows the default values:

alarm_control_panel:
  - platform: aarlo
    trigger_time: 60
    alarm_volume: 8

It resets to it’s previous state when the trigger stops.

@Corey_Maxim If it’s the issue you raised in the other thread I ran into the same thing. If you don’t care about device histories you can rename the db file home-assistant_v2.db and try restarting.

Thanks man, im trying that now, the log is showing some errors, so im trying to fix them one at a time.

thanks for the advice! much appreciate it. History is alot less important then redoing it all. Luckily I have samba so i can still access all my files

ok, im back! :slight_smile:

I got farther this time on the aarlo.

heres a few errors. I must not have everything in the proper place.

ImportError: cannot import name 'DATA_ARLO' from 'custom_components.aarlo' (/config/custom_components/aarlo/__init__.py)

Error while setting up platform aarlo
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 124, in _async_setup_platform
    task = async_create_setup_task()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 89, in async_create_setup_task
    None, platform.setup_platform, hass, platform_config,
AttributeError: module 'custom_components.aarlo.camera' has no attribute 'setup_platform'

Unable to find platform aarlo. Search path was limited to path of component: custom_components

Make sure you don’t have any old files hanging around - camera/aarlo.py for example.

I can’t find any old files.

Im confused on where to place all the files from git hub.

custom_components > do I make a aarlo folder then place the files?
I did that for the other custom components.
or do I place everything directly into the custom_components folder?

the docs are a bit unclear, or its probably me being stupid… lol

Edit:

I got it working, its probably worth noting. I finally got it to work by setting up the aarlo config first, restarting then added the rest of the sensors. Its all good now. Will there be a chance to ever get streaming video eventually?

With the latest release it works indeed! Thanks a lot! I implemented the automation in Node Red by using the motion sensor as the trigger. Works really great. Thanks again for your effort!

Just tried it, works great!
Many thanks!
Amazing work on the Arlo component!

@Corey_Maxim Glad you got it working. The instructions aren’t great but the plan is to get the component moved into the Home Assistant source eventually. All the files go under custom_components/aarlo, you should just be able to drag and drop the aarlo directory from the checkout to custom_components.

And streaming is planned, it’s just a matter of finding the best way to do it.

Absolutely great component! It doesn’t update as much as I would like, but I’m sure that’s the limitation of the arlo product. It’s kinda strange how the native app works. Your component will eventually make it better then the native app anyway!

I appreciate you taking your time to help me! And I’m certain that this will make it into HA official soon!

I appreciate you and everybody else here!

I hope you have a great day!

@sherrell I will try it shortly and let you know.

In the meantime, would you mind considering supporting the service camera.snapshot (with filepath option). Right now, the built-in camera.snapshot service only save the previous snapshot for arlo cameras (works well with other camera though) and I would need it to save the snapshot at the time I trigger the automation. (so I can send a notification to my iPhone with an updated picture attached when motion is detected)
For now, I’m using a tricky hack using your camera.aarlo_request_snapshot service with a 1" delay before calling camera.snapshot but that doesn’t work as good as I would.

@Corey_Maxim Which bit isn’t updating? Most things will update almost immediately with the exception of the camera image which will update when recording is complete. And for that case you can create an automation to take snapshot when motion starts.

@woodmoose I’ll think about that one, I might have to provide a camera.aarlo_request_snapshot_to_file service because the camera.snapshot calls calls camera::camera_image which only returns the last cached image. Truthfully, I’m still getting my head around the HA async stuff. How are you checking the service call has finished?

That’s exactly what I did in my automation (except for a 2 second delay). And it works very well on my system. However, a camera.aarlo_request_snapshot_to_file would be hightly appreciated.

1 Like

The broadcast image is way behind, when I woke up this morning it still had a image of my daughter coming home from school from yesterday. I did just get the image working last night so I’ll mess around with it a bit after work tonight.

I appreciate you bro! Thanks for all you do, in this crazy quest of home automation:-)

@sherrell This is great, thank you! As for your question regarding checking when the service call has finished, I am pretty beginner with HA so I can’t help you much I’m afraid, sorry. Hopefully someone here will be able to give you an answer.

@ffm777 I think I’m gonna change the delay to something like 2 seconds or so, 1 second seems to be a too short delay as I’m still receiving previous snapshots…

@Corey_Maxim That’s quite possible, if nothing has triggered the camera it will show an old picture. But, if the camera is armed, it should update the picture about 2-3 seconds after the recording has stopped. It’s all triggered by a media upload notification from Arlo. And if you click on the captured icon - it looks like a video folder - you’ll get a grid of previous recordings.

@woodmoose I’m not new to coding but very new to HA. I’m just trying to work out if call service returns immediately or it waits for the underlying service to finish. If it returns immediately we’re going to need a mechanism to indicate when the snapshot is complete and the file has actually been written. I’ll try and run some tests tonight.

Hands down, this is the best camera component I have used in HA! What a HUGE improvement over the original one and the native app. Arlo should hire you! Lol

Great work my man!

Maybe i can save you the regular camera snapshot call.
After the Aarlo snapshot. Call the camera api image to be sent directly to your notification look at my script,

'Doorbell_001':
  alias: Doorbell
  sequence:
  - data:
      data:
        image: https://*your server*.duckdns.org:8123/api/camera_proxy/camera.*your arlo camera*?api_password=*your API password*
        tag: '1'
      message: '{{ as_timestamp(now()) | timestamp_custom(''%H:%M'', true) }}'
      title: Ding Dong
    service: notify.frank

I call this script 3 seconds after an automation that call an aarlo snapshot and it works well.
(the time factor will depend on your network speed in relation to communicating with the Arlo server)

hope it helps

If i’m not mistaking right now the camera motion sensor will report movement but not that the movement as stopped.