Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm/Disarm Throws an error - Validated Auth/MFA was successful #183

Closed
cgmckeever opened this issue Jan 3, 2022 · 20 comments
Closed

Arm/Disarm Throws an error - Validated Auth/MFA was successful #183

cgmckeever opened this issue Jan 3, 2022 · 20 comments

Comments

@cgmckeever
Copy link

Which Arlo hardware do you have (camera types - [Arlo, Pro, Q, etc.], basestation model, etc.)?

Arlo Pro

What did you do?

Trying to use the Arm/Disarm example with the following code.

    arlo = Arlo(USERNAME, PASSWORD, "gmail.credentials")
    # At this point you're logged into Arlo.

    # Get the list of devices and filter on device type to only get the basestation.
    # This will return an array which includes all of the basestation's associated metadata.
    basestations = arlo.GetDevices('basestation')
    print(basestations)

    # Arm Arlo.
    arlo.Arm(basestations[0])

What did you expect to see?

Proper mode change

What did you see instead?

Verified that the basestations = arlo.GetDevices('basestation') does return a device object that has the proper device

Request (POST https://myapi.arlo.com/hmsweb/users/devices/automation/active) failed: {'data': {'error': 'AUTO-5050', 'message': 'Failed to update Automation Definitions', 'reason': 'Unable to upload active automation. Please try again'}, 'success': False}

Does this issue reproduce with the latest release?

I believe so

Requirement already satisfied: arlo in /usr/local/lib/python3.9/site-packages (1.2.57)
@cgmckeever
Copy link
Author

Looks like it may be the same issue as #168
Which gets fixes with changing that call (as describe in the issue), but I dont see that change reflected in the mainline branch

@jeffreydwalter
Copy link
Owner

@cgmckeever if you want help, please fill out the entire set of questions in the template. Also, run this script https://github.com/jeffreydwalter/arlo/wiki/Arlo-Hardware-Schemas#overview and paste the output in your description.

@cgmckeever
Copy link
Author

still broken, but the fix from the other issue resolved it. Closing

@jeffreydwalter
Copy link
Owner

@cgmckeever glad to hear it's working and thank you for the 🍺s! Is there a code change that needs to be made to the library? What was your fix?

@cgmckeever
Copy link
Author

I had to revert the CustomMode call to use

            #return self.request.post(f'https://{self.BASE_URL}/hmsweb/users/devices/automation/active', {'activeAutomations':[{'deviceId':device.get('deviceId'),'timestamp':self.to_timestamp(datetime.now()),'activeModes':[mode],'activeSchedules':schedules}]})
            return self.NotifyAndGetResponse(device, {"from":self.user_id+"_web", "to": device.get("parentId"), "action":"set","resource":"modes", "transId": self.genTransId(),"publishResponse":True,"properties":{"active":mode}})

@jeffreydwalter
Copy link
Owner

Would you mind running that little script from my wiki (https://github.com/jeffreydwalter/arlo/wiki/Arlo-Hardware-Schemas#overview) and pasting the output here so I can figure out why that function is choosing the wrong method to call? It just prints out your device metadata, with all the sensitive info obfuscated. I would greatly appreciate it!

@cgmckeever
Copy link
Author

Yep -- will do now .. FWIW .. this is my environment, which is a pretty vanilla docker

FROM python:3.8-slim-buster

RUN pip install arlo

The rest is just my a (semi) more cleaned up version of the arm code above.

Will post that output shortly

@cgmckeever
Copy link
Author

[
{
"cvrEnabled": false,
"dateCreated": 1639253036429,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "siren",
"displayOrder": 1,
"lastModified": 1641263607202,
"mediaObjectCount": 0,
"modelId": "VMB4000-siren",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"modelId": "VMB4000-siren",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"timeZone": "America/Chicago",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX#X",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "ADMIN",
"xCloudId": "XXXXXX-XXXX-XXX-XXXXXXXXX"
},
{
"arloMobilePlan": false,
"cvrEnabled": false,
"dateCreated": 1554578316831,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 2,
"interfaceSchemaVer": "1",
"interfaceVersion": "i009",
"lastImageUploaded": "true",
"lastModified": 1641263607202,
"mediaObjectCount": 9,
"modelId": "VMC4030P",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H4",
"modelId": "VMC4030P",
"olsonTimeZone": null
},
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "ADMIN",
"xCloudId": "XXXXXX-XXXX-XXX-XXXXXXXXX"
},
{
"arloMobilePlan": false,
"cvrEnabled": false,
"dateCreated": 1553994780030,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 3,
"interfaceSchemaVer": "1",
"interfaceVersion": "i009",
"lastImageUploaded": "true",
"lastModified": 1641263607202,
"mediaObjectCount": 8,
"modelId": "VMC4030P",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H3",
"modelId": "VMC4030P",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"timeZone": "America/Chicago",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "ADMIN",
"xCloudId": "XXXXXX-XXXX-XXX-XXXXXXXXX"
},
{
"arloMobilePlan": false,
"cvrEnabled": false,
"dateCreated": 1553989199154,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 4,
"interfaceSchemaVer": "1",
"interfaceVersion": "i009",
"lastImageUploaded": "true",
"lastModified": 1641263607202,
"mediaObjectCount": 13,
"modelId": "VMC4030P",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H3",
"modelId": "VMC4030P",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"timeZone": "America/Chicago",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "ADMIN",
"xCloudId": "XXXXXX-XXXX-XXX-XXXXXXXXX"
},
{
"arloMobilePlan": false,
"cvrEnabled": false,
"dateCreated": 1553989282360,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 5,
"interfaceSchemaVer": "1",
"interfaceVersion": "i009",
"lastImageUploaded": "true",
"lastModified": 1641263607202,
"mediaObjectCount": 9,
"modelId": "VMC4030P",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H3",
"modelId": "VMC4030P",
"olsonTimeZone": null
},
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "ADMIN",
"xCloudId": "XXXXXX-XXXX-XXX-XXXXXXXXX"
},
{
"automationRevision": 20,
"certAvailable": true,
"connectivity": {
"connected": true,
"mepStatus": "unknown",
"type": "ethernet"
},
"cvrEnabled": false,
"dateCreated": 1553988384655,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "basestation",
"displayOrder": 2,
"firmwareVersion": "1.17.0.0_3953_6ba79e5",
"interfaceSchemaVer": "17",
"interfaceVersion": "i028",
"lastModified": 1641263607230,
"mediaObjectCount": 0,
"migrateActivityZone": false,
"modelId": "VMB4000",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "VMB4000r3",
"modelId": "VMB4000",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"timeZone": "America/Chicago",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "ADMIN",
"xCloudId": "XXXXXX-XXXX-XXX-XXXXXXXXX"
}
]

