homebridge-wink icon indicating copy to clipboard operation
homebridge-wink copied to clipboard

"Unexpected end of input" Error

Open khkremer opened this issue 9 years ago • 6 comments

When I add the Wink plugin, I get the following error message when I start HomeBridge:

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-wink/node_modules/wink-js/index.js:68:19)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)
raw message  
/usr/local/lib/node_modules/homebridge-wink/index.js:118
                    for (var i = 0; i < devices.data.length; i++) {
                                               ^

TypeError: Cannot read property 'data' of undefined
    at /usr/local/lib/node_modules/homebridge-wink/index.js:118:33
    at /usr/local/lib/node_modules/homebridge-wink/node_modules/wink-js/index.js:241:9
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-wink/node_modules/wink-js/index.js:75:7)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)

Here is the Wink related portion from my config.son file:

{
            "platform": "homebridge-wink.Wink",
            "name": "Wink",
            "client_id": "xxxxxx",
            "client_secret": "xxxxxx",
            "username": "xxxxx",
            "password": "xxxxxx",
            "hide_groups": ["garage_doors", "thermostats"],
            "hide_ids": []
    }

Any advice about how to fix this?

Thanks.

khkremer avatar Feb 11 '16 14:02 khkremer

I am having the same issue. Any updates on this?

cmcarver avatar Feb 29 '16 01:02 cmcarver

I figured out the issue. Mine was a silly mistake of wrong password. I must have changed the username when I used the correct pw then never used the correct user/people together. I had to go into the wink app to verify which pw I needed on my door lock security. But now it works.

cmcarver avatar Mar 01 '16 01:03 cmcarver

I am having the same problem. Any advice please?

nimustan avatar Aug 22 '16 18:08 nimustan

Same here, I had the same error, and I found a space in the username.

jpborjas avatar Sep 09 '16 21:09 jpborjas

I was told no spaces

Sent from my iPhone

On Sep 9, 2016, at 3:39 PM, jpborjas [email protected] wrote:

Same here, I had the same error, and I found a space in the username.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

nimustan avatar Sep 09 '16 22:09 nimustan

same issue, i have the correct username and password, how do i fix this?

apressly avatar Oct 12 '16 03:10 apressly