Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration

Begonnen von gvzdus, 23 Dezember 2018, 15:30:36

Vorheriges Thema - Nächstes Thema

charlie0815

#285
Hallo Leute,
ich bin nicht so die Leuchte in Sachen Linux, habe mich aber schon etwas eingefuchst. Was aber garnicht klappt ist ide Einbindung von Alexa-fhem. Was mache ich nur falsch?? Ich bin da am verzweifeln
Hier mal das Ergebnis, wenn ich die Installation laut wiki versuche

root@raspberrypi:/# sudo npm install -g alexa-fhem
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/alexa-fhem
npm ERR! path /usr/local/lib/node_modules/alexa-fhem
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/usr/local/lib/node_modules/alexa-fhem'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-16T06_26_03_222Z-debug.log

Könnt ihr damit was anfangen??
Grüße
Edit: Meine fhem-Installation ist noch komplett offen, also ohne Passwort oder token abgesichert. Irgendwie vermisst er ja zunächst die Schreibrechte an /usr/local/lib/node_modules/alexa-fhem. Aber da ich mit sudo rangegangen bin, sollte er doch dort schreiben können. Mit welchen Befehl könnte ich denn die Schreibrechte dort zurecht biegen??

Loredo

Irgendwas stimmt wohl mit deiner Node.js Installation nicht. Entweder zu alt oder einfach kaputt.
Solltest du entfernen und neu installieren so wie im Wiki beschrieben. IMHO sollten die Dateien dann auch eher unter /usr/lib/node_modules landen, nicht unter /usr/local/lib.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

MadMax-FHEM

#287
Zitat
root@raspberrypi:/# sudo npm install -g alexa-fhem

Als root sollte man (fast) NIE auf einem System eingelogt sein...

Wenn man wirklich "root" Rechte braucht kann man sich mittels "sudo" oder "su" kurzzeitig "umloggen"!

Und: als root sudo macht praktisch gar keinen Sinn / ist unnötig weil man ist ja schon "super user"... ;)

Als "root" auf einem System arbeiten ist sehr gefährlich: der User darf alles und das System macht es einfach (ohne nachzufragen). So ist ein System sehr einfach zu zerstören...

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

Esjay

Könntet ihr die Diskussion in einen neuen Theard auslagern?

Das wird sonst wieder ein     
alexa-fhem: amazon alexa smart home skill für fhem 2.0 Theard!

Grüße

gvzdus

Der Vollständigkeit halber auch in diesem Thread ein Verweis auf die Löschung von einigen Accounts aufgrund einer Datenschutzproblematik (Requests zum falschen Nutzer geroutet).

https://forum.fhem.de/index.php/topic,95272.msg889163.html#msg889163

charlie0815

Danke danke danke für den Schubser in die richtige Richtung MadMax. Der Rootzugriff war der falsche Ansatz. Als normaler user pi mit "sudo npm install -g alexa-fhem" hats jetzt geklappt. Sorry für das Zumüllen. Wir können auch meinen obrigen Beitrag löschen, da sich bestimmt nicht so viele so dämlich anstellen werden
Grüße vom glückliche charlie

Loredo

Unter


https://hub.docker.com/r/fhem/alexa-fhem


steht jetzt auch ein fertiges Docker Image für alexa-fhem zur Verfügung. Das ist für den Fall, dass man alexa-fhem wie zuvor separat betreiben/starten/stoppen möchte ohne dass FHEM das steuert.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

sash.sc

Hallo zusammen.

Habe es jetzt mal endlich nach ein paar anderen Baustellen mal die Zeit gefunden, und alexa-fhem über npm geuppdatet auf 0.5.11

Bekomme immer noch folgend Meldungen im Alexa log. Das jüngste Ereignis steht an 1. Stelle !  ;)


[2019-1-18 22:26:38] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20stopped,%20Terminated%20with%20255,%20ssh%20will%20restart%20at%2022:27:59;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:26:38] Reading alexaFHEM.ProxyConnection set to stopped, Terminated with 255, ssh will restart at 22:27:59
[2019-1-18 22:26:38] SSH: exited with 255 - will restart in 81.64463604251974 seconds
[2019-1-18 22:26:38] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20running,%20stderr=Permission%20denied%20(keyboard-interactive,publickey).%0D%0A;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1

