andig / pimatic-fritz

Pimatic plugin for Fritz!Box SmartHome and FritzDect!200 Node
GNU General Public License v2.0
8 stars 6 forks source link

Unhandled rejection Error: [object Object] #20

Closed thost96 closed 8 years ago

thost96 commented 8 years ago

I have added pimatic-fritz to my config for switching guest wifi on and off. Now i'm getting this error:

Unhandled rejection Error: [object Object]
    at Object.ensureErrorObject (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:261:20)
    at Promise._rejectUncheckedCheckError (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:657:22)
    at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:542:21)
    at Promise._settlePromise0 (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:590:10)
    at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:669:18)
    at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:125:16)
    at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:135:10)
    at Async.drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:16:14)
    at process._tickCallback (node.js:415:13)

here is my fritz plugin config:

{
      "plugin": "fritz",
      "url": "http://192.168.XXX.XXX",
      "user": "XXX",
      "password": "XXX",
      "interval": 3600
},

{
      "id": "guest-wlan",
      "name": "Gast WLAN",
      "class": "FritzWlan"
},

What is causing this rejection?

andig commented 8 years ago

Dunno. Could you try print the error object?

cm86 commented 8 years ago

Oh i think it's the firmware of your box. Guest-Wlan is not working with the actual firmware. ehm in pimatic i meant. Mit freundlichen Grüßen Chris

thost96 commented 8 years ago

@cm86 thats could be the reason. i have a fritzbox 7490 with firmware 6.51

cm86 commented 8 years ago

I think i habe read about the issue in the Pimatic Forum.

Alphascrypt commented 8 years ago

Same Problem FritzBox 7390 version 6.51.

Unhandled rejection Error: [object Object] at Object.ensureErrorObject (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:261:20) at Promise._rejectUncheckedCheckError (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:657:22) at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:556:21) at Promise._settlePromise0 (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:604:10) at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:679:18) at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:138:16) at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:148:10) at Async.drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:17:14) at process._tickCallback (node.js:415:13)

andig commented 8 years ago

Gibts Testcode zum reproduzieren?

Viele Grüße, Andreas

Am 07.05.2016 um 18:54 schrieb Alphascrypt notifications@github.com:

Same Problem FritzBox 7390 version 6.51.

Unhandled rejection Error: [object Object] at Object.ensureErrorObject (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:261:20) at Promise._rejectUncheckedCheckError (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:657:22) at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:556:21) at Promise._settlePromise0 (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:604:10) at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:679:18) at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:138:16) at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:148:10) at Async.drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:17:14) at process._tickCallback (node.js:415:13)

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

andig commented 8 years ago

Ps.: if its with the guest wlan functions I'm sorry- wontfix unless smbd wants to contribute a patch.

Viele Grüße, Andreas

Am 07.05.2016 um 18:54 schrieb Alphascrypt notifications@github.com:

Same Problem FritzBox 7390 version 6.51.

Unhandled rejection Error: [object Object] at Object.ensureErrorObject (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:261:20) at Promise._rejectUncheckedCheckError (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:657:22) at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:556:21) at Promise._settlePromise0 (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:604:10) at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:679:18) at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:138:16) at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:148:10) at Async.drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:17:14) at process._tickCallback (node.js:415:13)

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

Alphascrypt commented 8 years ago

Hast schnell geantwortet, super. Nein dies ist einfach der der startprozess wenn ich das fritz plugin mit laden lasse. Sobald ich ein DECT Thermostat hinzufüge startet die Pimatic nicht mehr und schreibt mir das: Invalid config: Missing property "rule,active,logging" in /rules/2, Property "class" is not a valid property in /rules/2, Property "ain" is not a valid property in /rules/2

andig commented 8 years ago

Mhm- aber die rules werden egtl. Nicht vom Plugin gemanagt. Mach bitte einen Fehler mit der Rule bei pimatic auf, gerne hier verlinken.

Am 07.05.2016 um 19:56 schrieb Alphascrypt notifications@github.com:

