Open winkhum opened 6 years ago
Having the same issue with my raspberry pi setup.
Did you ever resolve this? I'm having the same probem
Spoke too soon. I seem to have fixed mine. I must have made an error on the Client ID and when I copied, pasted and restarted homebridge, it all worked. Now to figure out how to use it...
Hi! I am new to this whole thing. I seem to follow the process and everything works till i get the message from homebridge to go to my local authetification with wink. I enter the adress and my account data and in browser it says that I am authentified, but when I swith to homebridge I get this -
[2018-4-17 11:04:22] [Wink] Could not authenticate with wink.com { StatusCodeError: 400 - {"data":{"error":"invalid_grant","error_description":""},"errors":["invalid_grant: "],"pagination":{},"error":"invalid_grant","error_description":""} at new StatusCodeError (/usr/local/lib/node_modules/homebridge-wink3/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/usr/local/lib/node_modules/homebridge-wink3/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/homebridge-wink3/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/usr/local/lib/node_modules/homebridge-wink3/node_modules/request/request.js:186:22) at emitTwo (events.js:125:13) at Request.emit (events.js:213:7) at Request. (/usr/local/lib/node_modules/homebridge-wink3/node_modules/request/request.js:1163:10)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
at IncomingMessage. (/usr/local/lib/node_modules/homebridge-wink3/node_modules/request/request.js:1085:12)
name: 'StatusCodeError',
statusCode: 400,
message: '400 - {"data":{"error":"invalid_grant","error_description":""},"errors":["invalid_grant: "],"pagination":{},"error":"invalid_grant","error_description":""}',
error:
{ data: { error: 'invalid_grant', error_description: '' },
errors: [ 'invalid_grant: ' ],
pagination: {},
error: 'invalid_grant',
error_description: '' },
options:
{ method: 'POST',
baseUrl: 'https://api.wink.com',
uri: '/oauth2/token',
body:
{ grant_type: 'code',
client_secret: '4TNHa5T-nwxpvbJTMBBwytgbXfE-EU2',
code: 'KvwAkX_YATmCLMWFOiOh' },
json: true,
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: true,
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: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 9,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'api.wink.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 250,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1,