[2019-1-18 22:26:38] Reading alexaFHEM.ProxyConnection set to running, stderr=Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:26:38] SSH: Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:26:37] SSH: Pseudo-terminal will not be allocated because stdin is not a terminal.
[2019-1-18 22:26:37] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20starting,%20starting%20SSH;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:26:37] Reading alexaFHEM.ProxyConnection set to starting, starting SSH


Hier auch nochmal ein List vom Alexa Device




Internals:
   FD         60
   LAST_START 2019-01-18 22:35:33
   NAME       alexa
   NOTIFYDEV  global
   NR         443
   NTFY_ORDER 50-alexa
   PID        19827
   STARTS     1
   STATE      running /usr/bin/alexa-fhem
   TYPE       alexa
   active     0
   alexa-fhem version 0.5.11
   currentlogfile ./log/alexa-2019-01-18.log
   logfile    ./log/alexa-%Y-%m-%d.log
   READINGS:
     2019-01-18 22:35:33   alexaFHEM       running /usr/bin/alexa-fhem
     2019-01-18 22:36:32   alexaFHEM.ProxyConnection running; SSH connected
     2019-01-18 22:36:30   alexaFHEM.bearerToken crypt:5xxxxxxxx
     2019-01-18 22:36:30   alexaFHEM.skillRegKey crypt:51xxxxx
Attributes:
   alexaFHEM-auth crypt:165xxxxx
   alexaFHEM-config ./alexa-fhem.cfg
   alexaFHEM-log ./log/alexa-%Y-%m-%d.log
   alexaMapping #Characteristic=<name>=<value>,...
On=verb=schalte,valueOn=an;ein,valueOff=aus,valueToggle=um

Brightness=verb=stelle,property=helligkeit,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

Hue=verb=stelle,valuePrefix=auf,values=rot:0;grün:128;blau:200
Hue=verb=färbe,values=rot:0;grün:120;blau:220

Saturation=verb=stelle,property=sättigung,valuePrefix=auf,values=AMAZON.NUMBER
Saturation=verb=sättige,values=AMAZON.NUMBER

Demnach läuft dass Modul mit der ssh Verbindung.

Wenn ich im FHEM Connector unter Android den Key eingebe, kommt nur die Meldung das der Key gut ist, aber

Status SSH: NOT online - no SSH Session established

Jemand da eine Idee !?!?

Danke
Raspi 4B+ Bullseye ;LaCrosse; HomeMatic; MapleCUL; ZigBee; Signalduino ESP32 ; Shellys; MQTT2; Grafana mit Influxdb

gvzdus

Moin, würde ja gerne gucken, wie man wirklich jedes Problem automatisch lösen kann.
Dein Alexa-Device ist sicherlich fein, und wenn SSH nicht hochkommt, aber alexa-fhem, ist das Alexa-Device eigentlich raus.

Deine Protokolle sind leider nicht wirklich hilfreich. Das Sortieren nach Zeit ist einfach falsch, weil es (immer noch) Zeilen gibt, die kein zeitliches Präfix haben. Und spannend ist vor allem, was zwischen den Zeilen
*** SSH: checking proxy configuration
und
*** SSH: proxy configuration set up done
steht. Bitte nicht sortiert, sondern einfach genau der Ausschnitt aus dem Logfile.

sash.sc

Guten morgen.

Diese Einträge sind einfach Stumpf aus dem alexa log kopiert. Nur das ich global das Attribut gesetzt habe, das die umgekehrt angezeigt werden.
Also nicht das letzte ganz unten, sondern ganz oben.

Habe jetzt mal die normal Sortierung drin.