Hast schnell geantwortet, super. Nein dies ist einfach der der startprozess wenn ich das fritz plugin mit laden lasse. Sobald ich ein DECT Thermostat hinzufüge startet die Pimatic nicht mehr und schreibt mir das: Invalid config: Missing property "rule,active,logging" in /rules/2, Property "class" is not a valid property in /rules/2, Property "ain" is not a valid property in /rules/2

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

andig commented 8 years ago

@cm86 when do you get that error?

cm86 commented 8 years ago

Hmm, ich habe aktuell keine Probleme mit deinem Plugin. Guest-Wlan nutze ich nicht. Von daher kann ich hier nicht helfen. Hatte es am Anfang mal versucht, nutze es aber wie gesagt nicht.

Hmm, actually i have no problems with your plugin. I don't use the Guest-Wlan. So i can't help here so much. Just tried at the beginning, but i'm not using it.

mfg Chris

Alphascrypt commented 8 years ago

Der Fehler kommt sofort beim starten. Ich kann mir das nicht erklären.

The error comes directly on startup.

Alphascrypt commented 8 years ago

The thief is the new FritzOS 6.51 can u fix this problem with the new version?

andig commented 8 years ago

@Alphascrypt Du hast zwei Fehlermeldungen angegeben. Wann kommt welche?

Alphascrypt commented 8 years ago

@andig Hallo, zuerst kommt diese direkt nach der Datumsanzeige von pimatic beim start: Invalid config: Missing property "rule,active,logging" in /rules/2, Property "class" is not a valid property in /rules/2, Property "ain" is not a valid property in /rules/2

Nach dem html rendering kommt diese meldung: Unhandled rejection Error: [object Object] at Object.ensureErrorObject (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:261:20) at Promise._rejectUncheckedCheckError (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:657:22) at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:556:21) at Promise._settlePromise0 (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:604:10) at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/promise.js:679:18) at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:138:16) at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:148:10) at Async.drainQueues (/home/pi/pimatic-app/node_modules/pimatic-fritz/node_modules/bluebird/js/release/async.js:17:14) at process._tickCallback (node.js:415:13)

andig commented 8 years ago

Ok. Ich frag zum 3. mal ;) Hast Du zumindest für die erste Meldung einen Fehler bei Pimatic aufgemacht? Einschl. Deiner definierten Regeln? Ggf. ist der zweite nur ein Folgefehler.

Alphascrypt commented 8 years ago

Ja gerade eben : Pimatic forum

Alphascrypt commented 8 years ago

Ok ich habe den Fehler gefunden.

In der neuen FritzBox version ab 6.50 muss die Anmeldung mit Benutzer und Passwort aktiviert werden. danach zieht er sich alle Informationen.

fritz

andig commented 8 years ago

In der neuen FritzBox version ab 6.50 muss die Anmeldung mit Benutzer und Passwort aktiviert werden. danach zieht er sich alle Informationen.

Welches Setting hattest Du vorher? Würde das gerne testen um zumindest eine sinnvolle Fehlermeldung ausgeben zu können.

Alphascrypt commented 8 years ago

Ich hatte zuerst Anmeldung mit dem FritzBox-Kennwort. Vor dem update auf 6.51 lief dies auch ohne Probleme.

Das könntest du in deiner Doku als wichtigen Punkt hinterlegen.

andig commented 8 years ago

Ich hatte zuerst Anmeldung mit dem FritzBox-Kennwort. Vor dem update auf 6.51 lief dies auch ohne Probleme.

Kann ich nicht bestätigen. Ich habe eben auf 6.51 aktualisiert und verwende weiterhin nur Kennwort. Funktioniert wunderbar. Wie hattest Du denn die config.json eingestellt?

Alphascrypt commented 8 years ago

hier is der auszug der erforderlichen punkte:

Plugins: { "plugin": "fritz", "url": "http://192.168.178.1", "user": "admin", "password": "xxxx", "interval": 60 },

Device: { "id": "thermostat-1", "name": "Heizung Balkon", "class": "FritzThermostat", "ain": "xxxxxxxxxxxxx", }, { "id": "temp-1", "name": "Wohnzimmer Temp.", "class": "FritzTemperatureSensor", "ain": "xxxxxxxxxxxxx" }

andig commented 8 years ago

Please upgrade pimatic-fritz to 0.4.1 and open new issue if problem still exists.