Arm/Disarm Arlo using Node-RED

For anyone trying to replace the, in my experience very dodgey and unreliable, Arlo geofencing, I made this flow that also integrates Hubitat nodes as a sort of schedule.

Code:

[{"id":"7e547b10.f1db64","type":"tab","label":"Arlo Geofenced Schedule","disabled":false,"info":""},{"id":"3a9c918f.31e2ee","type":"arlo-out","z":"7e547b10.f1db64","name":"240 Basestation","service":"283e8204.4178ae","device":"4R03777PA2C83","x":900,"y":180,"wires":[]},{"id":"8b43b0a6.e46b7","type":"inject","z":"7e547b10.f1db64","name":"Arm","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"mode","payload":"true","payloadType":"bool","x":890,"y":120,"wires":[["3a9c918f.31e2ee"]]},{"id":"80ce59ce.052888","type":"inject","z":"7e547b10.f1db64","name":"Disarm","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"mode","payload":"false","payloadType":"bool","x":890,"y":240,"wires":[["3a9c918f.31e2ee"]]},{"id":"5c164add.bdd174","type":"BooleanLogicUltimate","z":"7e547b10.f1db64","name":"","filtertrue":"both","persist":true,"sInitializeWith":"false","triggertopic":"trigger","outputtriggeredby":"all","inputCount":"2","topic":"scheduled_presence","x":680,"y":240,"wires":[[],["e50f92be.bbfd7"],[]]},{"id":"135bf1b8.6d288e","type":"hubitat mode","z":"7e547b10.f1db64","name":"","server":"b130c189.ea4d2","sendEvent":true,"x":150,"y":220,"wires":[["ac32b038.b96a8"]]},{"id":"2fe516ec.e6bc6a","type":"change","z":"7e547b10.f1db64","name":"Arm","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":240,"wires":[["5c164add.bdd174"]]},{"id":"adf74fc0.5e5d2","type":"change","z":"7e547b10.f1db64","name":"Disarm","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":200,"wires":[["5c164add.bdd174"]]},{"id":"ac32b038.b96a8","type":"switch","z":"7e547b10.f1db64","name":"Mode Switch","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Day","vt":"str"},{"t":"eq","v":"Evening","vt":"str"},{"t":"eq","v":"Night","vt":"str"},{"t":"eq","v":"Away","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":290,"y":220,"wires":[["adf74fc0.5e5d2"],["2fe516ec.e6bc6a"],["2fe516ec.e6bc6a"],["2fe516ec.e6bc6a"]]},{"id":"e50f92be.bbfd7","type":"change","z":"7e547b10.f1db64","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"mode","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":180,"wires":[["3a9c918f.31e2ee"]]},{"id":"427bee3c.6d4c1","type":"hubitat device","z":"7e547b10.f1db64","name":"Presence - Overall","server":"b130c189.ea4d2","deviceId":"198","attribute":"presence","sendEvent":true,"x":150,"y":120,"wires":[["fa6f0afc.8b33a8"]]},{"id":"bc14a7b4.79cf28","type":"change","z":"7e547b10.f1db64","name":"Arm","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":140,"wires":[["135bf1b8.6d288e","5c164add.bdd174"]]},{"id":"fa6f0afc.8b33a8","type":"switch","z":"7e547b10.f1db64","name":"Presence","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"present","vt":"str"},{"t":"eq","v":"not present","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":320,"y":120,"wires":[["e84f9d5c.7fd68"],["bc14a7b4.79cf28"]]},{"id":"e84f9d5c.7fd68","type":"change","z":"7e547b10.f1db64","name":"Disarm","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":100,"wires":[["135bf1b8.6d288e","5c164add.bdd174"]]},{"id":"d57b1566.afcb68","type":"inject","z":"7e547b10.f1db64","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":60,"wires":[["427bee3c.6d4c1"]]},{"id":"283e8204.4178ae","type":"arlo-config","z":"","name":"KMK Arlo"},{"id":"b130c189.ea4d2","type":"hubitat config","z":"","name":"Beach House Hubitat Config","usetls":false,"host":"192.168.2.240","port":"80","appId":"801","nodeRedServer":"http://192.168.2.253:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false}]

Flow:

On another note, does anyone know if it is possible to be in multiple modes at a given time in Hubitat? Like for now I have Arlo arming in evening and night, so basically sunset to 9am, but honestly that is a bit too big of a range, so I may have to rethink how to generate a "Schedule".

Oh my god node-red is like having and knowing the presidential nuclear codes, I have nothing but the utmost respect for anyone that can node-red.

1 Like

Does anyone know of a set of nodes in NR that handle schedules. I know there are nodes check for certain times of day, but I was hoping for something with less work, basically like a mode manager but for NR is kinda what I am looking for.

Then again I could just make a sub flow with the time nodes to do this but that is one time configurable to my knowledge which is a bit annoying. Is there any way to configure a single instance of a generic subflow?

The scheduling nodes I usually use (in no particular order) are:

BigTimer
CronPlus
Time Range
Time Switch

The other thing I am now doing is storing "mode" in a Node-RED global and instead of a string value it's now a JSON object that I can test. I also set the HE modes based on this instead of using the "Mode Manager" app.

{"away":false,"guests":false,"alert":false,"timePeriod":"Night","alertMsgs":[]}

I use BigTimer to handle the changes.. I also use MQTT to "trigger" events that I can trap elsewhere. The following sets the "timePeriod" part of my mode object and syncs the Mode using that value on all my HE Hubs.

The "Get Mode ID" subflow queries the relevant HE hub to get the proper Mode ID which is then used with the "Set Mode" node. EDIT: the NO-OP node is for prettifying, doesn't do anything.

2 Likes

Guys, guys. There are other threads for general questions on Node-RED. Use search and you will find them. Let's keep this thread specifically for Arlo please. That's why it was created in the first place to see if we can get this palette working better.

2 Likes

Sorry for going off topic, I figured that if people are replacing their geofencing from the app, they would want not only geofencing, but also a schedule, which is why I asked about how to handle a specific schedule outside of HE modes. I thought it would be helpful to anyone that found this thread and wanted to implement it as a replacement without going to multiple places. Not an excuse, simply an explanation of my thought process.

Is everyone's setup still working properly? I noticed it was not arming properly anymore so when I went to investigate and when trying to get a list of the devices on the account this error comes up:

TypeError: Cannot read property 'arlo' of undefined
    at /mnt/dietpi_userdata/node-red/node_modules/node-red-contrib-arlo/arlo.js:10:10
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/local/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/usr/local/lib/node_modules/node-red/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
    at /usr/local/lib/node_modules/node-red/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/usr/local/lib/node_modules/node-red/node_modules/express/lib/router/index.js:335:12)
    at next (/usr/local/lib/node_modules/node-red/node_modules/express/lib/router/index.js:275:10)
    at expressInit (/usr/local/lib/node_modules/node-red/node_modules/express/lib/middleware/init.js:40:5)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)

