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

TypeError: Cannot read property 'length' of undefined #70

Open
Erdnuckl opened this issue May 24, 2020 · 10 comments
Open

TypeError: Cannot read property 'length' of undefined #70

Erdnuckl opened this issue May 24, 2020 · 10 comments

Comments

@Erdnuckl
Copy link

Hallo,

Ich laufe mit meiner Installation leider beim ersten Start in ein Problem. Ich habe heute sowohl Homebridge als auch das Devolo Plugin installiert. Beide starten auch und ich kann in der config.json auch die Zugangsdaten von myDevolo eintragen. Im Anschluss erhalten ich auch meine uuid, gateway und passkey Daten. Wenn ich diese nun in die config.json eintrage und Homebridge neustarte bleibt alles leider mit der folgenden Fehlermeldung stehen bzw. läuft in eine Rebootschleife:

[2020-5-24 16:34:58] [Devolo] HBDevoloPlatform > Central Unit found.
TypeError: Cannot read property 'length' of undefined
at /usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/Devolo.js:363:47
at /usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/DevoloApi.js:185:17
at IncomingMessage. (/usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/DevoloApi.js:69:21)
at IncomingMessage.emit (events.js:322:22)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

Hab ich hier etwas falsch gemacht?

@nicoh88
Copy link
Collaborator

nicoh88 commented May 24, 2020

Oh. Zeig mal deine Config ...

Gruß

@Erdnuckl
Copy link
Author

Erdnuckl commented May 24, 2020

Ich hoffe ich habe keinen kritischen Wert übersehen beim anonymisieren

{
"bridge": {
"name": "Homebridge 2F0F",
"username": „xx:xx:xx:xx:xx:xx“,
"port": 51781,
"pin": „xxx-xx-xxx“
},
"accessories": [],
"platforms": [
{
"name": "Config",
"port": 8581,
"platform": "config"
},
{
"platform": "Devolo",
"name": "Devolo",
"host": "192.168.178.22",
"email": „[email protected]“,
"password": „xxx“,
"uuid": „xxxxx-xxxx-xxxx-xxxx-xxxxxx“,
"gateway": „xxxxxxxxxxxxxx“,
"passkey": „xxxxxxxxxxxx“
}
]
}

Passt das so?

Hier noch ein Screenshot, da die Formatierung hier kaputt geht:
Bildschirmfoto 2020-05-24 um 18 18 37

@nicoh88
Copy link
Collaborator

nicoh88 commented May 25, 2020

@Erdnuckl Wie hasst du die config.json bearbeitet?

Die und sind falsch - es müssen alles " (gerade Striche und oben) sein. Die 10 vorkommen dieser Zeichen löschen und ordentlich über die Tastatur (SHIFT+2) einfügen.

@Erdnuckl
Copy link
Author

@nicoh88 Das ist leider beim Kopieren vom System auf den Mac passiert. Ich habe aber jetzt noch mal alle " durch (SHIFT+2) ersetzt um hier sicher zu gehen. Leider ohne Erfolg. Den Screenshot habe ich jetzt direkt vom System gemacht.

Bildschirmfoto 2020-05-25 um 08 51 23

@nicoh88
Copy link
Collaborator

nicoh88 commented May 25, 2020

Hmm, da sind mit Sicherheit noch andere ungültige Zeichen versteckt...

Wenn du die Zeilen uuid, gateway und passkey löschst, geht es?
Ordentlichen Texteditor wie Notepad++ oder Sublime Text verwenden?

Viele Grüße

@Erdnuckl
Copy link
Author

Erdnuckl commented May 25, 2020

Wenn ich die Zeilen lösche kommt der Eintrag in der Console, die drei Werte zu ergänzen. Wenn ich das dann mache, kommt es zu der Fehlermeldung.
Zur Sicherheit habe ich die Werte jetzt händisch in Nano eingegeben. Bekomme aber leider immer noch die Fehlermeldung.

Ich wäre wohl bereit meine original config.json zu teilen (wenn das hilft). Allerdings nicht hier als Post.

@nicoh88
Copy link
Collaborator

nicoh88 commented May 25, 2020

Hmm, eigenartig.

Hast du all deinen devolo Geräten einen Ort zugewiesen? Ich habe da noch was in Erinnerung, dass es Probleme gab, wenn Geräte keinem Ort zugeordnet waren...
Hat jedes Gerät einen eigenständigen / einmaligen Namen?!

Du hast auch mindestens ein Gerät das von homebridge-devolo unterstützt wird?
Du hast nur eine Zentrale in deinem myDevolo?

Welche node Version hast du installiert?

node -v

Gruß

