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

Fehler nach einigen Stunden...

Open thoduh opened this issue 8 years ago • 10 comments

Nach einigen Stunden kommt dieser Fehler:

events.js:160 throw er; // Unhandled 'error' event ^

Error: connect ENETDOWN 192.168.178.49:1400 - Local (192.168.178.55:62519) at Object.exports._errnoException (util.js:1026:11) at exports._exceptionWithHostPort (util.js:1049:20) at connect (net.js:879:16) at net.js:968:9 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

Was kann ich dagegen unternehmen?

thoduh avatar Oct 22 '16 19:10 thoduh

Have a look at pull request #39 . I'm convinced this is the solution to this problem. Schau dir mal pull request #39 an, bin fast sicher dass das die Lösung für das Problem ist.

fwboettger avatar Oct 22 '16 20:10 fwboettger

Destroy mag er wohl nicht:

/usr/local/lib/node_modules/homebridge-sonos/index.js:204 search.destroy(); // we don't need to continue searching. ^

TypeError: search.destroy is not a function at SonosAccessory. (/usr/local/lib/node_modules/homebridge-sonos/index.js:204:56) at /usr/local/lib/node_modules/homebridge-sonos/node_modules/sonos/lib/sonos.js:708:7 at Parser. (/usr/local/lib/node_modules/homebridge-sonos/node_modules/xml2js/lib/xml2js.js:255:20) at emitOne (events.js:96:13) at Parser.emit (events.js:188:7) at Object.saxParser.onclosetag (/usr/local/lib/node_modules/homebridge-sonos/node_modules/xml2js/lib/xml2js.js:225:24) at emit (/usr/local/lib/node_modules/homebridge-sonos/node_modules/sax/lib/sax.js:615:33) at emitNode (/usr/local/lib/node_modules/homebridge-sonos/node_modules/sax/lib/sax.js:620:3) at closeTag (/usr/local/lib/node_modules/homebridge-sonos/node_modules/sax/lib/sax.js:861:5) at Object.write (/usr/local/lib/node_modules/homebridge-sonos/node_modules/sax/lib/sax.js:1293:29)

Und der Eintrag in der package.json, steht bei mir in Zeile 53 und nicht in Zeile 21 ?

thoduh avatar Oct 23 '16 08:10 thoduh

Dann hast du noch die 'outdated' sonos library installiert. Du musst zuerst in der package.json den Eintrag von "^0.8.0" auf "^0.12.1" ändern (wenn es bei dir in Zeile 53 steht nimmst du möglicherweise einen Docker Container, das passt schon so). Dann musst du in dem Verzeichnis mit der package.json den Befehl "npm update" aufrufen, dann wird die 0.12.1 Version heruntergeladen (ins Unterverzeichnis node_modules/sonos/). Anschließend dann die index.js wie beschrieben mit dem search.destroy() updaten, dann homebridge (oder den entsprechenden Docker Container) neu starten. Hab's grad verifiziert, bei mir klappt das. Hab eine Synology DS216+II mit Docker und dem marcoraddatz-homebridge docker image laufen (siehe auch http://jensbouma.nl/blog/2016/08/08/homebridge-in-a-docker-container-on-the-synology-diskstation-guide/) bei mir.

fwboettger avatar Oct 23 '16 15:10 fwboettger

Hallo @fwboettger,

ist es korrekt, in der package.json folgendes zu ändern: "dependencies": { "sonos": "^0.8.0", "underscore": "^1.8.3"

in

}, "dependencies": { "sonos": "^0.12.1", "underscore": "^1.8.3"

Dan führe ich in dem Verzeichnis "npm update" aus.

Anwschließend ändere ich die index.js wie folgt: if (coordinator.ip == data.ip) { this.log("Found a playable coordinator device at %s in zone '%s' for accessory '%s' i$ this.device = device; search.socket.close(); // we don't need to continue searching.

in if (coordinator.ip == data.ip) { this.log("Found a playable coordinator device at %s in zone '%s' for accessory '%s' i$ this.device = device; search.destroy(); // we don't need to continue searching.

Wäre das Vorgehen soweit oK?

Danke im Voraus.

Nousemusic avatar Oct 23 '16 19:10 Nousemusic

@fwboettger Teste gerade ob es jetzt läuft 😉 Wie kann ich eigentlich die Version der homebridge und Plugins abfragen! So ähnlich wie npm -v müsste es doch geben, oder?

thoduh avatar Oct 24 '16 17:10 thoduh

Läuft, super. Vielen Dank!

thoduh avatar Oct 25 '16 15:10 thoduh

Ja das wäre das Vorgehen :-)

Am 23.10.2016 um 21:45 schrieb Nousemusic [email protected]:

Hallo @fwboettger,

ist es korrekt, in der package.json folgendes zu ändern: "dependencies": { "sonos": "^0.8.0", "underscore": "^1.8.3"

in

}, "dependencies": { "sonos": "^0.12.1", "underscore": "^1.8.3"

Dan führe ich in dem Verzeichnis "npm update" aus.

Anwschließend ändere ich die index.js wie folgt: if (coordinator.ip == data.ip) { this.log("Found a playable coordinator device at %s in zone '%s' for accessory '%s' i$ this.device = device; search.socket.close(); // we don't need to continue searching.

in if (coordinator.ip == data.ip) { this.log("Found a playable coordinator device at %s in zone '%s' for accessory '%s' i$ this.device = device; search.destroy(); // we don't need to continue searching.

Wäre das Vorgehen soweit oK?

Danke im Voraus.

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

fwboettger avatar Oct 25 '16 18:10 fwboettger

@nfarina just merged the pull request. It should be available now as the updated official plugin version :-)

Not familiar really with npm at all, sorry to admit cannot really answer that particular question:-(

Am 24.10.2016 um 19:01 schrieb thoduh [email protected]:

@fwboettger Teste gerade ob es jetzt läuft 😉 Wie kann ich eigentlich die Version der homebridge und Plugins abfragen! So ähnlich wie npm -v müsste es doch geben, oder?

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

fwboettger avatar Oct 25 '16 18:10 fwboettger

@fwboettger Danke für die gute Arbeit und die super Betreuung. Klasse.

Ich habe aktuell keine Abstürze/ Freeze der Homebridge mit der alten Sonos-Plugin-Version. Getreu dem Motto never change... meine Frage, hat die Version 0.12.1 weitere Features/ Vorteile welche für ein Update sprechen?

Danke im Voraus.

Nousemusic avatar Oct 26 '16 12:10 Nousemusic

trotz der Version 0.12.1 und der korrekten Codezeile, die oben beschrieben ist, bekomme ich nach einiger Zeit den Abbruch:

events.js:112
    throw er; // Unhandled 'error' event

tobiasjungnickel avatar Mar 05 '18 10:03 tobiasjungnickel