New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: socket hang up #12

Closed
KiboOst opened this Issue Jun 20, 2017 · 25 comments

Comments

Projects
None yet
4 participants
@KiboOst

KiboOst commented Jun 20, 2017

Hi,

I'm using a docker homebridge image on Synology NAS with DSM6.
The image: marcoraddatz/homebridge

Installed devolo plugin, got uuid, passkey and updated coonfig.json, but here is what I get:

Initializing Devolo platform...
HBDevoloPlatform > Searching for Devolo Central Unit.
HBDevoloPlatform > Central Unit found.

/usr/local/lib/node_modules/homebridge-devolo/dist/index.js:65
throw err;
^
Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketCloseListener (_http_client.js:334:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:191:7)
at TCP._handle.close [as _onclose] (net.js:511:12)

Any idea ?

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 20, 2017

Just to ad more infor, if I remove the platform devolo in config.json, all works and I can add homebridge on my iOS10 iPhone.

As soon as I add the Devolo in config.json, it crash after have find the central unit

KiboOst commented Jun 20, 2017

Just to ad more infor, if I remove the platform devolo in config.json, all works and I can add homebridge on my iOS10 iPhone.

As soon as I add the Devolo in config.json, it crash after have find the central unit

@kdietrich

This comment has been minimized.

Show comment
Hide comment
@kdietrich

kdietrich Jun 20, 2017

Owner

Can you please start homebridge with the -D flag and provide a full log? I'll look into it. Thanks!

Owner

kdietrich commented Jun 20, 2017

Can you please start homebridge with the -D flag and provide a full log? I'll look into it. Thanks!

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 20, 2017

npm info using npm@4.2.0
npm info using node@v7.10.0
npm info ok
[6/20/2017, 2:59:11 PM] Loaded plugin: homebridge-devolo
[6/20/2017, 2:59:11 PM] Registering platform 'homebridge-devolo.Devolo'
[6/20/2017, 2:59:11 PM] ---
[6/20/2017, 2:59:11 PM] Loaded config.json with 0 accessories and 1 platforms.
[6/20/2017, 2:59:11 PM] ---
[6/20/2017, 2:59:12 PM] Loading 1 platforms...
[6/20/2017, 2:59:12 PM] [Devolo] Initializing Devolo platform...
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Initializing (Version: 201702221607)
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Configuration:
{ platform: 'Devolo',
name: 'Devolo',
host: '192.168.0.25',
email: 'xxx',
password: 'xxx',
uuid: 'xxx',
gateway: 'xxx',
passkey: 'xxx',
heartrate: 8 }
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Searching for Devolo Central Unit.
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Devolo API Version: 201702202047
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloCentralUnit > Initializing
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Central Unit found.
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > SessionID: ID77DB5JnfJ5KGgpK60FlkLN7KkmM3ONibD32AEnd
/usr/local/lib/node_modules/homebridge-devolo/dist/index.js:65
throw err;
^

Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketCloseListener (_http_client.js:334:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:191:7)
at TCP._handle.close [as _onclose] (net.js:511:12)

KiboOst commented Jun 20, 2017

npm info using npm@4.2.0
npm info using node@v7.10.0
npm info ok
[6/20/2017, 2:59:11 PM] Loaded plugin: homebridge-devolo
[6/20/2017, 2:59:11 PM] Registering platform 'homebridge-devolo.Devolo'
[6/20/2017, 2:59:11 PM] ---
[6/20/2017, 2:59:11 PM] Loaded config.json with 0 accessories and 1 platforms.
[6/20/2017, 2:59:11 PM] ---
[6/20/2017, 2:59:12 PM] Loading 1 platforms...
[6/20/2017, 2:59:12 PM] [Devolo] Initializing Devolo platform...
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Initializing (Version: 201702221607)
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Configuration:
{ platform: 'Devolo',
name: 'Devolo',
host: '192.168.0.25',
email: 'xxx',
password: 'xxx',
uuid: 'xxx',
gateway: 'xxx',
passkey: 'xxx',
heartrate: 8 }
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Searching for Devolo Central Unit.
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Devolo API Version: 201702202047
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloCentralUnit > Initializing
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > Central Unit found.
[6/20/2017, 2:59:12 PM] [Devolo] HBDevoloPlatform > SessionID: ID77DB5JnfJ5KGgpK60FlkLN7KkmM3ONibD32AEnd
/usr/local/lib/node_modules/homebridge-devolo/dist/index.js:65
throw err;
^

Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketCloseListener (_http_client.js:334:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:191:7)
at TCP._handle.close [as _onclose] (net.js:511:12)

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 20, 2017

