Arlo Camera Integration

I am able to arm/disarm Arlo and enable my two Arlo cameras using Hubitat virtual switch devices and a Flask webapp installed on a Raspberry Pi 3. I then added Hubitat Rules to control the cameras using Day, Evening, Night and Away modes. No IFTTT needed!!

BTW: You actually don't need a Raspberry Pi. For testing purposes, I installed the Flask web app on my MacBook Pro first, then moved the web app to my Pi so that it would run 24/7.

My steps:

  1. Installed tchellomello's Python Arlo library on my Raspberry Pi:
    GitHub - tchellomello/python-arlo: Python Arlo is a library written in Python 2.7/3x that exposes the Netgear Arlo cameras as Python objects.
  2. Installed Flask web server on the Raspberry Pi:
    https://projects.raspberrypi.org/en/projects/python-web-server-with-flask
  3. Created the Flask webapp app.py listed below in my Pi home directory in a "webapp" subdirectory.
  4. Created a bash script to start Flask using the IP address of my Raspberry Pi and port 5000.
  5. Created two Hubitat httpGetSwitch virtual devices, one to arm/disarm Arlo and the second to enable/disable my Arlo cameras. I set the on/off switch URIs to the Flask web app arm/disarm URLs (eg, 10.0.1.13:5000/armArlo and 10.0.1.13:5000/disarmArlo).
  6. I created Rules using the virtual switches as actions for Day, Evening, Night and Away modes.

After turning on or off one of the Hubitat virtual switches, I am able to confirm success by logging into my iPhone Arlo app.

See latest version of my Flask app.py code in post below.


HTML files installed in the Flask"webapp" directory "templates" sub-directory:

index.html:

index.html


runWebApp.sh:

#! bin/bash
cd ~/webapp/
export FLASK_APP=app.py
python3 -m flask run -h 10.0.1.13 -p 5000

1 Like

Link to the Hubitat httpGetSwitch groovy code:

1 Like

Update: I am now able to see the status of the Arlo camera control virtual switches in my Hubitat dashboard by increasing the GET request timeouts in the httpGetSwitch.groovy code:

My Flask app.py code to arm/disarm Arlo and enable/disable cameras:

1 Like

Are you able to activate different custom Modes for the Arlo? One of the biggest limitations to the IFTTT integration is that I can only choose between the built-in Arm or Disarm modes. I'd really like to be able to switch between my custom modes.

1 Like

You should be able to activate custom Arlo base station modes by adding additional URIs to the Flask app.py web app:

customMode

(See tchellomello’s Arlo pyarlo docs here: https://python-arlo.readthedocs.io. You can request all Arlo mode names using the method ‘available_modes’.)

Unfortunately, Arlo just notified all users that they will require two-step login verification by the end of the year, which will break the login for app.py. I’m not sure if Arlo supports long-running sessions, but I was thinking of adding a login page to app.py to allow entry of the the verification security code (If tchellomello can add a method to enter the code....)

1 Like

Thanks! I'll definitely have to look into trying this out.

Pity that Arlo seems intent on crippling it, though :frowning:

1 Like

I successfully migrated my Flask app to the more-stable NGINX web server by following the directions here:

I substituted the article directory "flasktest" with my directory "webapp", and I substituted my "app.py" for the author's "testSite1.py".

I contacted the developer of the PyArlo library, who unfortunately is no longer maintaining it. He did refer me to this Home Assistant project which uses the PyArlo library:


He hopes that the Home Assistant folks may be able update the PyArlo library to deal with Arlo's anticipated 2-factor authentication.

1 Like

Looks like Arlo made recent changes to their API that seem to have broken my Hubitat-Arlo integration using the the PyArlo library ;-(

Since the developers of Home Assistant appear to be keeping up-to-date with Arlo's API, I hope there may be a way to adapt their code to work with Hubitat sometime in the future.

I was able to get my Arlo-Hubitat integration working again (for now) by editing the PyArlo file const.py line API_URL from "https://arlo.netgear.com/hmsweb" to "https://my.arlo.com/hmsweb" and removing the removing the "v2" from the end of the LOGIN_ENDPOINT.

2 Likes

Anyone looked at GitHub - twrecked/pyaarlo: Asynchronous Arlo Component for Python - appears to support 2FA too.

I created a Python Flask web app using wrecked pyaarlo library to enable/disable my cameras and to arm/disarm Arlo. I used my Arlo admin account as the login credentials and used a Arlo Friend account to view the results on my iPhone. I used the default asynchronous mode, but so far the web app is working fine. I still haven't enabled 2FA on Arlo using twrecked's amazing 2FA solution, but I may have the confidence to do that soon.

I've attached a jpg of my Flask webapp app.py.

1 Like

Did you find any way to get Arlo video/snapshots into a dashboard (if saved locally to the Arlo Base station)?

Hubitat doesn't support video yet, so there is no way to include video in the dashboard.

Ok, thank you!

There is a solution now for Arlo video feeds on a dashboard via TinyCam (see other posts on this subject)...

But the cameras should be powered (eg. use the USB power) since they will be constantly activate in order to provide the feed via tinyCam and so should not be powered by battery.

2 Likes

Has anyone hear taken a look at the code for Arlopilot that was on the other system. As i understand it, the app should work in this environment since it would be local to each of our homes instead out of their cloud. The joy of hubitat being all local

The good news is that because since you’re using your IP the commands go through and aren’t blocked as not being the official integration from the vendor who shall not be named :sunglasses:. The main hurdle that needs to be overcome is the 2FA that Arlo put into place recently - up until then I had been able to do an ugly simulation through webCore that would allow authentication and a mode change.

I personally think the Hubitat team should be providing out of the box integrations for popular systems like this. Jeez, even Stringify had a really good integration with Arlo. Why is an integration not available here? Would Arlo charge Hubitat loads of dosh for access or something? Or is it really hard to build a camera integration for simple motion detection and arm/disarm functionality? @bcopeland @bravenel

1 Like

My personal opinion is that it is more an Arlo issue and them wanting to keep it closed off more. Feels like they are trying to force people to always use their app and cloud storage service.

This is why I asked about Arlo Pilot. The original author left the other platform a long time ago and has been here for a while. He is already involved with a wonderful app called HubConnect. Yep he is one of those guys. If that app was fully ported and had a log in method that took care of 2FA it could be effectively enabled to allow to allow for Arlo mode control from the Hubitat. It doesn't allow triggers to be used though.

I also agree with @thebearmay in that arlo wants to keep their platform kind of isolated and i don't think they have any published API's for external systems to use. I think this is probably important since they want to charge for certain features that you could possibly try to automate with a external platform like Hubitat.