node-red-arlo-flow

node-red-arlo-flow

A very simple set of flows to :

  • Connect to Arlo API using simple http request node
  • Get user-id, deviceId and other interesting information from media library of your devices
  • Start recording with a camera (tested on Arlo go, feel free to use it with other models and give feedback)

This was inspired by https://git.lehouerou.net/laurent/arlo-go and https://robertogallea.com/posts/development/netgear-arlo-system-api

Feedback welcome!

[{"id":"448d8343.e99d0c","type":"tab","label":"Arlo","disabled":false,"info":""},{"id":"67aa7a18.aef764","type":"inject","z":"448d8343.e99d0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":420,"y":380,"wires":[["6984125d.352cac"]]},{"id":"6984125d.352cac","type":"function","z":"448d8343.e99d0c","name":"","func":"\npayload={\"email\":\"youremail\",\"password\":\"yourpassword\"};\n\nmsg.payload=payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":590,"y":380,"wires":[["96651c2.06c94e"]]},{"id":"fee937e1.8fc818","type":"http request","z":"448d8343.e99d0c","name":"POST","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://arlo.netgear.com/hmsweb/login/v2","tls":"","persist":false,"proxy":"","authType":"","x":1020,"y":380,"wires":[["17070501.bdcf5b","7f353a1b.eda634"]]},{"id":"17070501.bdcf5b","type":"debug","z":"448d8343.e99d0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1280,"y":380,"wires":[]},{"id":"96651c2.06c94e","type":"change","z":"448d8343.e99d0c","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"application/json","tot":"str"},{"t":"set","p":"headers.charset","pt":"msg","to":"UTF-8","tot":"str"},{"t":"set","p":"headers.User-Agent","pt":"msg","to":"PostmanRuntime/7.26.5","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":380,"wires":[["fee937e1.8fc818"]]},{"id":"d2eca9f1.a91928","type":"inject","z":"448d8343.e99d0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":410,"y":480,"wires":[["247b5279.366bde"]]},{"id":"2a61156f.45984a","type":"http request","z":"448d8343.e99d0c","name":"GET","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://arlo.netgear.com/hmsweb/users/devices","tls":"","persist":false,"proxy":"","authType":"","x":1010,"y":480,"wires":[["323738b0.a5ec28","b400705.019fe9","2fe7d06c.d42f9","9d301773.927468"]]},{"id":"323738b0.a5ec28","type":"debug","z":"448d8343.e99d0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1270,"y":480,"wires":[]},{"id":"247b5279.366bde","type":"change","z":"448d8343.e99d0c","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"application/json","tot":"str"},{"t":"set","p":"headers.charset","pt":"msg","to":"UTF-8","tot":"str"},{"t":"set","p":"headers.User-Agent","pt":"msg","to":"PostmanRuntime/7.26.5","tot":"str"},{"t":"set","p":"headers.Authorization","pt":"msg","to":"yourtoken","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":480,"wires":[["2a61156f.45984a"]]},{"id":"cc1b17b4.e2d178","type":"comment","z":"448d8343.e99d0c","name":"1- Get token & userId","info":"","x":300,"y":340,"wires":[]},{"id":"60a3e512.2705cc","type":"comment","z":"448d8343.e99d0c","name":"2- Get Devices","info":"","x":270,"y":440,"wires":[]},{"id":"ee474286.11858","type":"inject","z":"448d8343.e99d0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":410,"y":620,"wires":[["486a94e4.f13e0c"]]},{"id":"170613bf.c3ea8c","type":"http request","z":"448d8343.e99d0c","name":"GET","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://arlo.netgear.com/hmsweb/users/locations","tls":"","persist":false,"proxy":"","authType":"","x":1010,"y":620,"wires":[["2d704e39.86a032"]]},{"id":"2d704e39.86a032","type":"debug","z":"448d8343.e99d0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1270,"y":620,"wires":[]},{"id":"486a94e4.f13e0c","type":"change","z":"448d8343.e99d0c","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"application/json","tot":"str"},{"t":"set","p":"headers.charset","pt":"msg","to":"UTF-8","tot":"str"},{"t":"set","p":"headers.User-Agent","pt":"msg","to":"PostmanRuntime/7.26.5","tot":"str"},{"t":"set","p":"headers.Authorization","pt":"msg","to":"yourtoken","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":620,"wires":[["170613bf.c3ea8c"]]},{"id":"7c547633.20e868","type":"comment","z":"448d8343.e99d0c","name":"3- Get Friends","info":"","x":260,"y":580,"wires":[]},{"id":"f4670980.bf7b98","type":"inject","z":"448d8343.e99d0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":440,"y":1080,"wires":[["9db7902b.6b9fe"]]},{"id":"9db7902b.6b9fe","type":"function","z":"448d8343.e99d0c","name":"","func":"//change userid, deviceId \n\npayload={\n    \"from\":         \"userid_web\",\n    \"to\":           \"deviceId\",\n    \"action\":       \"set\",\n    \"resource\":     \"cameras/deviceId\",\n    \"transId\":      \"web!3975ac7b.ebb3a8!1504266382584\", //random number\n    \"publishResponse\":    true,\n    \"properties\": {\n        \"activityState\": \"startUserStream\",\n\t\t\t\"cameraId\":  \"deviceId\",\n    }\n}\n\n\nmsg.payload=payload;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":610,"y":1080,"wires":[["1edd0fe4.aa66f"]]},{"id":"3cf25cab.08f134","type":"http request","z":"448d8343.e99d0c","name":"POST","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://arlo.netgear.com/hmsweb/users/devices/startStream","tls":"","persist":false,"proxy":"","authType":"","x":1040,"y":1080,"wires":[["d3cb86e5.486a08"]]},{"id":"d3cb86e5.486a08","type":"debug","z":"448d8343.e99d0c","name":"Start Stream","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1330,"y":1080,"wires":[]},{"id":"1edd0fe4.aa66f","type":"change","z":"448d8343.e99d0c","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"application/json","tot":"str"},{"t":"set","p":"headers.charset","pt":"msg","to":"UTF-8","tot":"str"},{"t":"set","p":"headers.User-Agent","pt":"msg","to":"PostmanRuntime/7.26.5","tot":"str"},{"t":"set","p":"headers.Authorization","pt":"msg","to":"yourtoken","tot":"str"},{"t":"set","p":"headers.xcloudId","pt":"msg","to":"xcloudId","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":1080,"wires":[["3cf25cab.08f134"]]},{"id":"d215143e.35e248","type":"comment","z":"448d8343.e99d0c","name":"1- Start stream (necessary before triggering recording)","info":"","x":300,"y":1040,"wires":[]},{"id":"52d61013.037d2","type":"inject","z":"448d8343.e99d0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":420,"y":1320,"wires":[["1a05bca0.cc7c23"]]},{"id":"1a05bca0.cc7c23","type":"function","z":"448d8343.e99d0c","name":"","func":"//change deviceID and xcloudid\npayload={\"deviceId\": \"deviceId\",\n    \"parentId\": \"deviceId\",\n    \"xcloudId\": \"xcloudId\",\n    \"olsonTimeZone\": \"Europe/Amsterdam\"} //your timezone\n\nmsg.payload=payload;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":590,"y":1320,"wires":[["c188dd9c.cc5e6"]]},{"id":"19436ea4.088911","type":"http request","z":"448d8343.e99d0c","name":"POST","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://arlo.netgear.com/hmsweb/users/devices/stopRecord","tls":"","persist":false,"proxy":"","authType":"","x":1020,"y":1320,"wires":[["43c13e81.cc18f"]]},{"id":"43c13e81.cc18f","type":"debug","z":"448d8343.e99d0c","name":"Stop record","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1280,"y":1320,"wires":[]},{"id":"dbec0d03.00f4d","type":"comment","z":"448d8343.e99d0c","name":"3- Stop record (seems to be optional for me, recording stops around 30s anyway)","info":"","x":380,"y":1280,"wires":[]},{"id":"5fd08b90.9c17c4","type":"inject","z":"448d8343.e99d0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":420,"y":1200,"wires":[["c61ef084.7e491"]]},{"id":"c61ef084.7e491","type":"function","z":"448d8343.e99d0c","name":"","func":"msg.header={\"Content-Type\":\"application/json\",\"charset\":\"UTF-8\",};\n\npayload={\"deviceId\": \"deviceId\",\n    \"parentId\": \"deviceId\",\n    \"xcloudId\": \"xcloudId\",\n    \"olsonTimeZone\": \"Europe/Amsterdam\"} //your timezone\n\nmsg.payload=payload;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":590,"y":1200,"wires":[["2b79c53c.c67e8a"]]},{"id":"cd2d5ea9.f9a58","type":"http request","z":"448d8343.e99d0c","name":"POST","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://arlo.netgear.com/hmsweb/users/devices/startRecord","tls":"","persist":false,"proxy":"","authType":"","x":1020,"y":1200,"wires":[["7bac3ce1.c38284"]]},{"id":"7bac3ce1.c38284","type":"debug","z":"448d8343.e99d0c","name":"Start record","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1280,"y":1200,"wires":[]},{"id":"2b79c53c.c67e8a","type":"change","z":"448d8343.e99d0c","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"application/json","tot":"str"},{"t":"set","p":"headers.charset","pt":"msg","to":"UTF-8","tot":"str"},{"t":"set","p":"headers.User-Agent","pt":"msg","to":"PostmanRuntime/7.26.5","tot":"str"},{"t":"set","p":"headers.Authorization","pt":"msg","to":"yourtoken","tot":"str"},{"t":"set","p":"headers.xcloudId","pt":"msg","to":"xcloudId","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":1200,"wires":[["cd2d5ea9.f9a58"]]},{"id":"24b7ece9.9fc2b4","type":"comment","z":"448d8343.e99d0c","name":"2- Start record - will appear as manual in your recordings","info":"","x":310,"y":1160,"wires":[]},{"id":"c188dd9c.cc5e6","type":"change","z":"448d8343.e99d0c","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"application/json","tot":"str"},{"t":"set","p":"headers.charset","pt":"msg","to":"UTF-8","tot":"str"},{"t":"set","p":"headers.User-Agent","pt":"msg","to":"PostmanRuntime/7.26.5","tot":"str"},{"t":"set","p":"headers.Authorization","pt":"msg","to":"yourtoken","tot":"str"},{"t":"set","p":"headers.xcloudId","pt":"msg","to":"xcloudId","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":1320,"wires":[["19436ea4.088911"]]},{"id":"de84779f.75e398","type":"inject","z":"448d8343.e99d0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":410,"y":740,"wires":[["a1c1d39.1d9fe3"]]},{"id":"a1c1d39.1d9fe3","type":"function","z":"448d8343.e99d0c","name":"","func":"payload={\"dateFrom\": \"20201227\",\"dateTo\": \"20201227\"};\n\nmsg.payload=payload;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":580,"y":740,"wires":[["6f2d84d2.fd284c"]]},{"id":"4a4e933e.62d90c","type":"http request","z":"448d8343.e99d0c","name":"POST","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://arlo.netgear.com/hmsweb/users/library","tls":"","persist":false,"proxy":"","authType":"","x":1010,"y":740,"wires":[["4c553e18.c2cb"]]},{"id":"4c553e18.c2cb","type":"debug","z":"448d8343.e99d0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1270,"y":740,"wires":[]},{"id":"6f2d84d2.fd284c","type":"change","z":"448d8343.e99d0c","name":"Set Headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"application/json","tot":"str"},{"t":"set","p":"headers.charset","pt":"msg","to":"UTF-8","tot":"str"},{"t":"set","p":"headers.User-Agent","pt":"msg","to":"PostmanRuntime/7.26.5","tot":"str"},{"t":"set","p":"headers.Authorization","pt":"msg","to":"yourtoken","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":740,"wires":[["4a4e933e.62d90c"]]},{"id":"b27a48.94efd5b8","type":"comment","z":"448d8343.e99d0c","name":"4- Get Library","info":"","x":260,"y":700,"wires":[]},{"id":"bf001380.60551","type":"comment","z":"448d8343.e99d0c","name":"Arlo flow to control an Arlo go camera","info":"","x":850,"y":60,"wires":[]},{"id":"1042538a.855e5c","type":"comment","z":"448d8343.e99d0c","name":"change token","info":"","x":790,"y":440,"wires":[]},{"id":"18fabb55.2f0805","type":"comment","z":"448d8343.e99d0c","name":"change token","info":"","x":790,"y":580,"wires":[]},{"id":"cabb17f6.a5e638","type":"comment","z":"448d8343.e99d0c","name":"change token","info":"","x":790,"y":700,"wires":[]},{"id":"5f2c289e.871828","type":"comment","z":"448d8343.e99d0c","name":"change date range","info":"","x":570,"y":700,"wires":[]},{"id":"84dc99ce.8f5aa8","type":"comment","z":"448d8343.e99d0c","name":"get your camera and user id","info":"","x":1320,"y":440,"wires":[]},{"id":"7f353a1b.eda634","type":"debug","z":"448d8343.e99d0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.data","targetType":"msg","statusVal":"","statusType":"auto","x":1290,"y":320,"wires":[]},{"id":"b400705.019fe9","type":"debug","z":"448d8343.e99d0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.data[0].deviceId","targetType":"msg","statusVal":"","statusType":"auto","x":1580,"y":540,"wires":[]},{"id":"2fe7d06c.d42f9","type":"debug","z":"448d8343.e99d0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.data[0].parentId","targetType":"msg","statusVal":"","statusType":"auto","x":1700,"y":580,"wires":[]},{"id":"9d301773.927468","type":"debug","z":"448d8343.e99d0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.data[0].xCloudId","targetType":"msg","statusVal":"","statusType":"auto","x":1920,"y":640,"wires":[]},{"id":"2ae24aab.347226","type":"comment","z":"448d8343.e99d0c","name":"Before starting - removing 2 factors authentication in myArlo","info":"","x":860,"y":140,"wires":[]},{"id":"8dcb529b.ef032","type":"comment","z":"448d8343.e99d0c","name":"Before starting - create a dedicated account for API access","info":"","x":860,"y":100,"wires":[]},{"id":"88c1e11b.7ae8c","type":"comment","z":"448d8343.e99d0c","name":"This shows how to manually trigger recording","info":"","x":250,"y":940,"wires":[]},{"id":"d1949a89.928958","type":"comment","z":"448d8343.e99d0c","name":"This shows how to get important configuration data such as token, useid, deviceID, etc","info":"","x":400,"y":280,"wires":[]},{"id":"705c6f0c.c5d7","type":"comment","z":"448d8343.e99d0c","name":"change token & xcloudid","info":"","x":810,"y":1280,"wires":[]},{"id":"f1709d69.7899d","type":"comment","z":"448d8343.e99d0c","name":"change token & xcloudid","info":"","x":810,"y":1160,"wires":[]},{"id":"e6806b40.2b61a8","type":"comment","z":"448d8343.e99d0c","name":"change token & xcloudid","info":"","x":830,"y":1020,"wires":[]},{"id":"ed9fdec6.0c4cd","type":"comment","z":"448d8343.e99d0c","name":"change e-mail & password","info":"","x":590,"y":340,"wires":[]}]

Flow Info

Created 4 years, 8 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x7)
  • comment (x21)
  • debug (x11)
  • function (x5)
  • http request (x7)
  • inject (x7)
Other
  • tab (x1)

Tags

  • arlo
  • camera
  • IOT
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option