[2019-1-19 03:48:51] Reading alexaFHEM.ProxyConnection set to running;; stderr=Timeout, server fhem-va.fhem.de not responding. 
[2019-1-19 03:48:51] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20stderr%3DTimeout%2C%20server%20fhem-va.fhem.de%20not%20responding.%20%20%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 03:48:51] *** SSH: stderr: Timeout, server fhem-va.fhem.de not responding. 
[2019-1-19 03:48:51] SSH: exited with 255 - will restart in 111.62871208701159 seconds
[2019-1-19 03:48:51] Reading alexaFHEM.ProxyConnection set to stopped;; Terminated with Timeout, server fhem-va.fhem.de not responding.  , ssh will restart at 03:50:43
[2019-1-19 03:48:51] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20stopped%3B%3B%20Terminated%20with%20Timeout%2C%20server%20fhem-va.fhem.de%20not%20responding.%20%20%2C%20ssh%20will%20restart%20at%2003%3A50%3A43%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 03:50:43] Reading alexaFHEM.ProxyConnection set to starting;; starting SSH
[2019-1-19 03:50:43] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20starting%3B%3B%20starting%20SSH%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 03:50:43] Reading alexaFHEM.ProxyConnection set to running;; stderr=Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory.
[2019-1-19 03:50:43] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20stderr%3DWarning%3A%20Identity%20file%20~%2F.ssh%2Fid_rsa%20not%20accessible%3A%20No%20such%20file%20or%20directory.%20%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 03:50:43] *** SSH: stderr: Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory.
[2019-1-19 03:50:44] Reading alexaFHEM.ProxyConnection set to running;; SSH connected
[2019-1-19 03:50:44] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20SSH%20connected%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 03:50:44] *** SSH: proxy connection established
[2019-1-19 03:50:44] SSH: Welcome at the reverse proxy!  This pseudoshell does not react to any input - do not get irritated. 


Und so das Bild vom FHEM Connector.

Die Version von nodejs ist 8.15.0

Und hier nochmal die letzten Auszüge aus dem Log von gestern Abend.


[2019-1-18 22:30:16] Reading alexaFHEM.ProxyConnection set to starting, starting SSH
[2019-1-18 22:30:16] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20starting,%20starting%20SSH;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:30:16] SSH: Pseudo-terminal will not be allocated because stdin is not a terminal.

[2019-1-18 22:30:16] SSH: Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:30:16] Reading alexaFHEM.ProxyConnection set to running, stderr=Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:30:16] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20running,%20stderr=Permission%20denied%20(keyboard-interactive,publickey).%0D%0A;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:30:16] SSH: exited with 255 - will restart in 91.05685736523724 seconds
[2019-1-18 22:30:16] Reading alexaFHEM.ProxyConnection set to stopped, Terminated with 255, ssh will restart at 22:31:47
[2019-1-18 22:30:16] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20stopped,%20Terminated%20with%20255,%20ssh%20will%20restart%20at%2022:31:47;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:31:47] Reading alexaFHEM.ProxyConnection set to starting, starting SSH
[2019-1-18 22:31:47] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20starting,%20starting%20SSH;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:31:47] SSH: Pseudo-terminal will not be allocated because stdin is not a terminal.

[2019-1-18 22:31:48] SSH: Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:31:48] Reading alexaFHEM.ProxyConnection set to running, stderr=Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:31:48] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20running,%20stderr=Permission%20denied%20(keyboard-interactive,publickey).%0D%0A;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:31:48] SSH: exited with 255 - will restart in 65.56113319457297 seconds
[2019-1-18 22:31:48] Reading alexaFHEM.ProxyConnection set to stopped, Terminated with 255, ssh will restart at 22:32:53
[2019-1-18 22:31:48] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20stopped,%20Terminated%20with%20255,%20ssh%20will%20restart%20at%2022:32:53;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:32:53] Reading alexaFHEM.ProxyConnection set to starting, starting SSH
[2019-1-18 22:32:53] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20starting,%20starting%20SSH;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:32:53] SSH: Pseudo-terminal will not be allocated because stdin is not a terminal.

[2019-1-18 22:32:54] SSH: Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:32:54] Reading alexaFHEM.ProxyConnection set to running, stderr=Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:32:54] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20running,%20stderr=Permission%20denied%20(keyboard-interactive,publickey).%0D%0A;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:32:54] SSH: exited with 255 - will restart in 51.888092616402396 seconds
[2019-1-18 22:32:54] Reading alexaFHEM.ProxyConnection set to stopped, Terminated with 255, ssh will restart at 22:33:46
[2019-1-18 22:32:54] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20stopped,%20Terminated%20with%20255,%20ssh%20will%20restart%20at%2022:33:46;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:33:46] Reading alexaFHEM.ProxyConnection set to starting, starting SSH
[2019-1-18 22:33:46] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20starting,%20starting%20SSH;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:33:46] SSH: Pseudo-terminal will not be allocated because stdin is not a terminal.

