Skip to content
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

keeps crashing #11

Open
KennyVB opened this issue Dec 28, 2015 · 5 comments
Open

keeps crashing #11

KennyVB opened this issue Dec 28, 2015 · 5 comments

Comments

@KennyVB
Copy link

KennyVB commented Dec 28, 2015

/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:11
throw new Error("This callback function has already been called by someone else; it can only be called one time.");
^

Error: This callback function has already been called by someone else; it can only be called one time.
at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:11:13
at null. (/usr/lib/node_modules/homebridge-ssh/index.js:74:5)
at emitOne (events.js:77:13)
at emit (events.js:169:7)
at readableAddChunk (/usr/lib/node_modules/homebridge-ssh/node_modules/readable-stream/lib/_stream_readable.js:201:16)
at Readable.push (/usr/lib/node_modules/homebridge-ssh/node_modules/readable-stream/lib/_stream_readable.js:165:10)
at Duplexify._forward (/usr/lib/node_modules/homebridge-ssh/node_modules/duplexify/index.js:162:26)
at Channel.onreadable (/usr/lib/node_modules/homebridge-ssh/node_modules/duplexify/index.js:126:10)
at emitNone (events.js:67:13)
at Channel.emit (events.js:166:7)

@alguevara7
Copy link
Owner

I'll take a look later in today. Which version on node / os are you running on ?

@mtk64
Copy link

mtk64 commented Jan 8, 2016

i get the same problem right now, running on "Debian GNU/Linux 7 (wheezy)":

/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:11
throw new Error("This callback function has already been called by someone else; it can only be called one time.");
^

Error: This callback function has already been called by someone else; it can only be called one time.
at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:11:13
at null. (/usr/lib/node_modules/homebridge-ssh/index.js:74:5)
at emitOne (events.js:77:13)
at emit (events.js:169:7)
at readableAddChunk (/usr/lib/node_modules/homebridge-ssh/node_modules/readable-stream/lib/_stream_readable.js:201:16)
at Readable.push (/usr/lib/node_modules/homebridge-ssh/node_modules/readable-stream/lib/_stream_readable.js:165:10)
at Duplexify._forward (/usr/lib/node_modules/homebridge-ssh/node_modules/duplexify/index.js:162:26)
at Channel.onreadable (/usr/lib/node_modules/homebridge-ssh/node_modules/duplexify/index.js:126:10)
at emitNone (events.js:67:13)
at Channel.emit (events.js:166:7)

already made some npm install -g homebridge-ssh to update, but no change :-(

feel free to ask for more details if necessary :-)

regards
michael

@mtk64
Copy link

mtk64 commented Jan 8, 2016

just identified the configuration which is producing the problem. just removed that section and it sems to work. just calling to bash scripts setting a switch and a variable within my homeautomation.
{
"accessory": "SSH",
"name": "Flur LED",
"on": "/aio/daheim-Devices Wohnzimmer LED-Flur On;/aio/daheim-Variable Status IR_LED_Flur on",
"off": "/aio/daheim-Devices Wohnzimmer LED-Flur Off;/aio/daheim-Variable Status IR_LED_Flur off",
"state": "/aio/daheim-Variable Status IR_LED_Flur",
"on_value" : "on",
"exact_match": true,
"ssh": {
"user": "root",
"host": "127.0.0.1",
"port": 22,
...
will examine more ....
michael

@mtk64
Copy link

mtk64 commented Jan 8, 2016

fixed with pipe to grep 'on' | wc -l and expecting only one value. So it seems the expected "on_value" has to match exactly like described in the line below, my mistake!
But the exception handling of the plugin code could be better and should not crash the homebridge.
Maybe you might improve that :-)

  {
          "accessory": "SSH",
          "name": "Flur LED",
          "on": "/aio/daheim-Devices Wohnzimmer LED-Flur On;/aio/daheim-Variable Status IR_LED_Flur on",
          "off": "/aio/daheim-Devices Wohnzimmer LED-Flur Off;/aio/daheim-Variable Status IR_LED_Flur off",
          "state": "/aio/daheim-Variable Status IR_LED_Flur| grep 'on' | wc -l",
          "on_value" : "2",
          "exact_match": true,
          "ssh": {

...

@alguevara7
Copy link
Owner

yes that's a good point. there is really no exception handling at all at this point in time, I think I will have time this weekend to cobble something :) thanks for posting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants