NEWS
[Gelöst] Amazon-Dash Adapter läuft nicht
-
Ach menno, der Adapter läuft nicht unter Windows. Warum wird die Installation trotzdem gestartet?
$ ./iobroker add amazon-dash NPM version: 6.1.0 npm install iobroker.amazon-dash --production --save --prefix "C:/dev/iobroker" (System call) Der Befehl "apt-get" ist entweder falsch geschrieben oder konnte nicht gefunden werden. Der Befehl "true" ist entweder falsch geschrieben oder konnte nicht gefunden werden. npm ERR! code ELIFECYCLEnpm ERR! errno 1 npm ERR! iobroker.amazon-dash@0.2.9 preinstall: `apt-get install libpcap-dev -y || true`npm ERR! Exit status 1npm ERR! npm ERR! Failed at the iobroker.amazon-dash@0.2.9 preinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. host.ARBEITSZIMMER install adapter amazon-dash NPM version: 6.1.0 npm install iobroker.amazon-dash --production --save --prefix "C:/dev/iobroker" (System call) Der Befehl "apt-get" ist entweder falsch geschrieben oder konnte nicht gefunden werden. Der Befehl "true" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
-
Tschuldigung wenn ich Deinen Thread etwas kapere. Ich wollte Dir helfen, komme aber nicht mal über die Installatiion des Dash-Buttons hinaus.
Plattform: raspi
User: pi
Der ioBroker läuft als Dienst über init.d und wird als root gestart.
chmod 777 auf den Ordner /opt/iobroker
Zuerst fehlte git beim Adapter-installieren. Schnell mit
sudo apt-get install git
git nachinstalliert.
Jetzt erhalte ich den folgenden Fehler:
$ ./iobroker add amazon-dash npm install iobroker.amazon-dash --production --prefix "/opt/iobroker" (System call) npm ERR! code 128 npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursivenpm ERR! fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-debca703': Keine Berechtigung npm ERR! npm ERR! A complete log of this run can be found in:npm ERR! /root/.npm/_logs/2018-07-26T18_03_11_213Z-debug.log host.iobrokerpi install adapter amazon-dash npm install iobroker.amazon-dash --production --prefix "/opt/iobroker" (System call) npm ERR! code 128 npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursive npm ERR! fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-2b7aaa4f': Keine Berechtigung npm ERR! npm ERR! A complete log of this run can be found in:npm ERR! /root/.npm/_logs/2018-07-26T18_03_32_064Z-debug.log host.iobrokerpi install adapter amazon-dash npm install iobroker.amazon-dash --production --prefix "/opt/iobroker" (System call) npm ERR! code 128 npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursive npm ERR! fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-3b90f06e': Keine Berechtigung npm ERR! npm ERR! A complete log of this run can be found in:npm ERR! /root/.npm/_logs/2018-07-26T18_03_52_890Z-debug.log host.iobrokerpi install adapter amazon-dash ERROR: host.iobrokerpi Cannot install amazon-dash ERROR: process exited with code 13
Was nun?
-
So, bin jetzt von npm 6.2.0 auf npm 4.6.1 gewechselt. Jetzt gibt es einen vernünftigen Fehler.
$ ./iobroker add amazon-dash npm install iobroker.amazon-dash --production --prefix "/opt/iobroker" (System call) npm WARN lifecycle iobroker.amazon-dash@0.2.9~preinstall: cannot run in wd %s %s (wd=%s) iobroker.amazon-dash@0.2.9 apt-get install libpcap-dev -y || true /opt/iobroker/node_modules/.staging/iobroker.amazon-dash-eb5038e9 gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.11.3" gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/iobroker/node_modules/socketwatcher/.node-gyp"
Satire: Klaaar, root hat keinen Zugriff auf /root/
Wird der apt-get -Befehl etwa nicht im Kontext von root ausgeführt?
-
So, nächster Akt.
Nachdem alles so schön klar in der Fehlermeldung ausgführt war, quickfix mit
sudo apt-get install libpcap-dev
auf der Kommandozeile aufgerufen. Dannach wieder das Setup im Admin gestartet. Am Anfang ähnliche Fehler –-> nee, <u>WARNUNGEN</u>:
$ ./iobroker add amazon-dash npm install iobroker.amazon-dash --production --prefix "/opt/iobroker" (System call) npm WARN lifecycle iobroker.amazon-dash@0.2.9~preinstall: cannot run in wd %s %s (wd=%s) iobroker.amazon-dash@0.2.9 apt-get install libpcap-dev -y || true /opt/iobroker/node_modules/.staging/iobroker.amazon-dash-eb5038e9 gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.11.3" gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/iobroker/node_modules/socketwatcher/.node-gyp" ../socket_watcher.cpp: In static member function ‘static void SocketWatcher::Callback(uv_poll_t*, int, int)’:../socket_watcher.cpp:77:60: warning: ‘v8::Local <v8::value>Nan::MakeCallback(v8::Local<v8::object>, v8::Local<v8::function>, int, v8::Local<v8::value>*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(watcher->handle(), callback, argc, argv); ^ In file included from ../socket_watcher.hpp:8:0, from ../socket_watcher.cpp:5: ../../nan/nan.h:929:46: note: declared here NAN_DEPRECATED inline v8::Local <v8::value>MakeCallback( ^~~~~~~~~~~~ gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.11.3"gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/iobroker/node_modules/pcap/.node-gyp" ../pcap_session.cc: In static member function ‘static void PcapSession::PacketReady(u_char*, const pcap_pkthdr*, const u_char*)’:../pcap_session.cc:85:102: warning: ‘v8::Local <v8::value>Nan::MakeCallback(v8::Local<v8::object>, v8::Local<v8::function>, int, v8::Local<v8::value>*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(session->packet_ready_cb), 0, NULL); ^ In file included from ../pcap_session.h:4:0, from ../pcap_session.cc:7: ../../nan/nan.h:929:46: note: declared here NAN_DEPRECATED inline v8::Local <v8::value>MakeCallback( ^~~~~~~~~~~~ host.iobrokerpi install adapter amazon-dash npm install --production (System call) in "/opt/iobroker/node_modules/iobroker.amazon-dash" npm WARN lifecycle iobroker.amazon-dash@0.2.9~preinstall: cannot run in wd %s %s (wd=%s) iobroker.amazon-dash@0.2.9 apt-get install libpcap-dev -y || true /opt/iobroker/node_modules/iobroker.amazon-dash gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.11.3" gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/iobroker/node_modules/iobroker.amazon-dash/node_modules/socketwatcher/.node-gyp" ../socket_watcher.cpp: In static member function ‘static void SocketWatcher::Callback(uv_poll_t*, int, int)’:../socket_watcher.cpp:77:60: warning: ‘v8::Local <v8::value>Nan::MakeCallback(v8::Local<v8::object>, v8::Local<v8::function>, int, v8::Local<v8::value>*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(watcher->handle(), callback, argc, argv); ^ In file included from ../socket_watcher.hpp:8:0, from ../socket_watcher.cpp:5: ../../nan/nan.h:929:46: note: declared here NAN_DEPRECATED inline v8::Local <v8::value>MakeCallback( ^~~~~~~~~~~~ gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.11.3" gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/iobroker/node_modules/iobroker.amazon-dash/node_modules/pcap/.node-gyp" ../pcap_session.cc: In static member function ‘static void PcapSession::PacketReady(u_char*, const pcap_pkthdr*, const u_char*)’:../pcap_session.cc:85:102: warning: ‘v8::Local <v8::value>Nan::MakeCallback(v8::Local<v8::object>, v8::Local<v8::function>, int, v8::Local<v8::value>*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(session->packet_ready_cb), 0, NULL); ^ In file included from ../pcap_session.h:4:0, from ../pcap_session.cc:7: ../../nan/nan.h:929:46: note: declared here NAN_DEPRECATED inline v8::Local <v8::value>MakeCallback( ^~~~~~~~~~~~ got /opt/iobroker/node_modules/iobroker.amazon-dash/admin upload [2] amazon-dash.admin /opt/iobroker/node_modules/iobroker.amazon-dash/admin/words.js words.js application/javascript upload [1] amazon-dash.admin /opt/iobroker/node_modules/iobroker.amazon-dash/admin/index.html index.html text/html upload [0] amazon-dash.admin /opt/iobroker/node_modules/iobroker.amazon-dash/admin/amazon-dash.png amazon-dash.png image/png host.iobrokerpi object system.adapter.amazon-dash created host.iobrokerpi create instance amazon-dash host.iobrokerpi object system.adapter.amazon-dash.0.outputCount created host.iobrokerpi object system.adapter.amazon-dash.0.inputCount created host.iobrokerpi object system.adapter.amazon-dash.0.uptime created host.iobrokerpi object system.adapter.amazon-dash.0.memRss created host.iobrokerpi object system.adapter.amazon-dash.0.memHeapTotal created host.iobrokerpi object system.adapter.amazon-dash.0.memHeapUsed created host.iobrokerpi object system.adapter.amazon-dash.0.connected created host.iobrokerpi object system.adapter.amazon-dash.0.alive created host.iobrokerpi object system.adapter.amazon-dash.0 created process exited with code 0</v8::value></v8::value></v8::function></v8::object></v8::value></v8::value></v8::value></v8::function></v8::object></v8::value></v8::value></v8::value></v8::function></v8::object></v8::value></v8::value></v8::value></v8::function></v8::object></v8::value>
Warnung ist gut, da KEIN Fehler.
Naja, jetzt hat er die Instanz angelegt. Muss das alles so sein?
-
Was mich zum Fazit bringt:
<size size="200">Anleitung vorher lesen!</size>
` > <size size="150">Steps</size>
1. Install libpcap-dev
apt-get install libpcap-dev
2. Pair your Dash-Adapter within the Amazon App but don't select a product!
Just quit the installation procedure at the product selection tab.
Otherwise you'll order every time a product German instructions.
3. Hit the dash button (should be white first, then flashing red) `
-
Was mich wieder zurück zum ersten Posting bringt:
Bei mir sieht der Start des Adapters so aus:
2018-07-26 20:26:44.581 - info: host.iobrokerpi instance system.adapter.amazon-dash.0 started with pid 15283 2018-07-26 20:26:45.902 - info: amazon-dash.0 starting. Version 0.2.9 in /opt/iobroker/node_modules/iobroker.amazon-dash, node: v8.11.3 2018-07-26 20:26:45.917 - info: amazon-dash.0 starting pcap session on default interface
Wenn ich keine MAC-Adressen hinterlegt habe, war es das auch schon.
-
Als Erkenntnis würde ich sagen, dass Du ein Versionsproblem hast.
Begründung: uncaught exception: Module version mismatch. Expected 48, got 57.
Und zwar bei der Datei: –> var binding = require("./build/Release/pcap_binding");
Wie hast Du installiert? Hast Du es auch so wie ich gemacht? (oder die Anleitung befolgt )
-
Also…. du kaperst nicht meinen Beitrag - Danke für deine Unterstützung.
Ich verwende auch den Raspi 3 - also kein Windows....
Installiert hätte ich es nach anleitung....
Adatper installiert
sudo apt-get install libpcap-dev (ohne sudo hatte ich immer eine Fehlermeldung bekommen)
Dann wollte ich den Dash Button Pairen - nach Amazon anleitung.
Der Adapter ist aber immer bei mir rot - eben mit obiger Fehlermeldung. Mein Problem ist, dass ich nicht weiß, welche Version von welchem Programm ihm nicht schmeckt....
-
Juhuuuu Adapter ist Grün - danke für den Denkanstoß!
in der Datei /opt/iobroker/node_modules/pcap/pcap.js konnte ich nun sehen was ihm nicht gefällt.
1. Problem:
var binding = require("./build/Release/pcap_binding");
==> npm install pcap
2. Problem
var SocketWatcher = require("socketwatcher").SocketWatcher;
==> npm install socketwatcher
Und schon ist der Adapter grün!
-
Super! Fügst Du Bitte noch ein [Gelöst] im Titel des ersten Beitrags hinzu? Danke!
Jetzt muss ich nur noch meine Dash-Buttons finden…