[2019-1-18 22:33:46] SSH: Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:33:46] Reading alexaFHEM.ProxyConnection set to running, stderr=Permission denied (keyboard-interactive,publickey).

[2019-1-18 22:33:46] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20running,%20stderr=Permission%20denied%20(keyboard-interactive,publickey).%0D%0A;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:33:46] SSH: exited with 255 - will restart in 103.57560560181304 seconds
[2019-1-18 22:33:46] Reading alexaFHEM.ProxyConnection set to stopped, Terminated with 255, ssh will restart at 22:35:30
[2019-1-18 22:33:46] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20stopped,%20Terminated%20with%20255,%20ssh%20will%20restart%20at%2022:35:30;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:34:44] Got SIGTERM, shutting down alexa-fhem...
[2019-1-18 22:34:44] Reading alexaFHEM.ProxyConnection set to stopping, alexa-fhem terminating
[2019-1-18 22:34:44] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;setreading%20alexa%20alexaFHEM.ProxyConnection%20stopping,%20alexa-fhem%20terminating;%7B$defs%7Balexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&XHR=1
[2019-1-18 22:35:34] using config from ./alexa-fhem.cfg
*** CONFIG: parsed completely
[2019-1-18 22:35:34] this is alexa-fhem 0.5.11
[2019-1-18 22:35:34] connecting to FHEM ...
[2019-1-18 22:35:36] [FHEM] trying longpoll to listen for fhem events
[2019-1-18 22:35:36] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1547847336448
[2019-1-18 22:35:55] [FHEM] got csrfToken:
[2019-1-18 22:35:55] [FHEM] Checking devices and attributes...
[2019-1-18 22:35:55] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&XHR=1
[2019-1-18 22:35:55] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dalexa&XHR=1
[2019-1-18 22:35:55] [FHEM] waiting for events ...
[2019-1-18 22:35:55] [FHEM] Fetching FHEM devices...
[2019-1-18 22:35:55] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20alexaName=..*&XHR=1
[2019-1-18 22:35:58] [FHEM] alexa device is alexa
[2019-1-18 22:35:58] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22alexa-fhem%20version%22%7D%20%3D%20%220.5.11%22%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-18 22:35:58] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bget%20alexa%20proxyToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-18 22:35:58] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Blist%20alexa%20.eventToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-18 22:35:58] Server listening on: http://127.0.0.1:43549 for proxy connections
[2019-1-18 22:35:58] *** SSH: checking proxy configuration
[2019-1-18 22:35:58] os.homedir()=/root
[2019-1-18 22:35:58] os.homedir() set to /root, but this is not writable
[2019-1-18 22:35:58] process.env.HOME=/root
[2019-1-18 22:35:58] process.env.HOME set to /root, but this is not writable
[2019-1-18 22:35:58] process.env.HOMEPATH=undefined
[2019-1-18 22:35:58] process.env.USERPROFILE=undefined
[2019-1-18 22:35:58] process.env.PWD=/opt/fhem
[2019-1-18 22:35:58] Passed config: {"sshproxy":{"ssh":"/usr/bin/ssh","description":"FHEM Connector","bind-ip":"127.0.0.1","port":43549},"connections":[{"uid":999,"filter":"alexaName=..*","name":"FHEM","port":"8083","webname":"fhem","server":"127.0.0.1"}]}
[2019-1-18 22:35:58] sshautoconf: No SSH public key found, we have to generate one.
[2019-1-18 22:36:15] sshautoconf: Generating public/private rsa key pair.
Your identification has been saved in /opt/fhem/.ssh/id_rsa.
Your public key has been saved in /opt/fhem/.ssh/id_rsa.pub.
The key fingerprint is:
00:50:e1:4e:1f:51:d8:16:df:ad:35:7b:ff:2d:9f:c9 fhem@raspi
The key's randomart image is:
+---[RSA 2048]----+
|  .o+..+o.       |
|   . ...o. . .   |
|    o o.  . . +  |
|   o . o     o o |
|    . . S   . . .|
|               ..|
|                .|
|              o =|
|               E+|
+-----------------+