@jeffreydwalter
Copy link
Owner

Awesome, thank you! Will you please try the release I just published (1.2.58) and let me know if it works for you? Thanks again!

@cgmckeever
Copy link
Author

Grabbing

@cgmckeever
Copy link
Author

pip is still finding 1.2.57 do you know a way to force it to grab something newer?

@cgmckeever
Copy link
Author

got it

Requirement already satisfied: arlo in /usr/local/lib/python3.8/site-packages (1.2.58)

@jeffreydwalter
Copy link
Owner

Awesome, guess it takes a minute to show up after I publish. 🤷🏻

@cgmckeever
Copy link
Author

That appears to have solved it ...

@jeffreydwalter
Copy link
Owner

Awesome! Thank you for confirming! 💪🏻 And thanks again for the 🍺 !

@cgmckeever
Copy link
Author

What was the fix? I see some Timestamp changes?

@jeffreydwalter
Copy link
Owner

50d14cf

Someone submitted support for arloq there and I merged it in without really looking at it. My basestation gave up the goose, so I don't have any arlo cameras anymore. 🤷🏻

@cgmckeever
Copy link
Author

ah, there you go ..
WAIT -- and you are still supporting this? THANK YOU

@jeffreydwalter
Copy link
Owner

Happy to help! It's kinda my baby. These days I do it for the people and the... 🍺 🍺 🍺 ! lolz 😂 Cheers!

@cgmckeever
Copy link
Author

Thanks again for building this ..
The community needs to get you a new basestation! .. Someone has to have a spare one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants