daikin-controller-cloud: RequestError: Unexpected retry option: retries
I’d like to retrieve the token from the Daikins Cloud Service using your tokensaver.js script.
I did a git clone from your git repo.
When I execute the tokensaver.js script while providing my Dakin user credentials (mail address + password) I’ll receive the following exeption:
/daikin-controller-cloud $ node example/tokensaver.js "<mail-address>" "<password>"
Writing tokenset to: /home/openhabian/Daikin/daikin-controller-cloud/tokenset.json
Using provided Login credentials (<mail-adress>/<password>) for a direct Login
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
RequestError: Unexpected retry option: retries
at Request._destroy (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/core/index.js:482:15)
at _destroy (node:internal/streams/destroy:102:25)
at Request.destroy (node:internal/streams/destroy:64:5)
at Request.flush (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/core/index.js:265:14)
at lastHandler (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/create.js:63:20)
at iterateHandlers (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/create.js:76:22)
at got (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/create.js:94:12)
at DaikinCloudController.login (/home/openhabian/Daikin/daikin-controller-cloud/index.js:320:36)
at main (/home/openhabian/Daikin/daikin-controller-cloud/example/tokensaver.js:55:50)
at /home/openhabian/Daikin/daikin-controller-cloud/example/tokensaver.js:80:12
at Options.set retry [as retry] (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/core/options.js:889:15)
at Options.merge (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/core/options.js:419:19)
at new Options (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/core/options.js:372:16)
at new Request (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/core/index.js:249:22)
at got (/home/openhabian/Daikin/daikin-controller-cloud/node_modules/@esm2cjs/got/build/cjs/create.js:58:21)
at DaikinCloudController.login (/home/openhabian/Daikin/daikin-controller-cloud/index.js:320:36)
at main (/home/openhabian/Daikin/daikin-controller-cloud/example/tokensaver.js:55:50)
at /home/openhabian/Daikin/daikin-controller-cloud/example/tokensaver.js:80:12
at Object.<anonymous> (/home/openhabian/Daikin/daikin-controller-cloud/example/tokensaver.js:81:4)
at Module._compile (node:internal/modules/cjs/loader:1155:14) {
input: undefined,
code: 'ERR_GOT_REQUEST_ERROR',
timings: undefined,
options: Options {
_unixOptions: undefined,
_internals: {
request: undefined,
agent: { http: undefined, https: undefined, http2: undefined },
h2session: undefined,
decompress: true,
timeout: {
connect: undefined,
lookup: undefined,
read: undefined,
request: 10000,
response: 10000,
secureConnect: undefined,
send: undefined,
socket: undefined
},
prefixUrl: '',
body: undefined,
form: undefined,
json: undefined,
cookieJar: undefined,
ignoreInvalidCookies: false,
searchParams: undefined,
dnsLookup: undefined,
dnsCache: undefined,
context: {},
hooks: {
init: [],
beforeRequest: [],
beforeError: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: []
},
followRedirect: false,
maxRedirects: 10,
cache: undefined,
throwHttpErrors: true,
username: '',
password: '',
http2: false,
allowGetBody: false,
headers: { 'user-agent': 'got (https://github.com/sindresorhus/got)' },
methodRewriting: false,
dnsLookupIpVersion: undefined,
parseJson: [Function: parse],
stringifyJson: [Function: stringify],
retry: {
limit: 2,
methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
statusCodes: [
408, 413, 429, 500,
502, 503, 504, 521,
522, 524
],
errorCodes: [
'ETIMEDOUT',
'ECONNRESET',
'EADDRINUSE',
'ECONNREFUSED',
'EPIPE',
'ENOTFOUND',
'ENETUNREACH',
'EAI_AGAIN'
],
maxRetryAfter: undefined,
calculateDelay: [Function: calculateDelay],
backoffLimit: Infinity,
noise: 100
},
localAddress: undefined,
method: 'GET',
createConnection: undefined,
cacheOptions: {
shared: undefined,
cacheHeuristic: undefined,
immutableMinTimeToLive: undefined,
ignoreCargoCult: undefined
},
https: {
alpnProtocols: undefined,
rejectUnauthorized: undefined,
checkServerIdentity: undefined,
certificateAuthority: undefined,
key: undefined,
certificate: undefined,
passphrase: undefined,
pfx: undefined,
ciphers: undefined,
honorCipherOrder: undefined,
minVersion: undefined,
maxVersion: undefined,
signatureAlgorithms: undefined,
tlsSessionLifetime: undefined,
dhparam: undefined,
ecdhCurve: undefined,
certificateRevocationLists: undefined
},
encoding: undefined,
resolveBodyOnly: false,
isStream: false,
responseType: 'text',
url: <ref *1> URL {
[Symbol(context)]: URLContext {
flags: 912,
scheme: 'https:',
username: '',
password: '',
host: 'daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com',
port: null,
path: [ 'oauth2', 'authorize' ],
query: 'client_id=7rk39602f0ds8lk0h076vvijnb&scope=openid&response_type=code&redirect_uri=daikinunified%3A%2F%2Flogin&scopes=email%2Copenid%2Cprofile&state=6oHPJZH4Ozdjba5x9SOkE2Ugyjtxml4-d9bxyrYEz_8&code_challenge=kB8rBX5EwBI7fKcAB05_Kr3OO_2Eft1tJnTtymiVqi4&code_challenge_method=S256',
fragment: null
},
[Symbol(query)]: URLSearchParams {
[Symbol(query)]: [
'client_id',
'7rk39602f0ds8lk0h076vvijnb',
'scope',
'openid',
'response_type',
'code',
'redirect_uri',
'daikinunified://login',
'scopes',
'email,openid,profile',
'state',
'6oHPJZH4Ozdjba5x9SOkE2Ugyjtxml4-d9bxyrYEz_8',
'code_challenge',
'kB8rBX5EwBI7fKcAB05_Kr3OO_2Eft1tJnTtymiVqi4',
'code_challenge_method',
'S256'
],
[Symbol(context)]: [Circular *1]
}
},
pagination: {
transform: [Function: transform],
paginate: [Function: paginate],
filter: [Function: filter],
shouldContinue: [Function: shouldContinue],
countLimit: Infinity,
backoff: 0,
requestLimit: 10000,
stackAllItems: false
},
setHost: true,
maxHeaderSize: undefined,
signal: undefined,
enableUnixSockets: true
},
_merging: false,
_init: []
}
}
System information: $ node --version v16.18.1
$ cat /etc/debian_version 11.5
I’d like to write my own script until an OpenHAB Daikin binding is provided supporting Daikin Cloud Credentials.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (6 by maintainers)
Commits related to this issue
- adjust got change, fixes #97 — committed to cchriso/daikin-controller-cloud by Apollon77 3 years ago
Yes get new tokens