[2019-1-18 22:36:15] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bjsonlist2%20alexa%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
*** FHEM: connected
[2019-1-18 22:36:15] [FHEM] got: 0 results
[2019-1-18 22:36:16] BearerToken '...21967' read from alexa
[2019-1-18 22:36:16] 39_alexa.pm is new version: true
[2019-1-18 22:36:17] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bset%20alexa%20proxyToken%206EF7E721E643B470%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-18 22:36:30] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bset%20alexa%20proxyKey%204B3345FC-4B74DCC34503010C-6EF7E721E643B470%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-18 22:36:31] sshautoconf: completed successfully
[2019-1-18 22:36:31] *** SSH: proxy configuration set up done
[2019-1-18 22:36:31] Reading alexaFHEM.ProxyConnection set to starting;; starting SSH
[2019-1-18 22:36:31] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20starting%3B%3B%20starting%20SSH%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-18 22:36:31] SSH setup completed with new bearer token
[2019-1-18 22:36:32] Reading alexaFHEM.ProxyConnection set to running;; SSH connected
[2019-1-18 22:36:32] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20SSH%20connected%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-18 22:36:32] *** SSH: proxy connection established
[2019-1-18 22:36:32] SSH: Welcome at the reverse proxy!  This pseudoshell does not react to any input - do not get irritated. 
[2019-1-18 22:36:33] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3B%7B%20FW_directNotify(%22%23FHEMWEB%3AWEB%22%2C%20%22location.reload('true')%22%2C%20%22%22)%20%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1


Habe dann per ssh auf dem pi folgendes ausgeführt


/usr/bin/alexa-fhem -c ~/alexa-fhem.cfg -A



da kam dann folgendes bei raus, über die Konsole


Trying fhem
[2019-1-19 08:06:12] [test]   executing: http://127.0.0.1:8083/fhem?cmd=help&XHR=1
FHEM-Connectivity fine
existing config.json seems fine
SSH key seems to exist
Our SSH key is known at the reverse proxy, good!
[2019-1-19 08:06:18] [test]   executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dalexa&XHR=1
[2019-1-19 08:06:19] 39_alexa.pm is new version: true
We are done - start the server from commandline?
(Better way would be to continue via FHEM-WEB, unless you are debugging) [y/N] N
We are done - start the server from commandline?
(Better way would be to continue via FHEM-WEB, unless you are debugging) [y/N] y
[2019-1-19 08:06:48] sshautoconf: completed successfully
[2019-1-19 08:06:48] using config from /home/pi/alexa-fhem.cfg
*** CONFIG: parsed completely
[2019-1-19 08:06:48] this is alexa-fhem 0.5.11
[2019-1-19 08:06:48] connecting to FHEM ...
[2019-1-19 08:06:48] [FHEM] trying longpoll to listen for fhem events
[2019-1-19 08:06:48] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1547881608300
[2019-1-19 08:06:48] [FHEM] got csrfToken:
[2019-1-19 08:06:48] [FHEM] Checking devices and attributes...
[2019-1-19 08:06:48] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&XHR=1
[2019-1-19 08:06:48] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dalexa&XHR=1
[2019-1-19 08:06:48] [FHEM] waiting for events ...
[2019-1-19 08:06:48] [FHEM] Fetching FHEM devices...
[2019-1-19 08:06:48] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20alexaName=...*&XHR=1
[2019-1-19 08:06:48] [FHEM] alexa device is alexa
[2019-1-19 08:06:48] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22alexa-fhem%20version%22%7D%20%3D%20%220.5.11%22%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 08:06:48] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bget%20alexa%20proxyToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 08:06:48] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Blist%20alexa%20.eventToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 08:06:48] Server listening on: http://127.0.0.1:40845 for proxy connections
[2019-1-19 08:06:48] *** SSH: checking proxy configuration
[2019-1-19 08:06:48] Passed config: {"sshproxy":{"name":"sshproxy","bind-ip":"127.0.0.1","ssl":false,"ssh":"/usr/bin/ssh","port":40845},"connections":[{"server":"127.0.0.1","port":8083,"name":"FHEM","filter":"alexaName=...*","ssl":false,"base_url":"http://127.0.0.1:8083/fhem","auth":{"user":"sash","pass":"xs329111","sendImmediately":false}}]}
[2019-1-19 08:06:48] sshautoconf: SSH key seems to exist
[2019-1-19 08:06:49] sshautoconf: Our SSH key is known at the reverse proxy, good!
[2019-1-19 08:06:49] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bjsonlist2%20alexa%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
*** FHEM: connected
[2019-1-19 08:06:49] [FHEM] got: 0 results
[2019-1-19 08:06:49] 39_alexa.pm is new version: true
[2019-1-19 08:06:49] sshautoconf: completed successfully
[2019-1-19 08:06:49] *** SSH: proxy configuration set up done
[2019-1-19 08:06:49] Reading alexaFHEM.ProxyConnection set to starting;; starting SSH
[2019-1-19 08:06:49] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20starting%3B%3B%20starting%20SSH%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 08:06:49] BearerToken '...3B470' read from alexa
[2019-1-19 08:06:49] Reading alexaFHEM.ProxyConnection set to running;; stderr=Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory.
[2019-1-19 08:06:49] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20stderr%3DWarning%3A%20Identity%20file%20~%2F.ssh%2Fid_rsa%20not%20accessible%3A%20No%20such%20file%20or%20directory.%20%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 08:06:49] *** SSH: stderr: Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory.
[2019-1-19 08:06:50] Reading alexaFHEM.ProxyConnection set to running;; SSH connected
[2019-1-19 08:06:50] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20SSH%20connected%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 08:06:50] *** SSH: proxy connection established
[2019-1-19 08:06:50] SSH: Welcome at the reverse proxy!  This pseudoshell does not react to any input - do not get irritated.