This is what shows up in the debug log:

10/5/2020, 9:20:55 PMnode: 240 Basestation
msg : string[17]
"Service not ready"

It's still working fine for me.

Weird, any idea on what that error is? I tried to find a way to contact the developer of these nodes but it does not look like he has a github for the nodes. Any ideas on where to get some additional troubleshooting help?

I recall there is a github because I was browsing the code a while back. I guess I just Googled it and found it. But it seems like the author is not very engaged. There was really no discussion on the github last time I looked. A couple of people asking questions and no response.

I think I figured out why and it has to do with 2FA, any workarounds for this? I submitted an official request to Netgear to enable the generation of One-Time or App passwords for their accounts. If you guys do the same I assume it will be more likely to be implemented and that would probably make it so the dev of the nodes does not have to figure out 2FA on his side.

I highly doubt that Arlo/Netgear have a slimmest care for their user base. The exposure of custom modes has been requested for several years by a LOT of people and they just do not care.

You are welcome to do what you want, but I do not feel that saying that is helpful to anyone. If you don't like their product or their service they provide to their community then don't support them, but shying people away from making their voice heard in the chance that they actually might change is not helpful. People and companies are only going to change if they are given a chance. That is what I am doing, letting my voice be heard giving them a chance to implement. If they don't, so be it, it is not like they have a monopoly on battery powered outdoor security cameras, I just rather not replace them if I do not have to. Now I am not trying to attack you, I am simply trying to explain what I did and why I did it.

It won't work with 2FA. I've deliberately not implemented that for this reason. But time is running out before they enforce it. Boo Arlo.

I agree with @tray_e, Arlo have no regard for their client base whatsoever. I've been asking (along with many others) for the custom modes to be accessible via IFTTT, literally for years now and they don't give a damn. So sure, we can lobby but it's to deaf ears.

I will likely give this system away or sell it and chalk it up as a mistake.

2 Likes

I wasn't saying not to try. I was just saying do not get your hopes up and that maybe pursue a more proactive approach that doesn't rely on Arlo for support.

Specifically, This chain that has been going on since 2016 and has 24 pages of people commenting (Which this was the preferred method of requesting new features back in 2016)

2 Likes

Exactly correct.

2 Likes

We are both in that thread multiple times LOL

2 Likes

What are you guys thinking about transitioning to when they break the proverbial camel's back, probably with 2FA? The community driven Blink integration looks interesting.

I will probably add more Nest cameras. So far, the Nest integration is coming along nicely.

For me, I have the new version of Nest Aware (Transferred to Google account). So, the subscription covers all cameras in the same home. The benefits are that the Nest appear to be the only ones with zero lag (since they are recording 24/7 when armed). With other cameras, all I was ever catching was the images about 15 to 20 seconds AFTER the trigger of the even. Arlo may have gotten better, but I would not know as I now only use them inside and haven't had any triggers since I moved them.

Right now I have a couple of Webhooks firing off IFTTT (the only 2 applets I have left there) but am looking at how twrecked is doing his Python 2FA (GitHub - twrecked/hass-aarlo: Asynchronous Arlo Component for Home Assistant) for it. May have potential to be ported, but looks to be a little beyond my skillset at the moment - won't stop me from analyzing and seeing if I can break out the key elements though.