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

Homebridge Ring Plugin: Unable to Subscribe to Events - 406 Not Acceptable Error from Ring API #1571

Closed
1 task done
BardiaZadeh opened this issue Jan 11, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@BardiaZadeh
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe The Bug

The Homebridge Ring Plugin fails to subscribe to events (e.g., motion or ding events) for my Ring device. The log reports repeated 406 Not Acceptable errors from the Ring API, and the session hardware ID is missing. The plugin retries creating a new session, but it still fails with the same error.

To Reproduce

1.	Install and configure the Homebridge Ring Plugin.
2.	Run.
3.	Check the logs for errors.

Expected behavior

The plugin should successfully subscribe to events (e.g., motion or ding events) for my Ring device and receive updates without errors.

Relevant log output

[1/11/2025, 12:22:26 AM] [Ring] Found the following locations:
[1/11/2025, 12:22:26 AM] [Ring]   locationId: 6a2c5786-32db-4d91-93d3-bbf55fb5fd31 - Marietta
[1/11/2025, 12:22:26 AM] [Ring] 404 from endpoint https://api.ring.com/clients_api/doorbots/74024086/subscribe
[1/11/2025, 12:22:26 AM] [Ring] Session hardware_id not found.  Creating a new session and trying again.
[1/11/2025, 12:22:26 AM] [Ring] Request to https://api.ring.com/clients_api/doorbots/74024086/subscribe failed with status 406. Response body: {"error":"Not Acceptable","status_code":406}
[1/11/2025, 12:22:26 AM] [Ring] Failed to subscribe PostOak Front Door to ding events
[1/11/2025, 12:22:26 AM] [Ring] Error: 
    at responseToError (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:43:19)
    at requestWithRetry (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:91:33)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:319:33 {
  response: {
    headers: Headers {
      date: 'Sat, 11 Jan 2025 00:22:26 GMT',
      'content-type': 'application/json',
      'content-length': '44',
      connection: 'keep-alive',
      'server-version': '97ed3f097a9ea05278f5bfb4f8fe2dd45ea8875a',
      'server-region': 'us-east-1',
      'x-frame-options': 'SAMEORIGIN',
      'x-content-type-options': 'nosniff',
      'x-xss-protection': '1; mode=block',
      'x-request-id': 'a18412ac1d9d0a142fce0ea9dc105154',
      'strict-transport-security': 'max-age=10886400; includeSubDomains; preload',
      server: 'api.ring.com api-sreqs.ring.com'
    },
    status: 406,
    body: { error: 'Not Acceptable', status_code: 406 }
  }
}
[1/11/2025, 12:22:26 AM] [Ring] Error: 
    at responseToError (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:43:19)
    at requestWithRetry (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:91:33)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:319:33 {
  response: {
    headers: Headers {
      date: 'Sat, 11 Jan 2025 00:22:26 GMT',
      'content-type': 'application/json',
      'content-length': '44',
      connection: 'keep-alive',
      'server-version': '97ed3f097a9ea05278f5bfb4f8fe2dd45ea8875a',
      'server-region': 'us-east-1',
      'x-frame-options': 'SAMEORIGIN',
      'x-content-type-options': 'nosniff',
      'x-xss-protection': '1; mode=block',
      'x-request-id': 'a18412ac1d9d0a142fce0ea9dc105154',
      'strict-transport-security': 'max-age=10886400; includeSubDomains; preload',
      server: 'api.ring.com api-sreqs.ring.com'
    },
    status: 406,
    body: { error: 'Not Acceptable', status_code: 406 }
  }
}
[1/11/2025, 12:22:26 AM] [Ring] 404 from endpoint https://api.ring.com/clients_api/doorbots/74024086/motions_subscribe
[1/11/2025, 12:22:26 AM] [Ring] Session hardware_id not found.  Creating a new session and trying again.
[1/11/2025, 12:22:26 AM] [Ring] Request to https://api.ring.com/clients_api/doorbots/74024086/motions_subscribe failed with status 406. Response body: {"error":"Not Acceptable","status_code":406}
[1/11/2025, 12:22:26 AM] [Ring] Failed to subscribe PostOak Front Door to motion events
[1/11/2025, 12:22:26 AM] [Ring] Error: 
    at responseToError (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:43:19)
    at requestWithRetry (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:91:33)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:319:33 {
  response: {
    headers: Headers {
      date: 'Sat, 11 Jan 2025 00:22:26 GMT',
      'content-type': 'application/json',
      'content-length': '44',
      connection: 'keep-alive',
      'server-version': '97ed3f097a9ea05278f5bfb4f8fe2dd45ea8875a',
      'server-region': 'us-east-1',
      'x-frame-options': 'SAMEORIGIN',
      'x-content-type-options': 'nosniff',
      'x-xss-protection': '1; mode=block',
      'x-request-id': 'a18412ac1d9d0a142fce0ea9dc105154',
      'strict-transport-security': 'max-age=10886400; includeSubDomains; preload',
      server: 'api.ring.com api-sreqs.ring.com'
    },
    status: 406,
    body: { error: 'Not Acceptable', status_code: 406 }
  }
}
[1/11/2025, 12:22:26 AM] [Ring] Configuring 1 cameras and 1 devices for location "Marietta" - locationId: 6a2c5786-32db-4d91-93d3-bbf55fb5fd31
[1/11/2025, 12:22:26 AM] [Ring] Configured camera eb1e7b1d-292f-41d1-be8f-cd4fed98721b lpd_v2 PostOak Front Door
[1/11/2025, 12:22:26 AM] PostOak Front Door 82A5 is running on port 41251.
[1/11/2025, 12:22:26 AM] Please add [PostOak Front Door 82A5] manually in Home app. Setup Code: 709-53-118
[1/11/2025, 12:22:26 AM] [Ring] Request to https://api.ring.com/clients_api/device failed with status 406. Response body: {"error":"Not Acceptable","status_code":406}
[1/11/2025, 12:22:26 AM] [Ring] Error: 
    at responseToError (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:43:19)
    at requestWithRetry (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:91:33)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:319:33 {
  response: {
    headers: Headers {
      date: 'Sat, 11 Jan 2025 00:22:26 GMT',
      'content-type': 'application/json',
      'content-length': '44',
      connection: 'keep-alive',
      'server-version': '97ed3f097a9ea05278f5bfb4f8fe2dd45ea8875a',
      'server-region': 'us-east-1',
      'x-frame-options': 'SAMEORIGIN',
      'x-content-type-options': 'nosniff',
      'x-xss-protection': '1; mode=block',
      'x-request-id': 'a18412ac1d9d0a142fce0ea9dc105154',
      'strict-transport-security': 'max-age=10886400; includeSubDomains; preload',
      server: 'api.ring.com api-sreqs.ring.com'
    },
    status: 406,
    body: { error: 'Not Acceptable', status_code: 406 }
  }
}
[1/11/2025, 12:22:46 AM] [Ring] Request to https://api.ring.com/clients_api/ring_devices failed with status 406. Response body: {"error":"Not Acceptable","status_code":406}
[1/11/2025, 12:22:46 AM] [Ring] Request to https://prd-api-us.prd.rings.solutions/api/v1/mode/location/6a2c5786-32db-4d91-93d3-bbf55fb5fd31 failed with status 406. Response body: {"error":"Not Acceptable","status_code":406}
[1/11/2025, 12:22:46 AM] Error: 
    at responseToError (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:43:19)
    at requestWithRetry (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:91:33)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:319:33