Habe dann über den Connector den Key eingegeben, und das 2x.
Dann kam folgendes über die Konsole


[2019-1-19 08:07:53] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa.Discovery","name":"Discover","payloadVersion":"3","messageId":"0815"},"payload":{"scope":                    {"type":"BearerToken","token":"12F510-C597DC0DB4121967"}}}}
[2019-1-19 08:07:53] client not authorized: {"error_index":"vgcEs1VDMbis4e0fdn7eqQAAAAAAAAABbgjhVODDOZd0lMo6To_mbxuw2Pa1QAsk-AkOIa8NwUDG0Qwrh6i5OcOUT7kVksSr2mPH-2-4BIldGagrwWdtWtzzbc5AOwzk3o6-imN7_oNoQKuO_vZY6NtTS89YWVVb51e4g9Y7t_0OMf5MvxexDtN2JjWn17SGu_qOD_ziAvlvdNg969IdNXURI00jnY6jaKezKXDT1pDGw5b69QGarA==","error_description":"The request has an invalid parameter : access_token","error":"invalid_token"}
[2019-1-19 08:07:53] ERROR: InvalidAccessTokenError from 127.0.0.1
[2019-1-19 08:07:53] <<<< [ssh] {"header":{"namespace":"Alexa.ConnectedHome.Control","name":"InvalidAccessTokenError","payloadVersion":"2","messageId":"276458e8-1f01-4ae9-87d2-336f7d6dbc73"},"payload":{}}
[2019-1-19 08:08:23] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa.Discovery","name":"Discover","payloadVersion":"3","messageId":"0815"},"payload":{"scope":                    {"type":"BearerToken","token":"12F510-C597DC0DB4121967"}}}}
[2019-1-19 08:08:23] client not authorized: {"error_index":"v23Jt5kne6WI4aMw7hyHFgAAAAAAAAABeJjXpWAhRsRgO35ylGTOchGwfynDqi0P96jcXtE-5jJuVnxAW5nZbbfHPX7jXv6mlAgSc7YtCmIPJXXkjZ10u-pvIU96jSDB8zhnmdc1BDvg9tDStHT1QHpwHOV98Y8iQgsD37D65-RnX6J-k6xFKsKxXC0fqouRF58jx68ZBElu-nSd1xtbbiqbC_Ies4D27rk4j33ShB_XIA-I6DN-EQ==","error_description":"The request has an invalid parameter : access_token","error":"invalid_token"}
[2019-1-19 08:08:23] ERROR: InvalidAccessTokenError from 127.0.0.1
[2019-1-19 08:08:23] <<<< [ssh] {"header":{"namespace":"Alexa.ConnectedHome.Control","name":"InvalidAccessTokenError","payloadVersion":"2","messageId":"ac08dee7-a378-470b-b464-f4c86c535134"},"payload":{}}
^C[2019-1-19 08:11:54] Got SIGINT, shutting down alexa-fhem...
[2019-1-19 08:11:54] Reading alexaFHEM.ProxyConnection set to stopping;; alexa-fhem terminating
[2019-1-19 08:11:54] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20stopping%3B%3B%20alexa-fhem%20terminating%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 08:11:54] Stopping SSH ...
[2019-1-19 08:11:54] Reading alexaFHEM.ProxyConnection set to stopped;; Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory.
[2019-1-19 08:11:54] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20stopped%3B%3B%20Warning%3A%20Identity%20file%20~%2F.ssh%2Fid_rsa%20not%20accessible%3A%20No%20such%20file%20or%20directory.%20%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2019-1-19 08:11:54] *** SSH: exited with Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory.



