You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have like 6 Schlage Connects, and 3 of them are in various states of flakiness. When I look at HomeAssistant, there isn't really anything to indicate that there are problems iwth them, except for 1 that has 0% battery.
It'd be super useful to have additional metadata. I started poking around a VeraDoor object to see what kinda of data the API already has. A few fields seem relevant:
BatteryDate: seconds since epoch... for hte last time the battery changed?
CommFailure: seems to be 0 or 1
CommFailureDate: seconds since epoch since CommFailure?
PollOk: no idea, but it's an integer
LastPollSuccess: no idea what it considers a success, since most of the ones I'm seeing are pretty far back
Here's a snippet I'm playing with, based on the list-devices:
importsysimporttimeimportosimportIPythonfromIPythonimportembed# Import pyveraimportpyvera# Parse Argumentsimportargparseparser=argparse.ArgumentParser(description='list-devices')
parser.add_argument('-u', '--url', help="Vera URL, e.g. http://192.168.1.161:3480", required=True)
args=parser.parse_args()
# Start the controllercontroller, _=pyvera.init_controller(args.url)
try:
# Get a list of all the devices on the vera controllerall_devices=controller.get_devices()
# Print the devices outfordeviceinall_devices:
iftype(device).__name__=="VeraLock":
# embed()print('{} ({})'.format(device.name, device.device_id))
poll_ok=device.get_complex_value('PollOk')
ifpoll_okisnotNone:
print('PollOk: {}'.format(poll_ok))
last_poll_success=device.get_complex_value('LastPollSuccess')
iflast_poll_successisnotNone:
print('LastPollSuccess: {}'.format(time.ctime(int(last_poll_success))))
print('BatteryLevel: {}%'.format(device.battery_level))
print('BatteryDate: {}'.format(time.ctime(int(device.get_complex_value('BatteryDate')))))
comm_failure=device.get_strict_value('commFailure')
print('CommFailure: {}'.format(comm_failure))
ifcomm_failure!='0':
print('CommFailureDate: {}'.format(time.ctime(int(device.get_complex_value('CommFailureTime')))))
print('Status: {}'.format(device.get_value('status')))
print()
finally:
# Stop the subscription listening thread so we can quitcontroller.stop()
The text was updated successfully, but these errors were encountered:
I have like 6 Schlage Connects, and 3 of them are in various states of flakiness. When I look at HomeAssistant, there isn't really anything to indicate that there are problems iwth them, except for 1 that has 0% battery.
It'd be super useful to have additional metadata. I started poking around a
VeraDoor
object to see what kinda of data the API already has. A few fields seem relevant:Here's a snippet I'm playing with, based on the list-devices:
The text was updated successfully, but these errors were encountered: