otaviojr / node-red-contrib-smartthings

Allows you to control your devices and get their status using NodeRed
MIT License
32 stars 16 forks source link

Failed to update smartapp settings due to constraint violation on node-red side #87

Open sdalu opened 1 year ago

sdalu commented 1 year ago

It is not possible, to integrate callback for new devices. Used to work.

I'm on :

When using the smartthing android app to update the list of notifications, updating settings failed, with the following log in node-red:

2022-11-10T18:29:19.408Z error: Error: Request failed with status code 422: {"requestId":"B8EFFE9C-E61E-4C28-9844-B2A9AC09DF9C","error":{"code":"ConstraintViolationError","message":"The request is malformed.","details":[{"code":"NotValidValue","target":"capability","message":"healthCheck is not a valid value.","details":[]}]}}
    at createError (/home/sdalu/.node-red/node_modules/@smartthings/smartapp/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/home/sdalu/.node-red/node_modules/@smartthings/smartapp/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/home/sdalu/.node-red/node_modules/@smartthings/smartapp/node_modules/axios/lib/adapters/http.js:269:11)
    at IncomingMessage.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
2022-11-10T18:29:19.409Z debug: RESPONSE: {
  "statusCode": 500,
  "message": "Server error: 'Error: Request failed with status code 422: {\"requestId\":\"B8EFFE9C-E61E-4C28-9844-B2A9AC09DF9C\",\"error\":{\"code\":\"ConstraintViolationError\",\"message\":\"The request is malformed.\",\"details\":[{\"code\":\"NotValidValue\",\"target\":\"capability\",\"message\":\"healthCheck is not a valid value.\",\"details\":[]}]}}'"
}
sdalu commented 1 year ago

Removing reference to healthCheck in smartthings-config.js seems to fix things, but I'm not sure about the consequences...