Und auf dem handy dann das 2. Bild


Gruß und Danke
Sascha
Raspi 4B+ Bullseye ;LaCrosse; HomeMatic; MapleCUL; ZigBee; Signalduino ESP32 ; Shellys; MQTT2; Grafana mit Influxdb

Christian72D

Ich habe das gerade aufsetzen wollen, bekomme aber keinen ssh Prozeß angezeigt, der fhem zugeordnet ist:

christian@fhem:~$ ps -ef | egrep '(alexa|ssh)'
root      1206     1  0 Jan16 ?        00:00:00 /usr/sbin/sshd -D
fhem      2264  1879  0 Jan16 ?        00:00:02 /usr/bin/node ./cache/alexa-cook                ie/458create-cookie.js
fhem      9712  9419  1 08:37 ?        00:00:02 node /usr/local/bin/alexa-fhem -                c ./alexa-fhem.cfg -a xx:xx
root      9879  1206  3 08:39 ?        00:00:00 sshd: christian [priv]
christi+  9964  9879  0 08:39 ?        00:00:00 sshd: christian@pts/0
christi+  9976  9965  0 08:39 pts/0    00:00:00 grep -E --color=auto (alexa|ssh)


Was ist mein Fehler?

gvzdus

Die Antwort bezieht sich auf sash.sc

Im Prinzip ist Dein Vorgehen gut, es mal mit "alexa -A" zu versuchen. Das hast Du aber als User pi scheinbar gemacht. Suggeriert zumindest diese Zeile:

[2019-1-19 08:06:48] using config from /home/pi/alexa-fhem.cfg

Ich vermute, fhem läuft bei Dir als User "fhem"? Oder auch als "pi"? Solltest Du mit "ps | grep fhem" klären können.

Die andere Zeile, die zentral ist, auf die ich mir aber noch keinen Reim machen kann:
Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory.

Wenn ich davon ausgehe, dass FHEM unter fhem läuft, und dass das Homedir /opt/fhem ist, dann wäre spannend:

sudo -u fhem ls -ld /opt/fhem/.ssh
sudo -u fhem ls -ld ~/.ssh
sudo -u fhem ls -l /opt/fhem/.ssh
sudo -u fhem ls -l ~/.ssh
sudo -u fhem ls -ld ~/

Deine Situation mit laufendem SSH-Tunnel ist immer, dass Du zwar SSH oben hast, aber mit dem falschen Schlüssel (vermutlich vom User pi), während der hinterlegte Registrieriungskey wohl vom User "fhem" ist.

gvzdus

Ach so, und ein

egrep '(fhem|pi)' /etc/passwd

wäre noch interessant. Ergibt bei mir

