Closed DannyYCCheng closed 3 years ago
Can you try the previous release and let me know whether it works for you or not?
Oh, just reread what you wrote... These cameras don't work without a base station. Are you saying someone gave you a camera but not a base station? If so, the camera is useless.
The device is 'shared' with us from our builder - it is a camera they have installed for our new house build. So they own the admin access to the camera, and we can view it. We don't physically have the camera.
I can access the camera via the Arlo app or from the browser, but I don't have access to the base station, not based on what I can see from the app or when I do arlo.GetDevices('basestation')
. I do think it is probably outside of what your code was intended for, but thought I'd check before I give up :)
Update: looking at the app, it says the device is connected to '5TN29B***' (13 letter/digit value). Would this be the base station? If so can I manually enter this information in the code?
Can you please run this little helper script and paste the results here?
[
{
"arloMobilePlan": false,
"cvrEnabled": false,
"dateCreated": 1603743296074,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 1,
"firmwareVersion": "1.125.15.0_35_1191",
"interfaceSchemaVer": "1",
"interfaceVersion": "i006",
"lastImageUploaded": "true",
"lastModified": 1605055816335,
"mediaObjectCount": 0,
"modelId": "VMC4030P",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H6",
"modelId": "VMC4030P",
"olsonTimeZone": "Pacific/Auckland"
},
"state": "provisioned",
"uniqueId": "XXXXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXXX-XXX-XXXXXXXX",
"userRole": "USER",
"xCloudId": "XXXXXXXX-XXXX-XXX-XXXXXXXXX"
}
]
How did you get on with the results? Please let me know if you require further information from my end :)
@DannyYCCheng can you try with the previous version of the library. Also, are the deviceid and parentid the same?
The latest previous version is arlo==1.2.35
, that didn't work...
No the deviceid
and parentid
are different.
FYI happy to park this in the too hard basket because i don't have access to the basestation info :)
If the arlo website can read that camera, you should be able to as well using this library.
The only way to figure it out would be to open the arlo web app and use the developer tools to watch the network traffic to figure out what http requests it's making to connect to that camera.
My Arlo basestation died about a year ago and I haven't been able to bring myself to fork over the money to buy another Arlo product... :)
I'd be happy to jump on a screen share with you to take a look if you want.
The only way to figure it out would be to open the arlo web app and use the developer tools to watch the network traffic to figure out what http requests it's making to connect to that camera.
Yep I was thinking of doing that... do you have an example of what that HTTP request looks like? I'll take a look when I have a minute
I'd be happy to jump on a screen share with you to take a look if you want.
Thanks for the offer, keen to give this a crack myself, will let you know if I need help
Before you log in to the Arlo web app, right-click anywhere on the Arlo web app webpage and select "Inspect". That will open the browser's developer tools. From there, click on the "Network" tab, check the "Preserve log" checkbox, and then login.
Once you're logged in, you should see a bunch of HTTP requests.
Arlo using something called "server-sent events" a.k.a. "EventStream": https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events
The Arlo API works by "subscribing" to the EventStream by making an HTTP request to the `/notify' API endpoint. The server keeps this request open indefinitely. It is the channel the server uses to push information to the browser. The browser interacts with the server by making HTTP requests, and receiving responses via the EventStream. This allows for asynchronous messaging.
The way I go about deciphering the API is to invoke the action I care about via the web app and watch the HTTP requests being made.
If you want to, click on the button to start the video stream for the shared camera and past all of the network traffic here and I'll see if I can make sense of it.
I suspect you are mainly interested in the post/get? These are in chronological order, I've copied what I can see as the unique post/gets.
POST: https://myapi.arlo.com/hmsweb/users/devices/startStream?eventId=FE!ad271b44-e289-4917-98b2-4310b61d523a&time=1605560686705
GET: https://arlostreaming30-z3-prod.wowza.arlo.com:80/stream/A2S10270A10F3_1605560626323.mpd?egressToken=7bbe77d8_f8ad_4d31_8afa_52e0e0fc6ff7&userAgent=web&cameraId=A2S10270A10F3_1605560626323&txnId=FE!ad271b44-e289-4917-98b2-4310b61d523a&watchalong=true
GET: https://arlostreaming30-z3-prod.wowza.arlo.com:80/stream/chunk-A2S10270A10F3_1605560626323-0-00029.m4s
GET: https://arlostreaming30-z3-prod.wowza.arlo.com:80/stream/chunk-A2S10270A10F3_1605560626323-0-00030.m4s
POST: https://myapi.arlo.com/hmsweb/users/devices/notify/5TN29B7EA1316?eventId=FE!558d6228-853b-4567-b2bc-2b8976588052&time=1605560694619
I could also export the whole log as HAR although I suspect that might be excessive, please let me know if you prefer that instead.
Take a look around a the requests prior to those. Look for requests made to get device info. I know a year ago it was /devices
.
I believe the first is the camera and the second is the basestation (which I do not have direct access to)
https://myapi.arlo.com/hmsweb/users/devices/notify/A2S10270A10F3?eventId=FE!5096b7b4-1309-4e9e-bfec-971238a300af&time=1605561700162 https://myapi.arlo.com/hmsweb/users/devices/notify/5TN29B7EA1316?eventId=FE!693f71b5-764f-4357-abb1-248b9f48c372&time=1605561704738
You need to get the response from the HTTP request to /devices
(or something like that). What you just pasted is /devices/notify
.
I led you astray... What we need are the requests that happen immediately after you login. Also the ones that happen when you click on the tab to view your shared camera. You are looking for the list of devices (basestations, cameras, etc).
This is the request:
{
"pageref": "page_1",
"startedDateTime": "2020-11-17T10:53:37.177+13:00",
"request": {
"bodySize": 0,
"method": "GET",
"url": "https://myapi.arlo.com/hmsweb/v2/users/devices?t=1605563616541&eventId=FE!05a16e9e-78ee-48d1-b15e-c2e7f6b02e08&time=1605563616542",
"text": "{\"data\":[{\"userId\":\"\",\"deviceId\":\"A2S10270A10F3\",\"parentId\":\"5TN29B7EA1316\",\"uniqueId\":\"YURAZP-259-51500182_A2S10270A10F3\",\"deviceType\":\"camera\",\"deviceName\":\"Bramley\",\"lastModified\":1605563616830,\"firmwareVersion\":\"1.125.15.0_35_1191\",\"xCloudId\":\"\",\"lastImageUploaded\":\"true\",\"userRole\":\"USER\",\"displayOrder\":1,\"presignedLastImageUrl\":\"https://arlolastimage-z3.s3.amazonaws.com/7a2433f9bbb64fbc80cae93fb9aa1de2/YURAZP-259-51500182/A2S10270A10F3/lastImage.jpg?AWSAccessKeyId=&Expires=1605650016&Signature=e3U69rQEC0EPuFq9uTQOUQHnR7c%3D\",\"presignedSnapshotUrl\":\"https://arlos3-prod-z3.s3.amazonaws.com/7a2433f9bbb64fbc80cae93fb9aa1de2/YURAZP-259-51500182/A2S10270A10F3/snapshot.jpg?AWSAccessKeyId=AKIA2BAHQO5QZGD7VOMI&Expires=1605650016&Signature=U2uGOKXP6ZA%2FkR7aghjo2qqeh4A%3D\",\"presignedFullFrameSnapshotUrl\":\"https://arlos3-prod-z3.s3.amazonaws.com/7a2433f9bbb64fbc80cae93fb9aa1de2/YURAZP-259-51500182/A2S10270A10F3/fullFrameSnapshot.jpg?AWSAccessKeyId=&Expires=1605650016&Signature=3pyC37eCYdfIg3B%2BFIwgEy90FoA%3D\",\"mediaObjectCount\":0,\"state\":\"provisioned\",\"modelId\":\"VMC4030P\",\"cvrEnabled\":false,\"dateCreated\":1603743296074,\"arloMobilePlan\":false,\"interfaceVersion\":\"i006\",\"interfaceSchemaVer\":\"1\",\"owner\":{\"firstName\":\"japan\",\"lastName\":\"homes\",\"ownerId\":\"YURAZP-259-51500182\"},\"properties\":{\"modelId\":\"VMC4030P\",\"olsonTimeZone\":\"Pacific/Auckland\",\"hwVersion\":\"H6\"}}],\"success\":true}"
},
I deleted those files you uploaded because they contain sensitive info. Take a look at the text
section above. It appears that your camera is the only device you get back.
It looks like they are subscribing to the basestation based on the parentID in the above response:
{
"pageref": "page_1",
"startedDateTime": "2020-11-17T10:53:37.977+13:00",
"request": {
"bodySize": 232,
"method": "POST",
"url": "https://myapi.arlo.com/hmsweb/users/devices/notify/5TN29B7EA1316?eventId=FE!056a575f-799c-4955-8b3c-833dace07553&time=1605563617565",
"text": "{\"from\":\"RPJNZ-259-54183589_web\",\"to\":\"5TN29B7EA1316\",\"action\":\"set\",\"resource\":\"subscriptions/RPJNZ-259-54183589_web\",\"publishResponse\":false,\"transId\":\"web!624b0ec4.39d138!1605563617564\",\"properties\":{\"devices\":[\"A2S10270A10F3\"]}}"
I can probably figure out a way to make all this work, but will need a little time to think about it... Basically, we just need to post to /notify
with the above JSON to subscribe to the evenstream.
Thanks for deleting the files; I only did a quick search for email/password, wasn't sure whether there were other sensitive information.
Thanks for the update, look forward to what you can come up with :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Hi,
I have a feeling this issue is because I am trying to access a shared camera, but thought I'd ask to confirm.
What version of Python are you using (
python -V
)?What operating system and processor architecture are you using (
python -c 'import platform; print(platform.uname());'
)?Which Python packages do you have installed (run the
pip freeze
orpip3 freeze
command and paste output)?Which version of ffmpeg are you using (
ffmpeg -version
)?Which Arlo hardware do you have (camera types - [Arlo, Pro, Q, etc.], basestation model, etc.)?
Arlo Pro 2, shared device (no access to the base station if one exists)
What did you do?
If possible, provide the steps you took to reproduce the issue. A complete runnable program is good. (don't include your user/password or any sensitive info) Example taken from Taking Fullscreen Snapshots
What did you expect to see?
What did you see instead?
The program hangs and does nothing.
For reference:
Returns: basestations = [] cameras containing the one camera that was shared with me.
Does this issue reproduce with the latest release?
Yes