I just tested apt-get update/upgrade, all went fine, but still same error.

KiboOst commented Jun 20, 2017

I just tested apt-get update/upgrade, all went fine, but still same error.

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 22, 2017

Any idea I could test ?

KiboOst commented Jun 22, 2017

Any idea I could test ?

@kdietrich

This comment has been minimized.

Show comment
Hide comment
@kdietrich

kdietrich Jun 22, 2017

Owner

The error is raised when the first call to your local devolo gateway occurs. Are you sure that the IP address in config is right? Have you tried to ping the IP on the device that runs homebridge?

Owner

kdietrich commented Jun 22, 2017

The error is raised when the first call to your local devolo gateway occurs. Are you sure that the IP address in config is right? Have you tried to ping the IP on the device that runs homebridge?

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 22, 2017

I will double check, but yes all is right, and it does say HBDevoloPlatform > Central Unit found and return passeky/uuid. The php API also works perfectly with same params.

KiboOst commented Jun 22, 2017

I will double check, but yes all is right, and it does say HBDevoloPlatform > Central Unit found and return passeky/uuid. The php API also works perfectly with same params.

@kdietrich

This comment has been minimized.

Show comment
Hide comment
@kdietrich

kdietrich Jun 22, 2017

Owner

Does it work with the session id that is output in the log file?

Owner

kdietrich commented Jun 22, 2017

Does it work with the session id that is output in the log file?

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 22, 2017

ah, interesting !! I will test that this evening when at home !

KiboOst commented Jun 22, 2017

ah, interesting !! I will test that this evening when at home !

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 22, 2017

Ok, just did the test:
homebridge -D
copy sessionID
paste it into php api
-> it works

Could it be a socket not sending end message, or some timeout ?

ping to IP from homebridge device does answer 100%, around 2ms

KiboOst commented Jun 22, 2017

Ok, just did the test:
homebridge -D
copy sessionID
paste it into php api
-> it works

Could it be a socket not sending end message, or some timeout ?

ping to IP from homebridge device does answer 100%, around 2ms

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 26, 2017

Let me know if you have anything to test ;-)

KiboOst commented Jun 26, 2017

Let me know if you have anything to test ;-)

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 28, 2017

Ok, just setup a raspberry Pi3 fresh raspbian with homebridge, exact same result.