@Erdnuckl
Copy link
Author

Erdnuckl commented May 25, 2020

@nicoh88
Die Node Version ist v12.16.3

In Verwendung sind die Devolo Thermostate, zwei Steckdosen und die Rauchmelder. Alle sind Orten zugewiesen. Auch die Namen sind eindeutig wie z.B. Thermostat - Wohnzimmer (kurz) oder Steckdose - Küche und ich habe auch nur eine Zentrale.

@Erdnuckl
Copy link
Author

Erdnuckl commented Jun 3, 2020

@nicoh88 ich habe jetzt noch einmal die Namen der Geräte geändert, da ich gesehen habe das Homekit nur 25 CHAR verträgt. Leider immer noch ohne Erfolg:

[2020-6-3 19:19:17] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [2020-6-3 19:19:23] [HB Supervisor] OS: Linux 4.19.97-v7l+ arm [2020-6-3 19:19:23] [HB Supervisor] Homebridge Path: /usr/lib/node_modules/homebridge/bin/homebridge [2020-6-3 19:19:23] [HB Supervisor] UI Path: /usr/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js [2020-6-3 19:19:23] [HB Supervisor] Starting Homebridge with extra flags: -I [2020-6-3 19:19:23] [HB Supervisor] Started Homebridge v1.1.0 with PID: 10437 [2020-6-3 19:19:24] Loaded config.json with 0 accessories and 2 platforms. [2020-6-3 19:19:24] --- [2020-6-3 19:19:24] Loaded plugin: [email protected] [2020-6-3 19:19:24] Registering platform 'homebridge-config-ui-x.config' [2020-6-3 19:19:24] --- [2020-6-3 19:19:24] Loaded plugin: [email protected] [2020-6-3 19:19:24] Registering platform 'homebridge-devolo.Devolo' [2020-6-3 19:19:24] --- [2020-6-3 19:19:24] Loading 2 platforms... [2020-6-3 19:19:24] [Config] Initializing config platform... [2020-6-3 19:19:24] [Config] Running in Service Mode [2020-6-3 19:19:24] [Devolo] Initializing Devolo platform... [2020-6-3 19:19:24] [Devolo] HBDevoloPlatform > Searching for Devolo Central Unit. [2020-6-3 19:19:26] [Config] Homebridge Config UI X v4.21.0 is listening on :: port 8581 Trying to connect to socket. Websocket open [2020-6-3 19:19:26] [Devolo] HBDevoloPlatform > Central Unit found. [2020-6-3 19:19:32] TypeError: Cannot read property 'length' of undefined at /usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/Devolo.js:363:47 at /usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/DevoloApi.js:185:17 at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/DevoloApi.js:69:21) at IncomingMessage.emit (events.js:322:22) at endReadableNT (_stream_readable.js:1187:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) [2020-6-3 19:19:32] Got SIGTERM, shutting down Homebridge... [2020-6-3 19:19:37] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [2020-6-3 19:19:42] [HB Supervisor] Restarting Homebridge...

@Erdnuckl
Copy link
Author

Erdnuckl commented Jun 3, 2020

und wenn ich die Homebridge -D starte bekomme ich folgenden Output:
2020-6-3 19:29:19] [Devolo] HBDevoloPlatform > Searching for Devolo Central Unit. Trying to connect to socket. Websocket open [2020-6-3 19:29:20] [Devolo] HBDevoloPlatform > Devolo API Version: 201707161504 [2020-6-3 19:29:20] [Devolo] HBDevoloCentralUnit > Initializing [2020-6-3 19:29:20] [Devolo] HBDevoloPlatform > Central Unit found. [2020-6-3 19:29:20] [Devolo] HBDevoloPlatform > SessionID: ID583DBPFbiN7MDgeG9KAiiO40AaoH9LAjaK16AEnd [2020-6-3 19:29:24] [Devolo] HBDevoloSmokeDetectorDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloThermostatValveDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloThermostatValveDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloSmokeDetectorDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloThermostatValveDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloSwitchMeterDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloThermostatValveDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloSmokeDetectorDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloThermostatValveDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloSmokeDetectorDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloThermostatValveDevice > Initializing [2020-6-3 19:29:24] [Devolo] HBDevoloSwitchMeterDevice > Initializing [2020-6-3 19:29:24] TypeError: Cannot read property 'length' of undefined at /usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/Devolo.js:363:47 at /usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/DevoloApi.js:185:17 at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-devolo/node_modules/node-devolo/dist/DevoloApi.js:69:21) at IncomingMessage.emit (events.js:322:22) at endReadableNT (_stream_readable.js:1187:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)

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

2 participants