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

location.getDevices() stalls under certain conditions #388

Closed
jasonparekh opened this issue Jul 1, 2020 · 3 comments
Closed

location.getDevices() stalls under certain conditions #388

jasonparekh opened this issue Jul 1, 2020 · 3 comments
Labels
setup-issue An issue with the users config or environemnt

Comments

@jasonparekh
Copy link

Bug Report

Describe the Bug

The example.ts script was hanging after logging the "Connected to location" message. I traced through the code and found that it stalls at the await location.getDevices() because the message received for DeviceInfoDocGetList doesn't pass some of the criteria that's currently required to return data for getDevices.

To Reproduce

Steps to reproduce the behavior:

  • I'm not sure what in my set up is causing the issue. I have a single location with 9 cameras and an offline Ring Alarm base station without any sensors ever connected.
  • Attempt to run example.ts script.
  • Notice it never gets past the "Connected to location" message.

Expected behavior

  • Runs to completion listing the 9 cameras.

Screenshots/Logs

If applicable, add screenshots and log output to help explain your problem.

Additional context

Here's the DeviceInfoDocGetList message I get back (IDs redacted):

{"msg":"DeviceInfoDocGetList","seq":1,"dst":"aaaa","sessionId":2,"status":-66,"context":{"uiConnection":{"userUuid":"3","accountPermissions":["hub:connect","room:read","masterkey:create","device-state:configure","asset:read","device:create","rule:read","rule:create","beams-device:update","ringnet-security:create","security-user:enable","beams-device:delete","access-code:update","location:update","security-panel:disarm","beams-device:read","room:update","beams-bridge:delete","location-user:read","room:create","monitoring-permit:update","location-user:delete","beams-group:delete","rule:update","mode-settings:update","ringnet-device:create","rule:delete","security-user:disable","ringnet-packet:update","beams-device:create","security-panel:arm","monitoring-settings:update","user.summary:read","asset-command:send","access-code:create","monitoring-settings:read","device-profile:read","beams-group:read","beams-bridge:create","beams-group:create","beams-bridge:read","monitoring-permit:read","rule-list:read","device-profile:update","room:delete","history:read:location","device:delete","location:read","location:delete","device-state:control","beams-bridge:update","location-user-list:read","location-user:update","beams-firmware:read","mode:update","mode:read","beams-group:update","rule:activate","masterkey:read","access-code:delete","location-user:create","alarm-action:send"],"ipAddress":"4.4.4.4","userAgent":"","userPermissions":[]}}}

Environment

  • OS: Windows and Linux
  • Node.js: 12.18.2
  • NPM: 6.14.5
  • ring-client-api: 9.3.5
@jasonparekh jasonparekh added the bug Something isn't working label Jul 1, 2020
@dgreif
Copy link
Owner

dgreif commented Jul 1, 2020

The offline alarm base station is the reason it hangs. If you have no intention of using it, the easiest fix would be to remove the alarm from Ring. If the base station is offline, you can’t interact with it and get the device list from it, so I wait for all base stations to come online before reporting the full device list.

@dgreif
Copy link
Owner

dgreif commented Jul 5, 2020

Did that info solve it for you @jasonparekh?

@dgreif
Copy link
Owner

dgreif commented Jul 8, 2020

Closing due to lack of response. This is working as intended

@dgreif dgreif closed this as completed Jul 8, 2020
@dgreif dgreif added setup-issue An issue with the users config or environemnt and removed bug Something isn't working labels Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setup-issue An issue with the users config or environemnt
Projects
None yet
Development

No branches or pull requests

2 participants