[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloPlatform > Searching for Devolo Central Unit.
[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloPlatform > Devolo API Version: 201702202047
[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloCentralUnit > Initializing
[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloPlatform > Central Unit found.
[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloPlatform > SessionID: ID218DB8OcmDO6GopFP1EgdH89KdlL00EdpLKPHEnd
/usr/lib/node_modules/homebridge-devolo/dist/index.js:65
throw err;
^

Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketCloseListener (_http_client.js:334:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:191:7)
at TCP._handle.close [as _onclose] (net.js:511:12)

Don't see what I could try ...

KiboOst commented Jun 28, 2017

Ok, just setup a raspberry Pi3 fresh raspbian with homebridge, exact same result.

[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloPlatform > Searching for Devolo Central Unit.
[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloPlatform > Devolo API Version: 201702202047
[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloCentralUnit > Initializing
[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloPlatform > Central Unit found.
[6/28/2017, 2:33:41 PM] [Devolo] HBDevoloPlatform > SessionID: ID218DB8OcmDO6GopFP1EgdH89KdlL00EdpLKPHEnd
/usr/lib/node_modules/homebridge-devolo/dist/index.js:65
throw err;
^

Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketCloseListener (_http_client.js:334:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:191:7)
at TCP._handle.close [as _onclose] (net.js:511:12)

Don't see what I could try ...

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 29, 2017

Just in case:

root@raspberrypi:/home/pi# wget 192.168.0.25/dhlp/portal/light
--2017-06-29 18:33:17-- http://192.168.0.25/dhlp/portal/light
Connecting to 192.168.0.25:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.

All seems ok, any idea why it doesn't work ?

KiboOst commented Jun 29, 2017

Just in case:

root@raspberrypi:/home/pi# wget 192.168.0.25/dhlp/portal/light
--2017-06-29 18:33:17-- http://192.168.0.25/dhlp/portal/light
Connecting to 192.168.0.25:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.

All seems ok, any idea why it doesn't work ?

@kdietrich

This comment has been minimized.

Show comment
Hide comment
@kdietrich

kdietrich Jun 29, 2017

Owner

Which version are you on? master or latest release?

Owner

kdietrich commented Jun 29, 2017

Which version are you on? master or latest release?

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 29, 2017

I guess master, I have retried again, this time following this:
https://www.loggn.de/apple-home-homekit-devolo-geraete-mit-der-apple-app-steuern-homebridge/#comment-187331

installed with: npm install -g homebridge-devolo
node 6.11.0
npm 3.10.10
Have tried with nearly all versions of nodes/npm, homebridge always works alone and but never got devolo running

KiboOst commented Jun 29, 2017

I guess master, I have retried again, this time following this:
https://www.loggn.de/apple-home-homekit-devolo-geraete-mit-der-apple-app-steuern-homebridge/#comment-187331

installed with: npm install -g homebridge-devolo
node 6.11.0
npm 3.10.10
Have tried with nearly all versions of nodes/npm, homebridge always works alone and but never got devolo running

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 30, 2017

Ok, tried on a full raspbian, exact same thing. Sorry, giving up, too much waste of time for me ...

KiboOst commented Jun 30, 2017

Ok, tried on a full raspbian, exact same thing. Sorry, giving up, too much waste of time for me ...

@kdietrich

This comment has been minimized.

Show comment
Hide comment
@kdietrich

kdietrich Jun 30, 2017

Owner

All I can say is that the plugin - as is - is used in multiple environments without any issues. Is there a way you can give me SSH access to your raspberry? I'd really like to check what's going on.

Owner

kdietrich commented Jun 30, 2017

All I can say is that the plugin - as is - is used in multiple environments without any issues. Is there a way you can give me SSH access to your raspberry? I'd really like to check what's going on.

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 30, 2017

How could I do that? I have a ddns and can map a port to the rasp IP but does ssh will follow ?
Please send an email to kiboost thesign free point fr, won't give adress here

KiboOst commented Jun 30, 2017

How could I do that? I have a ddns and can map a port to the rasp IP but does ssh will follow ?
Please send an email to kiboost thesign free point fr, won't give adress here

@kdietrich

This comment has been minimized.

Show comment
Hide comment
@kdietrich

kdietrich Jun 30, 2017

Owner

Sure, I'll ping you per mail when I'm free later!

Owner

kdietrich commented Jun 30, 2017

Sure, I'll ping you per mail when I'm free later!

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jun 30, 2017

ok, have access right with putty from exterior. We can connect on facebook for live discussion in needed, will test you in answer email.
Thanks

KiboOst commented Jun 30, 2017

ok, have access right with putty from exterior. We can connect on facebook for live discussion in needed, will test you in answer email.
Thanks

@kdietrich

This comment has been minimized.

Show comment
Hide comment
@kdietrich

kdietrich Jul 2, 2017

Owner

I've contacted you per mail.

Owner

kdietrich commented Jul 2, 2017

I've contacted you per mail.

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Jul 3, 2017

Many thanks Kevin, it now works !
Was a timeout in the node-devolo code, after increasing it, it now works both on Synology NAS Docker and Raspberry :-)

KiboOst commented Jul 3, 2017

Many thanks Kevin, it now works !
Was a timeout in the node-devolo code, after increasing it, it now works both on Synology NAS Docker and Raspberry :-)

@KiboOst KiboOst closed this Jul 3, 2017

@manix1979

This comment has been minimized.

Show comment
Hide comment
@manix1979

manix1979 Aug 5, 2017

What line needs to be edited to get it work?

manix1979 commented Aug 5, 2017

What line needs to be edited to get it work?

@ramsnerm

This comment has been minimized.

Show comment
Hide comment
@ramsnerm

ramsnerm Aug 13, 2017

What kind of changes did you made?

ramsnerm commented Aug 13, 2017

What kind of changes did you made?

@KiboOst

This comment has been minimized.

Show comment
Hide comment
@KiboOst

KiboOst Sep 7, 2017

Hi,

You have to change the timeout value in this line:

req.setTimeout(10000, function () {
    req.connection.destroy();
});

in /usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/DevoloApi.js

KiboOst commented Sep 7, 2017

Hi,

You have to change the timeout value in this line:

req.setTimeout(10000, function () {
    req.connection.destroy();
});

in /usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/DevoloApi.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment