python-ring-doorbell icon indicating copy to clipboard operation
python-ring-doorbell copied to clipboard

check_alerts() on multiple doorbell devices

Open kevnflores opened this issue 7 years ago • 2 comments

Hi, I'm running the following

back_door = myring.doorbells[0].check_alerts()
front_door = myring.doorbells[1].check_alerts()

print('BackDoor: ' + str(back_door))
print('FrontDoor: ' + str(front_door))

Whenever I trigger a ring on either device the results are different, so if I go and ring the front door I would get the following:

BackDoor: None
FrontDoor: True

when I ring the same doorbell and run it again I get the following:

BackDoor: True
FrontDoor: None

Is there a way to specify by Ring name as opposed to the array number? I'm not sure if anyone has worked with multi-device notifications?

kevnflores avatar Feb 21 '19 03:02 kevnflores

After some digging, I revisited this error and found that the returned values are never the same, so if I specify an integer the values will be different every time. When I do a check alerts it will return a false/true statement for different doorbells.

myring.doorbells
[<RingDoorBell: Front Door>, <RingDoorBell: Side Door>, <RingDoorBell: Back Door>]
myring.doorbells
[<RingDoorBell: Back Door>, <RingDoorBell: Front Door>, <RingDoorBell: Side Door>]

is there a way to alphabetize these values or allow for for string queries?

When I run this:

myring.doorbells['Back Door'].check_alerts

I get the following error:

File "<stdin>", line 1, in <module>
TypeError: list indices must be integers or slices, not str

Any help with this would be greatly appreciated.

kevnflores avatar Aug 13 '19 16:08 kevnflores

I am having the same problem! Somebody got a fix for that issue?

EDIT: fixed it myself. #138

nuketownhf avatar Oct 18 '19 10:10 nuketownhf

There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs. Please make sure to update to the latest ring_doorbell version and check if that solves the issue. Thank you for your contributions.

github-actions[bot] avatar Apr 18 '24 18:04 github-actions[bot]