[1/11/2025, 12:22:46 AM] Got SIGTERM, shutting down Homebridge...
[1/11/2025, 12:22:51 AM] [HB Supervisor] Homebridge process ended. Code: 143, signal: null.
[1/11/2025, 12:22:56 AM] [HB Supervisor] Restarting Homebridge...

Screenshots

Screenshot 2025-01-10 at 7 28 10 PM

Homebridge Ring Config

{
  "platform": "Ring",
  "refreshToken": "REDACTED",
  "cameraDings": true,
  "locationIds": ["6a2c5786-32db-4d91-93d3-bbf55fb5fd31"]
}

Additional context

This issue occurs consistently and prevents the plugin from functioning properly. It appears to be related to API compatibility or session handling.

OS

Ubuntu Noble (24.04 LTS)

Node.js Version

v22.13.0

NPM Version

10.9.2

Homebridge/HOOBs Version

1.8.5

Homebridge Ring Plugin Version

v13.2.1

Operating System

Ubuntu server, Linux, VPS server from Ionos

@BardiaZadeh BardiaZadeh added the bug Something isn't working label Jan 11, 2025
@tsightler
Copy link
Collaborator

VPS server from Ionos

Note that it is not just subscriptions that are failing, there are also 406 error on calls to basic device enumeration API endpoints. If you search this error in the issues you will find other similar reports by users running on various VPS services. It seems to be that Ring bans connections from most IP blocks on those cheap hosting services, likely because most of those services are used heavily for various nefarious reasons and there's no legitimate reason that any official Ring API consumer would come from those IP blocks. Honestly, I'm struggling to come up with a reason to run Homebridge on such a server, but regardless, it is not possible to use the Ring plugin from these servers and such use is not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants