arlo
arlo copied to clipboard
GetRules() hangs, seemingly, forever
You MUST answer these questions before submitting your issue. Failure to do so will result in a closed issue. Thanks!
What version of Python are you using (python -V
)?
$ python3 -V
Python 3.9.16
What operating system and processor architecture are you using (python -c 'import platform; print(platform.uname());'
)?
$ python3 -c 'import platform; print(platform.uname());'
uname_result(system='Linux', node='ubuntu-focal', release='5.4.0-135-generic', version='#152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022', machine='x86_64')
Which Python packages do you have installed (run the pip freeze
or pip3 freeze
command and paste output)?
$ pip3 freeze
arlo==1.2.62
atomicwrites==1.1.5
attrs==19.3.0
Automat==0.8.0
bcrypt==3.1.7
beautifulsoup4==4.8.2
blinker==1.4
cachetools==5.2.1
certifi==2019.11.28
chardet==3.0.4
Click==7.0
cloud-init==22.2
colorama==0.4.3
command-not-found==0.3
configobj==5.0.6
constantly==15.1.0
cryptography==2.8
cycler==0.10.0
dbus-python==1.2.16
decorator==4.4.2
distro==1.4.0
distro-info===0.23ubuntu1
emane==1.2.7
emane-spectrum-tools==0.2.5
entrypoints==0.3
et-xmlfile==1.0.1
google-api-core==2.11.0
google-api-python-client==2.72.0
google-auth==2.16.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.8.0
googleapis-common-protos==1.58.0
html5lib==1.0.1
httplib2==0.21.0
hyperlink==19.0.0
idna==2.8
importlib-metadata==1.5.0
incremental==16.10.1
jdcal==1.0
Jinja2==2.10.1
jsonpatch==1.22
jsonpointer==2.0
jsonschema==3.2.0
keyring==18.0.1
kiwisolver==1.0.1
language-selector==0.1
launchpadlib==1.10.13
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
letce2==0.2.7
letce2-plugin-lxc==0.2.5
lockfile==0.12.2
lxml==4.5.0
Mako==1.1.0
MarkupSafe==1.1.0
matplotlib==3.1.2
monotonic==1.6
more-itertools==4.2.0
netifaces==0.10.4
numexpr==2.7.1
numpy==1.17.4
oauthlib==3.1.0
olefile==0.46
openpyxl==3.0.3
opentestpoint-labtools==0.5.7
opentestpoint-probe-emane==1.0.8
opentestpoint-probe-iptraffic-python==0.2.4
opentestpoint-probe-lte==1.0.3
opentestpoint-probe-system==1.0.6
opentestpoint-python==1.0.11
opentestpoint-toolkit-python==1.0.11
packaging==20.3
pandas==0.25.3
paramiko==2.6.0
pexpect==4.6.0
pickle-mixin==1.0.2
Pillow==7.0.0
pluggy==0.13.0
protobuf==4.21.12
psutil==5.5.1
py==1.8.1
pyasn1==0.4.2
pyasn1-modules==0.2.1
Pygments==2.3.1
PyGObject==3.36.0
PyHamcrest==1.9.0
PyJWT==1.7.1
pymacaroons==0.13.0
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyparsing==2.4.6
pyroute2==0.5.9
pyrsistent==0.15.5
pyserial==3.4
PySocks==1.7.1
pytest==4.6.9
python-apt==2.0.0+ubuntu0.20.4.7
python-daemon==2.2.4
python-dateutil==2.7.3
python-debian===0.1.36ubuntu1
python-etce==1.2.6
python-openstatistic==1.0.7
pytz==2019.3
PyYAML==5.3.1
pyzmq==18.1.1
requests==2.22.0
requests-oauthlib==1.3.1
requests-unixsocket==0.2.0
responses==0.10.15
rsa==4.9
scipy==1.3.3
SecretStorage==2.3.1
service-identity==18.1.0
simplejson==3.16.0
six==1.14.0
sos==4.3
soupsieve==1.9.5
sseclient==0.0.22
ssh-import-id==5.10
systemd-python==234
tables==3.6.1
Twisted==18.9.0
ubuntu-advantage-tools==27.9
ufw==0.36
unattended-upgrades==0.1
uritemplate==4.1.1
urllib3==1.24
wadllib==1.3.3
wcwidth==0.1.8
webencodings==0.5.1
xlrd==1.1.0
xlwt==1.3.0
zipp==1.0.0
zope.interface==4.7.1
Which version of ffmpeg are you using (ffmpeg -version
)?
$ ffmpeg -version
-bash: ffmpeg: command not found
$ # I have not installed ffmpeg
Which Arlo hardware are you having the issue with (camera types - [Arlo, Pro, Q, etc.], basestation model, etc.)?
Run this script:
from arlo import Arlo
import json
import re
USERNAME = '[email protected]'
PASSWORD = 'supersecretpassword'
def pp(data):
print(json.dumps(data, indent=4, sort_keys=True))
try:
arlo = Arlo(USERNAME, PASSWORD)
devices = arlo.GetDevices()
for i, device in enumerate(devices):
for key in ['deviceId', 'parentId', 'uniqueId', 'userId', 'xCloudId']:
if key in device:
device[key] = re.sub(r'[0-9A-Za-z]', r'X', device.get(key))
for key in ['deviceName', 'presignedFullFrameSnapshotUrl', 'presignedLastImageUrl', 'presignedSnapshotUrl']:
device[key] = ""
device['owner']['ownerId'] = re.sub(r'[0-9A-Za-z]', r'X', device['owner']['ownerId'])
device['owner']['firstName'] = ""
device['owner']['lastName'] = ""
devices[i] = device
pp(devices)
except Exception as e:
print(e)
[
{
"automationRevision": 168,
"certAvailable": true,
"connectivity": {
"connected": true,
"mepStatus": "unknown",
"type": "ethernet"
},
"dateCreated": 1510516797437,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "basestation",
"displayOrder": 3,
"firmwareVersion": "1.20.4.1_4214_d606780",
"interfaceSchemaVer": "20",
"interfaceVersion": "i030",
"lastModified": 1673451563714,
"mediaObjectCount": 0,
"modelId": "VMB4000",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "VMB4000r3",
"modelId": "VMB4000",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "OWNER",
"xCloudId": "XXXXXXX-XXXX-XXX-XXXXXXXX"
},
{
"dateCreated": 1510516797432,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "siren",
"displayOrder": 6,
"mediaObjectCount": 0,
"modelId": "VMB4000-siren",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX#X",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "OWNER",
"xCloudId": "XXXXXXX-XXXX-XXX-XXXXXXXX"
},
{
"dateCreated": 1517265071023,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 5,
"firmwareVersion": "1.092.1.0_9_120d8b7",
"interfaceSchemaVer": "2",
"interfaceVersion": "i010",
"lastImageUploaded": "true",
"lastModified": 1673451563714,
"mediaObjectCount": 0,
"modelId": "VMC4030",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H8",
"modelId": "VMC4030",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "OWNER",
"xCloudId": "XXXXXXX-XXXX-XXX-XXXXXXXX"
},
{
"dateCreated": 1517264874608,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 4,
"firmwareVersion": "1.092.1.0_9_120d8b7",
"interfaceSchemaVer": "2",
"interfaceVersion": "i010",
"lastImageUploaded": "true",
"lastModified": 1673451563715,
"mediaObjectCount": 0,
"modelId": "VMC4030",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H8",
"modelId": "VMC4030",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "OWNER",
"xCloudId": "XXXXXXX-XXXX-XXX-XXXXXXXX"
},
{
"dateCreated": 1510516971587,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 3,
"firmwareVersion": "1.092.1.0_9_120d8b7",
"interfaceSchemaVer": "2",
"interfaceVersion": "i010",
"lastImageUploaded": "true",
"lastModified": 1673451563715,
"mediaObjectCount": 0,
"modelId": "VMC4030",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H8",
"modelId": "VMC4030",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "OWNER",
"xCloudId": "XXXXXXX-XXXX-XXX-XXXXXXXX"
},
{
"dateCreated": 1510517006953,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 2,
"firmwareVersion": "1.092.1.0_9_120d8b7",
"interfaceSchemaVer": "2",
"interfaceVersion": "i010",
"lastImageUploaded": "true",
"lastModified": 1673451563715,
"mediaObjectCount": 1,
"modelId": "VMC4030",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H8",
"modelId": "VMC4030",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "OWNER",
"xCloudId": "XXXXXXX-XXXX-XXX-XXXXXXXX"
},
{
"dateCreated": 1510516931255,
"deviceId": "XXXXXXXXXXXXX",
"deviceName": "",
"deviceType": "camera",
"displayOrder": 1,
"firmwareVersion": "1.092.1.0_9_120d8b7",
"interfaceSchemaVer": "2",
"interfaceVersion": "i010",
"lastImageUploaded": "true",
"lastModified": 1673451563715,
"mediaObjectCount": 2,
"modelId": "VMC4030",
"owner": {
"firstName": "",
"lastName": "",
"ownerId": "XXXX-XXX-XXXXXXXX"
},
"parentId": "XXXXXXXXXXXXX",
"presignedFullFrameSnapshotUrl": "",
"presignedLastImageUrl": "",
"presignedSnapshotUrl": "",
"properties": {
"hwVersion": "H8",
"modelId": "VMC4030",
"olsonTimeZone": "America/Chicago"
},
"state": "provisioned",
"uniqueId": "XXXX-XXX-XXXXXXXX_XXXXXXXXXXXXX",
"userId": "XXXX-XXX-XXXXXXXX",
"userRole": "OWNER",
"xCloudId": "XXXXXXX-XXXX-XXX-XXXXXXXX"
}
]
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)
- Starting with the "issue" script above.
- Change
USERNAME
andPASSWORD
to theOWNER
account. - Add the following code to the "issue" script after the
pp(devices)
and before theexcept Exception as e:
as in:
...
pp(devices)
basestations = arlo.GetDevices('basestation')
print ("state :" + basestations[0].__class__.__name__)
print ("\n" + "arlo.GetRules" + "\n")
bsrules = arlo.GetRules(basestations[0])
print ("rules :" + bsrules.__class__.__name__)
print (bsrules)
except Exception as e:
What did you expect to see?
These results were copied from a similar script which worked on Sep 28 2019
, recent invocation no longer works, hence this issue report
(same results above requested for the issue from the "issue" script, and with the changes above, the additional following output)
state :dict
arlo.GetRules
rules :dict
{
"action": "is",
"from": "XXXXXXXXXXXXX",
... (json struct continues, very long, essentially ending with)
"resource": "rules",
"to": "XXXXXXX-XXX-XXXXXXXX_web",
"transId": "web!5a45a512.124218!1569673382924"
}
What did you see instead?
(same results above requested for the issue from the "issue" script, and with the changes above, the additional following output)
state :dict
arlo.GetRules
(eventually ending with no output with my Ctrl-C)
^CCaught Ctrl-C, exiting.
Does this issue reproduce with the latest release?
I believe so, from pip3 freeze
it reports arlo==1.2.62