Comments (7)
I think the error starts here
def CustomMode(self, device, mode, schedules=[]):
""" device can be any object that has parentId == deviceId. i.e., not a camera """
parentId = device.get('parentId', None)
if device.get('deviceType') == 'arlobridge':
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}]})
elif not parentId or device.get('deviceId') == parentId:
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}})
else:
raise Exception('Only parent device modes and schedules can be modified.')
where my device type is 'deviceType': 'basestation'
and if I INSPECT the web-ui call it is in-fact making a call to /users/devices/automation/active
(as opposed to using the self.NotifyAndGetResponse
path)
however, short circuiting the device check and using self.request.post
also brings up new errors ... looking
from arlo.
self.NotifyAndGetResponse
(from above) Just appears to sit on
DEBUG:urllib3.connectionpool:https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/4R058A7NB5F33 HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://myapi.arlo.com:443 "POST /hmsweb/users/devices/notify/4R058A7NB5F33 HTTP/1.1" 200 None
from arlo.
Hello, thank you for your PR! I made a branch to test out your changes and made some modifications to your proposed solution. Would you mind pulling down this branch and seeing if it works for you? https://github.com/jeffreydwalter/arlo/tree/fix-custom-mode
My basestation died so, I don't actually have any working Arlo cameras anymore. :(
from arlo.
I will test shorty, but .. just looking at it, earlier I could not get it to work till I added the schema line .. but maybe you have another change in there accomplishing similar ...
and Ive said in the past -- I would totally send you a basestation ;)
from arlo.
I get this
{"error": 401 Client Error: Unauthorized for url: https://myapi.arlo.com/hmsweb/users/devices}
even for something that had worked prior to the hotfix/PR I made
https://github.com/cgmckeever/smartthings/blob/master/arlo-util/www/cgi-bin/checkup.py
from arlo.
@jeffreydwalter any thoughts on this?
from arlo.
Hello, thank you for your PR! I made a branch to test out your changes and made some modifications to your proposed solution. Would you mind pulling down this branch and seeing if it works for you? https://github.com/jeffreydwalter/arlo/tree/fix-custom-mode
I had tried that and I got
{"error": 401 Client Error: Unauthorized for url: https://myapi.arlo.com/hmsweb/users/devices}
My earlier PR seems to work, but probably is not the clean way to do it ;)
from arlo.
Related Issues (20)
- Unable to download a snapshot using MFA HOT 15
- General question: Code only working with Arlo-Account? HOT 1
- Support for the multiple verification emails HOT 1
- localhost:7788 not found error after "Arlo wants access to your Google Account" screen HOT 52
- Feature Request - Local Storage file download HOT 5
- Arm/Disarm Throws an error - Validated Auth/MFA was successful HOT 20
- Feature Request - Doorbell HOT 1
- How to get the current status (Armed or Disarmed) HOT 2
- 413 Client Error: Request Entity Too Large for url: https://myapi.arlo.com/hmsweb/users/library/recycle HOT 2
- Error on login API - Forbidden for url: https://ocapi-app.arlo.com/api/auth -
- Error on login API - Forbidden for url: https://ocapi-app.arlo.com/api/auth HOT 19
- 401 Client Error: for url: https://my.arlo.com/hmsweb/users/devices HOT 3
- Support for Docker? HOT 1
- 'Origin': f'https://{self.BASE_URL}', SyntaxError: invalid syntax HOT 1
- Feature ? HOT 1
- email factorRole SECONDARY throws StopIteration HOT 4
- [Arlo Pro 4] is basestation required for python interaction
- GetRules() hangs, seemingly, forever
- oauthlib.oauth2.rfc6749.errors.MismatchingStateError: (mismatching_state) CSRF Warning! State not equal in request and response. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arlo.