pi:x:1000:1000:,,,:/home/pi:/bin/bash
fhem:x:999:20::/opt/fhem:/bin/false

sash.sc

Zitat von: gvzdus am 19 Januar 2019, 08:56:15
Die Antwort bezieht sich auf sash.sc

Im Prinzip ist Dein Vorgehen gut, es mal mit "alexa -A" zu versuchen. Das hast Du aber als User pi scheinbar gemacht. Suggeriert zumindest diese Zeile:

[2019-1-19 08:06:48] using config from /home/pi/alexa-fhem.cfg

Hätte dies unter root passieren sollen ??

Zitat von: gvzdus am 19 Januar 2019, 08:56:15
Die andere Zeile, die zentral ist, auf die ich mir aber noch keinen Reim machen kann:
Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory.

Wenn ich davon ausgehe, dass FHEM unter fhem läuft, und dass das Homedir /opt/fhem ist, dann wäre spannend:

sudo -u fhem ls -ld /opt/fhem/.ssh
sudo -u fhem ls -ld ~/.ssh
sudo -u fhem ls -l /opt/fhem/.ssh
sudo -u fhem ls -l ~/.ssh
sudo -u fhem ls -ld ~/

Deine Situation mit laufendem SSH-Tunnel ist immer, dass Du zwar SSH oben hast, aber mit dem falschen Schlüssel (vermutlich vom User pi), während der hinterlegte Registrieriungskey wohl vom User "fhem" ist.

Hier mal aus der Konsole die Ergebnisse !


pi@raspi:~ $ sudo -u fhem ls -ld /opt/fhem/.ssh
drwx------ 2 fhem dialout 4096 Jan 18 22:36 /opt/fhem/.ssh
pi@raspi:~ $ sudo -u fhem ls -ld ~/.ssh
drwx------ 2 pi pi 4096 Jan 13 21:37 /home/pi/.ssh
pi@raspi:~ $ sudo -u fhem ls -l /opt/fhem/.ssh
insgesamt 12
-rw------- 1 fhem dialout 1679 Jan 18 22:36 id_rsa
-rw-r--r-- 1 fhem dialout  392 Jan 18 22:36 id_rsa.pub
-rw-r--r-- 1 fhem dialout 1768 Jan 13 11:23 known_hosts
pi@raspi:~ $ sudo -u fhem ls -l ~/.ssh
ls: Öffnen von Verzeichnis /home/pi/.ssh nicht möglich: Keine Berechtigung
pi@raspi:~ $ sudo -u fhem ls -ld ~/
drwxr-xr-x 27 pi pi 4096 Jan 13 21:37 /home/pi/
pi@raspi:~ $ egrep '(fhem|pi)' /etc/passwd
fhem:x:999:20::/opt/fhem:/bin/bash
pi:x:1000:1000:,,,:/home/pi:/bin/bash
fhem:x:999:20::/opt/fhem:/bin/false

Raspi 4B+ Bullseye ;LaCrosse; HomeMatic; MapleCUL; ZigBee; Signalduino ESP32 ; Shellys; MQTT2; Grafana mit Influxdb

gvzdus

Oha, da habe ich wohl mit dem "Festzurren" auf RSA die Welt verschlimmbessert. Denn wenn Du das mit "sudo -u fhem /usr/bin/alexa -A" startest, scheint er im "pi"-Verzeichnis zu agieren... Ansonsten sieht Deine "Landschaft" echt okay aus, auch keine verbastelten Permissions o.ä.

Ich wüsste gerne noch einmal, ob eventuell Dein FHEM-Homedir für andere beschreibbar ist:

ls -ld /opt/fhem


Falls da etwas wie drwxr..xr.x rauskommt, also auf jeden Fall nur ein "w", dann bist Du auch da "normal".

Mein Vorschlag: Dann erstmal die Situation resetten mit

sudo rm -rf /opt/fhem/.ssh


Damit löscht Du den FHEM-SSH-Key und bringst alles in den Ursprungszustand, dass beim nächsten Start - bitte aus dem Alexa-Device heraus ! - ein neuer SSH-Key und ein neuer Reg-Key geschrieben wird. Und von dem Lauf wäre, wenn es nicht klappt, das Ergebnis spannend.