nfarina / homebridge-sonos

Sonos plugin for homebridge: https://github.com/nfarina/homebridge
155 stars 52 forks source link

Fehler nach einigen Stunden... #41

Open thoduh opened 7 years ago

thoduh commented 7 years ago

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?

fwboettger commented 7 years ago

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.

thoduh commented 7 years ago

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 ?

fwboettger commented 7 years ago

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.

Nousemusic commented 7 years ago

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.

thoduh commented 7 years ago

@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 commented 7 years ago

Läuft, super. Vielen Dank!

fwboettger commented 7 years ago

Ja das wäre das Vorgehen :-)

Am 23.10.2016 um 21:45 schrieb Nousemusic notifications@github.com:

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 commented 7 years ago

@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 notifications@github.com:

@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.

Nousemusic commented 7 years ago

@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.

tobiasjungnickel commented 6 years ago

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