Hi,
seit vielen Monaten nutze ich nun ziemlich happy FHEM Connector um FHEM über Alexa zu steuern. Seit ein paar Tagen scheinen alle Geräte nicht mehr erreichbar, "sudo service alexa restart" und auch komplettes reboot haben dem RPi nicht geholfen.
Jetzt wollte ich "alexa-fhem" komplett nach wiki (https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa (https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa)) neu installieren, dann das:
sudo npm install -g alexa-fhem
(node:2527) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 4.19.66-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "alexa-fhem"
npm ERR! cwd /opt/fhem/log
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm WARN optional dep failed, continuing ws@6.2.1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/fhem/log/npm-debug.log
npm ERR! not ok code 0
HILFE! ;) 8) :-\
Welche nodejs/npm Versionen hast du?
Welches OS und Version?
Ich vermute (wenn ich das richtig deute): zu "klein"...
Und ich hoffe du hast im Wiki GANZ UNTEN gelesen, wo beschrieben steht, wie man von einer "alten Installation" auf den Connector umsteigt!!?
Also ALLES ALTE ZEUGS LÖSCHEN!!!
Gruß, Joachim
Hi,
danke für deine Antwort! Siehe Log-Schnipsel:
- RPi3
- Linux 4.19.66-v7+
- node -v v8.11.1
- npm -v 1.4.21
Ich hatte ja alles mit diesen Versionen am Laufen, wollte es nur nochmals neu installieren, nachdem es nun nicht mehr funktionierte.
Ok, das erste Problem lag scheinbar bei "npm" selbst. Nach:
sudo npm cache clean -f
sudo npm update npm -g
sudo npm install -g n
sudo n stable
funktionierte die Installation mit "sudo npm install -g alexa-fhem" wieder.
npm -v 6.14.4
node -v 12.17.0
Tja, war wohl nodejs und npm zu "alt"...
...wie vermutet...
Und mit OS meinte ich welche Distribution (verm. Raspbian, hoffentl. Lite also OHNE Desktop) und welche Release: Wheezy, Jessie (beides hoffentl. nicht mehr), Stretch oder Buster... ;)
Wenn's nun geht, dann bitte noch ein [gelöst] vor den ersten Post packen, danke.
Dann viel Spaß, Joachim
Der Vollständigkeit halber:
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Jetzt hat's funktioniert! Musste "device alexa alexa" nochmal anlegen, FHEM Connector neu aktivieren, alle Geräte verwerfen und neu erkennen, aber jetzt schalten sie wieder.
Danke nochmal!
Darf ich mich da mal mit dem gleichen Problem anschließen?
Ich bekomme 'alexa-fhem' nicht installiert.
sudo npm install -g alexa-fhem
(node:8693) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! error rolling back Error: ENOTEMPTY: directory not empty, rmdir '/usr/local/lib/node_modules/alexa-fhem/node_modules/ws/node_modules/async-limiter'
npm ERR! error rolling back alexa-fhem@0.5.55 { Error: ENOTEMPTY: directory not empty, rmdir '/usr/local/lib/node_modules/alexa-fhem/node_modules/ws/node_modules/async-limiter'
npm ERR! error rolling back errno: -39,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back syscall: 'rmdir',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/alexa-fhem/node_modules/ws/node_modules/async-limiter' }
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 4.19.66+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "alexa-fhem"
npm ERR! cwd /home/pi
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm WARN optional dep failed, continuing ws@6.2.1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/npm-debug.log
npm ERR! not ok code 0
Raspbian stretch auf Raspberry Pi 1B
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Die von crazystone geposteten Befehle habe ich ebenfalls ausgeführt:
sudo npm cache clean -f
sudo npm update npm -g
sudo npm install -g n
sudo n stable
npm -v (der Aufruf dauert 18 Sekunden)
1.4.21
(node:8859) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
node -v
v10.22.0
Das ganze npm-debug.log habe ich mal angehängt.
Hi,
Deine npm Version ist zu alt! Meines Wissens erfolgt ein update von npm mit:
sudo npm install npm -g
Wenn da snicht funktioniert, würde ich versuchen erstmal npm wieder los zu werden und neu zu beginnen. Das scheint was schief gelaufen.
https://docs.npmjs.com/misc/removing-npm.html
Gruß Otto
Zitat von: Otto123 am 13 September 2020, 11:16:53
Hi,
Deine npm Version ist zu alt! Meines Wissens erfolgt ein update von npm mit:
sudo npm install npm -g
Hmmm, da hast Du wohl recht ::)
Ich dachte, das hätte ich gemacht, aber mit Deinem Aufruf habe ich nun
npm -v
6.14.8
Und jetzt sieht das so aus:
sudo npm install -g alexa-fhem
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/local/bin/alexa-fhem -> /usr/local/lib/node_modules/alexa-fhem/bin/alexa
+ alexa-fhem@0.5.55
added 59 packages from 68 contributors, removed 1 package, updated 2 packages and moved 2 packages in 145.902s
Im Reading steht zwar: "alexaFHEM stopped; failed to connect to fhem: 401: Authorization Required"
Da gucke ich aber jetzt erst ins Wiki ;)
Bis hier aber schonmal Danke :)
Zitat von: ChristianKnorr am 13 September 2020, 16:16:07
Im Reading steht zwar: "alexaFHEM stopped; failed to connect to fhem: 401: Authorization Required"
Da gucke ich aber jetzt erst ins Wiki ;)
Hast du fhem abgesichert!?
Nutzt du ssl/https!?
Dann entsprechend beim Alexa-Device "einstellen"!
(Attribute/set-Befehle)
EDIT: https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa#401:_Authorization_Required ;)
Gruß, Joachim
Ja, genau das war's: Benutzername/Passwort.
Hat nun alles funktioniert. Ich hatte es nur nicht weiter erwähnt, da es gut im Wiki beschrieben war :)