Hi naimo84, first off, thanks for your code!
I'm working with it on raspbian stretch, and it worked marvellously until a couple of days ago, when I took a fresh sd card, put debian Buster on it, and attempted to install my whole home automation environment, including node red, and your node, of course.
Obviously didn't remember the password, so went ahead and reset it.
From then, when I edit the dyson-config node with my credentials, and get back to the dyson-link node, I don't get my device name anymore, and node red spits out the very weird and redundant log I'll attach below.
Then I got back at my stretch sd card that was working perfectly, and I get the very same behaviour, after changing the newly reset password, inside the dyson-config node.
I'm telling you about all these steps, to better address the issue
I have a dyson hot+cool link, and I have been able to use the android app all along (occasionaly updating the password everytime i changed it)
a few more weird behaviours I'm able to address are:
the dyson-config node, before restarting node red, is marked to be unused (both with "0 nodes using this config" and the warning when I deploy my flow.
and looking at the logs: the country keeps on being switched to "DE", while I was, and presently am, using "EU" as from my device serial.
here's the log, pardon the redundancies, it's just the first few seconds in of a fresh node red session.
StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."} at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22) at Request.emit (events.js:223:5) at Request.<anonymous> (/home/pi/.node-red/node_modules/request/request.js:1161:10) at Request.emit (events.js:223:5) at IncomingMessage.<anonymous> (/home/pi/.node-red/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:312:28) at IncomingMessage.emit (events.js:228:7) { name: 'StatusCodeError', statusCode: 404, message:
404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}`,
error: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
},
options: {
url: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
method: 'POST',
body: { Email: 'myeditedusername', Password: 'myeditedpassword' },
agentOptions: { rejectUnauthorized: false },
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null
},
readable: false,
_events: [Object: null prototype] {
end: [Array],
close: [Array],
data: [Function],
error: [Function]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: {
'cache-control': 'no-cache',
pragma: 'no-cache',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
date: 'Thu, 06 Feb 2020 22:02:54 GMT',
connection: 'close',
'content-length': '141'
},
rawHeaders: [
'Cache-Control',
'no-cache',
'Pragma',
'no-cache',
'Content-Type',
'application/json; charset=utf-8',
'Expires',
'-1',
'Date',
'Thu, 06 Feb 2020 22:02:54 GMT',
'Connection',
'close',
'Content-Length',
'141'
],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'POST /v1/userregistration/authenticate?country=DE HTTP/1.1\r\n' +
'host: api.cp.dyson.com\r\n' +
'accept: application/json\r\n' +
'content-type: application/json\r\n' +
'content-length: 63\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
insecureHTTPParser: undefined,
path: '/v1/userregistration/authenticate?country=DE',
_ended: true,
res: [Circular],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
request: Request {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
method: 'POST',
body: '{"Email":"myeditedusername","Password":"myeditedpassword"}',
agentOptions: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Promise],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
headers: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: [Object],
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
uri: [Url],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'api.cp.dyson.com',
path: '/v1/userregistration/authenticate?country=DE',
_json: true,
httpModule: [Object],
agentClass: [Function: Agent],
agent: [Agent],
_started: true,
href: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
req: [ClientRequest],
ntick: true,
response: [Circular],
originalHost: 'api.cp.dyson.com',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true
},
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
}
}
}
unhandledRejection StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/home/pi/.node-red/node_modules/request/request.js:1161:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7) {
name: 'StatusCodeError',
statusCode: 404,
message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
,
error: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
},
options: {
url: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
method: 'POST',
body: { Email: 'myeditedusername', Password: 'myeditedpassword' },
agentOptions: { rejectUnauthorized: false },
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null
},
readable: false,
_events: [Object: null prototype] {
end: [Array],
close: [Array],
data: [Function],
error: [Function]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: {
'cache-control': 'no-cache',
pragma: 'no-cache',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
date: 'Thu, 06 Feb 2020 22:02:54 GMT',
connection: 'close',
'content-length': '141'
},
rawHeaders: [
'Cache-Control',
'no-cache',
'Pragma',
'no-cache',
'Content-Type',
'application/json; charset=utf-8',
'Expires',
'-1',
'Date',
'Thu, 06 Feb 2020 22:02:54 GMT',
'Connection',
'close',
'Content-Length',
'141'
],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'POST /v1/userregistration/authenticate?country=DE HTTP/1.1\r\n' +
'host: api.cp.dyson.com\r\n' +
'accept: application/json\r\n' +
'content-type: application/json\r\n' +
'content-length: 63\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
insecureHTTPParser: undefined,
path: '/v1/userregistration/authenticate?country=DE',
_ended: true,
res: [Circular],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
request: Request {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
method: 'POST',
body: '{"Email":"myeditedusername","Password":"myeditedpassword"}',
agentOptions: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Promise],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
headers: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: [Object],
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
uri: [Url],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'api.cp.dyson.com',
path: '/v1/userregistration/authenticate?country=DE',
_json: true,
httpModule: [Object],
agentClass: [Function: Agent],
agent: [Agent],
_started: true,
href: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
req: [ClientRequest],
ntick: true,
response: [Circular],
originalHost: 'api.cp.dyson.com',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true
},
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
}
}
}
unhandledRejection StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/home/pi/.node-red/node_modules/request/request.js:1161:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7) {
name: 'StatusCodeError',
statusCode: 404,
message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
,
error: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
},
options: {
url: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
method: 'POST',
body: { Email: 'myeditedusername', Password: 'myeditedpassword' },
agentOptions: { rejectUnauthorized: false },
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null
},
readable: false,
_events: [Object: null prototype] {
end: [Array],
close: [Array],
data: [Function],
error: [Function]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: {
'cache-control': 'no-cache',
pragma: 'no-cache',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
date: 'Thu, 06 Feb 2020 22:02:54 GMT',
connection: 'close',
'content-length': '141'
},
rawHeaders: [
'Cache-Control',
'no-cache',
'Pragma',
'no-cache',
'Content-Type',
'application/json; charset=utf-8',
'Expires',
'-1',
'Date',
'Thu, 06 Feb 2020 22:02:54 GMT',
'Connection',
'close',
'Content-Length',
'141'
],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'POST /v1/userregistration/authenticate?country=DE HTTP/1.1\r\n' +
'host: api.cp.dyson.com\r\n' +
'accept: application/json\r\n' +
'content-type: application/json\r\n' +
'content-length: 63\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
insecureHTTPParser: undefined,
path: '/v1/userregistration/authenticate?country=DE',
_ended: true,
res: [Circular],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
request: Request {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
method: 'POST',
body: '{"Email":"myeditedusername","Password":"myeditedpassword"}',
agentOptions: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Promise],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
headers: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: [Object],
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
uri: [Url],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'api.cp.dyson.com',
path: '/v1/userregistration/authenticate?country=DE',
_json: true,
httpModule: [Object],
agentClass: [Function: Agent],
agent: [Agent],
_started: true,
href: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
req: [ClientRequest],
ntick: true,
response: [Circular],
originalHost: 'api.cp.dyson.com',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true
},
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
}
}
}
{
'Unhandled Rejection at': Promise {
StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/home/pi/.node-red/node_modules/request/request.js:1161:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7) {
name: 'StatusCodeError',
statusCode: 404,
message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
,
error: [Object],
options: [Object],
response: [IncomingMessage]
}
},
reason: StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/home/pi/.node-red/node_modules/request/request.js:1161:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7) {
name: 'StatusCodeError',
statusCode: 404,
message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
,
error: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
},
options: {
url: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
method: 'POST',
body: [Object],
agentOptions: [Object],
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: IncomingMessage {
_readableState: [ReadableState],
readable: false,
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
socket: [TLSSocket],
connection: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [ClientRequest],
request: [Request],
toJSON: [Function: responseToJSON],
caseless: [Caseless],
body: [Object]
}
}
}`