root@debian-iobroker:/opt/iobroker/node_modules/iobroker.hm-ip-cloud-accesspoint/api# node test_getAuthToken.js ------ test start -------- getHomematicHosts: { StatusCodeError: 400 - {"errorCode":"INVALID_REQUEST"} at new StatusCodeError (/opt/iobroker/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/opt/iobroker/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/opt/iobroker/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request. (/opt/iobroker/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage. (/opt/iobroker/node_modules/request/request.js:1083:12) name: 'StatusCodeError', statusCode: 400, message: '400 - {"errorCode":"INVALID_REQUEST"}', error: { errorCode: 'INVALID_REQUEST' }, options: { method: 'POST', json: true, body: { clientCharacteristics: [Object], id: 'bde' }, uri: 'https://lookup.homematic.com:48335/getHost', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: IncomingMessage { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: false, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: false, domain: null, _events: { 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: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, connection: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { server: 'Apache-Coyote/1.1', 'x-application-context': 'application', 'content-type': 'application/json;charset=UTF-8', 'content-length': '31', date: 'Thu, 17 Jan 2019 08:31:05 GMT', connection: 'close' }, rawHeaders: [ 'Server', 'Apache-Coyote/1.1', 'X-Application-Context', 'application', 'Content-Type', 'application/json;charset=UTF-8', 'Content-Length', '31', 'Date', 'Thu, 17 Jan 2019 08:31:05 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, _consuming: true, _dumped: false, req: ClientRequest { domain: null, _events: [Object], _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, upgrading: false, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Object], connection: [Object], _header: 'POST /getHost HTTP/1.1\r\nhost: lookup.homematic.com:48335\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 223\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: [Object], socketPath: undefined, timeout: undefined, method: 'POST', path: '/getHost', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, [Symbol(outHeadersKey)]: [Object] }, request: Request { domain: null, _events: [Object], _eventsCount: 5, _maxListeners: undefined, method: 'POST', body: '{"clientCharacteristics":{"apiVersion":"12","applicationIdentifier":"iobroker","applicationVersion":"1.0","deviceManufacturer":"none","deviceType":"Computer","language":"en_US","osType":"Linux","osVersion":"NT"},"id":"bde"}', uri: [Object], readable: true, writable: true, explicitMethod: true, _qs: [Object], _auth: [Object], _oauth: [Object], _multipart: [Object], _redirect: [Object], _tunnel: [Object], _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: [Object], _rp_callbackOrig: undefined, callback: [Function], _rp_options: [Object], headers: [Object], setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: true, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '48335', host: 'lookup.homematic.com', path: '/getHost', _json: true, httpModule: [Object], agentClass: [Object], agent: [Object], _started: true, href: 'https://lookup.homematic.com:48335/getHost', req: [Object], ntick: true, response: [Circular], originalHost: 'lookup.homematic.com:48335', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: Caseless { dict: [Object] }, read: [Function], body: { errorCode: 'INVALID_REQUEST' } } } root@debian-iobroker:/opt/iobroker/node_modules/iobroker.hm-ip-cloud-accesspoint/api# node test_getAuthToken.js ------ test start -------- getHomematicHosts: { StatusCodeError: 400 - {"errorCode":"INVALID_REQUEST"} at new StatusCodeError (/opt/iobroker/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/opt/iobroker/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/opt/iobroker/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request. (/opt/iobroker/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage. (/opt/iobroker/node_modules/request/request.js:1083:12) name: 'StatusCodeError', statusCode: 400, message: '400 - {"errorCode":"INVALID_REQUEST"}', error: { errorCode: 'INVALID_REQUEST' }, options: { method: 'POST', json: true, body: { clientCharacteristics: [Object], id: 'bde' }, uri: 'https://lookup.homematic.com:48335/getHost', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: IncomingMessage { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: false, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: false, domain: null, _events: { 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: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, connection: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { server: 'Apache-Coyote/1.1', 'x-application-context': 'application', 'content-type': 'application/json;charset=UTF-8', 'content-length': '31', date: 'Thu, 17 Jan 2019 08:33:48 GMT', connection: 'close' }, rawHeaders: [ 'Server', 'Apache-Coyote/1.1', 'X-Application-Context', 'application', 'Content-Type', 'application/json;charset=UTF-8', 'Content-Length', '31', 'Date', 'Thu, 17 Jan 2019 08:33:48 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, _consuming: true, _dumped: false, req: ClientRequest { domain: null, _events: [Object], _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, upgrading: false, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Object], connection: [Object], _header: 'POST /getHost HTTP/1.1\r\nhost: lookup.homematic.com:48335\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 223\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: [Object], socketPath: undefined, timeout: undefined, method: 'POST', path: '/getHost', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, [Symbol(outHeadersKey)]: [Object] }, request: Request { domain: null, _events: [Object], _eventsCount: 5, _maxListeners: undefined, method: 'POST', body: '{"clientCharacteristics":{"apiVersion":"12","applicationIdentifier":"iobroker","applicationVersion":"1.0","deviceManufacturer":"none","deviceType":"Computer","language":"en_US","osType":"Linux","osVersion":"NT"},"id":"bde"}', uri: [Object], readable: true, writable: true, explicitMethod: true, _qs: [Object], _auth: [Object], _oauth: [Object], _multipart: [Object], _redirect: [Object], _tunnel: [Object], _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: [Object], _rp_callbackOrig: undefined, callback: [Function], _rp_options: [Object], headers: [Object], setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: true, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '48335', host: 'lookup.homematic.com', path: '/getHost', _json: true, httpModule: [Object], agentClass: [Object], agent: [Object], _started: true, href: 'https://lookup.homematic.com:48335/getHost', req: [Object], ntick: true, response: [Circular], originalHost: 'lookup.homematic.com:48335', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: Caseless { dict: [Object] }, read: [Function], body: { errorCode: 'INVALID_REQUEST' } } } root@debian-iobroker:/opt/iobroker/node_modules/iobroker.hm-ip-cloud-accesspoint/api# node test_getAuthToken.js ------ test start -------- getHomematicHosts: { StatusCodeError: 400 - {"errorCode":"INVALID_REQUEST"} at new StatusCodeError (/opt/iobroker/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/opt/iobroker/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/opt/iobroker/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request. (/opt/iobroker/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage. (/opt/iobroker/node_modules/request/request.js:1083:12) name: 'StatusCodeError', statusCode: 400, message: '400 - {"errorCode":"INVALID_REQUEST"}', error: { errorCode: 'INVALID_REQUEST' }, options: { method: 'POST', json: true, body: { clientCharacteristics: [Object], id: 'bde' }, uri: 'https://lookup.homematic.com:48335/getHost', callback: [Function: RP$callback], transform: undefined, simple: true, resolveWithFullResponse: false, transform2xxOnly: false }, response: IncomingMessage { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [Object], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: false, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: false, domain: null, _events: { 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: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, connection: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { server: 'Apache-Coyote/1.1', 'x-application-context': 'application', 'content-type': 'application/json;charset=UTF-8', 'content-length': '31', date: 'Thu, 17 Jan 2019 08:42:27 GMT', connection: 'close' }, rawHeaders: [ 'Server', 'Apache-Coyote/1.1', 'X-Application-Context', 'application', 'Content-Type', 'application/json;charset=UTF-8', 'Content-Length', '31', 'Date', 'Thu, 17 Jan 2019 08:42:27 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: 'lookup.homematic.com', npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: [Object], _parent: null, _host: 'lookup.homematic.com', _readableState: [Object], readable: true, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, _bytesDispatched: 381, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [Object], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Object], [Symbol(asyncId)]: 11, [Symbol(bytesRead)]: 0 }, _consuming: true, _dumped: false, req: ClientRequest { domain: null, _events: [Object], _eventsCount: 5, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, upgrading: false, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Object], connection: [Object], _header: 'POST /getHost HTTP/1.1\r\nhost: lookup.homematic.com:48335\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 223\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: [Object], socketPath: undefined, timeout: undefined, method: 'POST', path: '/getHost', _ended: true, res: [Circular], aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, [Symbol(outHeadersKey)]: [Object] }, request: Request { domain: null, _events: [Object], _eventsCount: 5, _maxListeners: undefined, method: 'POST', body: '{"clientCharacteristics":{"apiVersion":"12","applicationIdentifier":"iobroker","applicationVersion":"1.0","deviceManufacturer":"none","deviceType":"Computer","language":"en_US","osType":"Linux","osVersion":"NT"},"id":"bde"}', uri: [Object], readable: true, writable: true, explicitMethod: true, _qs: [Object], _auth: [Object], _oauth: [Object], _multipart: [Object], _redirect: [Object], _tunnel: [Object], _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: [Object], _rp_callbackOrig: undefined, callback: [Function], _rp_options: [Object], headers: [Object], setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function: RP$callback], proxy: null, tunnel: true, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '48335', host: 'lookup.homematic.com', path: '/getHost', _json: true, httpModule: [Object], agentClass: [Object], agent: [Object], _started: true, href: 'https://lookup.homematic.com:48335/getHost', req: [Object], ntick: true, response: [Circular], originalHost: 'lookup.homematic.com:48335', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: responseToJSON], caseless: Caseless { dict: [Object] }, read: [Function], body: { errorCode: 'INVALID_REQUEST' } } } root@debian-iobroker:/opt/iobroker/node_modules/iobroker.hm-ip-cloud-accesspoint/api#