(gelöst) FHEM Connector nicht wieder aktivierbar

Begonnen von tagedieb, 25 August 2021, 11:54:58

Vorheriges Thema - Nächstes Thema

tagedieb

Hallo zusammen
nach dem ich hier schon alle Themen zur Fehlerbeseitigung durchforstet  und teilweise auch meine Installation auch korrigiert habe, bekomme ich jedoch den FHEM Connector nicht wieder aktiviert
laut meiner Log liegt das Problem jedoch an meinem FHEM, doch ich sehe jetzt den Wald vor lauter Bäumen nicht mehr und bitte um Hilfe

Auszug aus fhem log
2021.08.25 11:40:20.521 2: MyAlexa: starting alexa-fhem: /usr/bin/alexa-fhem -c ./alexa-fhem.cfg -a xxxxxx:xxxxx (geändert)
2021.08.25 11:40:20.522 5: MyAlexa: using /usr/bin/alexa-fhem
2021.08.25 11:40:20.529 3: MyAlexa: starting
2021.08.25 11:40:20.574 3: MyAlexa: using logfile: ./log/alexa-2021-08-25.log
2021.08.25 11:40:20.974 5: MyAlexa: read: [2021-8-25 11:40:20] using config from ./alexa-fhem.cfg
2021.08.25 11:40:20.974 5: MyAlexa: read: *** CONFIG: parsed completely
2021.08.25 11:40:20.974 5: MyAlexa: read: [2021-8-25 11:40:20] os.homedir()=/opt/fhem
2021.08.25 11:40:20.974 5: MyAlexa: read: [2021-8-25 11:40:20] this is alexa-fhem 0.5.61
2021.08.25 11:40:20.974 5: MyAlexa: read: [2021-8-25 11:40:20] connecting to FHEM ...
2021.08.25 11:40:20.974 5: MyAlexa: read: [2021-8-25 11:40:20] [fhem] defaults to: will not send proactive events
2021.08.25 11:40:21.495 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem] trying longpoll to listen for fhem events
2021.08.25 11:40:21.495 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem] starting longpoll: http://127.0.0.1:8084/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1629884421493
2021.08.25 11:40:21.961 3: Login denied for user >Fhem12345< via WEBphone_127.0.0.1_60782
2021.08.25 11:40:21.966 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem] got csrfToken: csrf_115901610473824
2021.08.25 11:40:21.968 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem] Checking devices and attributes...
2021.08.25 11:40:21.971 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem]   executing: http://127.0.0.1:8084/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_115901610473824&XHR=1
2021.08.25 11:40:21.975 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem]   executing: http://127.0.0.1:8084/fhem?cmd=jsonlist2%20TYPE%3Dalexa&fwcsrf=csrf_115901610473824&XHR=1
2021.08.25 11:40:22.037 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem] waiting for events ...
2021.08.25 11:40:22.037 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem] Fetching FHEM devices...
2021.08.25 11:40:22.037 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem] fetching: http://127.0.0.1:8084/fhem?cmd=jsonlist2%20alexaName%3D..*&fwcsrf=csrf_115901610473824&XHR=1
2021.08.25 11:40:22.038 5: MyAlexa: read: [2021-8-25 11:40:21] [fhem] longpoll ended, reconnect in: 200msec
2021.08.25 11:40:22.454 5: MyAlexa: read: [2021-8-25 11:40:22] [fhem] trying longpoll to listen for fhem events
2021.08.25 11:40:22.454 5: MyAlexa: read: [2021-8-25 11:40:22] [fhem] starting longpoll: http://127.0.0.1:8084/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1629884422182
2021.08.25 11:40:24.199 3: Login denied for user >Fhem12345< via WEBphone_127.0.0.1_60792
2021.08.25 11:40:24.303 3: Login denied for user >Fhem12345< via WEBphone_127.0.0.1_60794
2021.08.25 11:40:24.311 5: MyAlexa: read: [2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (http://127.0.0.1:8084/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_115901610473824&XHR=1).
2021.08.25 11:40:24.311 5: MyAlexa: read: [2021-8-25 11:40:24] [fhem]   401: Authorization Required
2021.08.25 11:40:24.311 5: MyAlexa: read: [2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (http://127.0.0.1:8084/fhem?cmd=jsonlist2%20TYPE%3Dalexa&fwcsrf=csrf_115901610473824&XHR=1).
2021.08.25 11:40:24.311 5: MyAlexa: read: [2021-8-25 11:40:24] [fhem]   401: Authorization Required
2021.08.25 11:40:24.748 3: Login denied for user >Fhem12345< via WEBphone_127.0.0.1_60796
2021.08.25 11:40:25.152 5: MyAlexa: read: [2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (null)
2021.08.25 11:40:25.152 5: MyAlexa: read: [2021-8-25 11:40:24] [fhem]   401: Authorization Required
2021.08.25 11:40:25.153 5: MyAlexa: read: *** FHEM: connection failed: 401: Authorization Required
2021.08.25 11:40:25.589 3: Login denied for user >Fhem12345< via WEBphone_127.0.0.1_60798
2021.08.25 11:40:26.050 5: MyAlexa: read: [2021-8-25 11:40:25] Got SIGTERM, shutting down alexa-fhem...
2021.08.25 11:40:26.050 5: MyAlexa: read: [2021-8-25 11:40:25] Reading alexaFHEM.ProxyConnection set to stopping;; alexa-fhem terminating
2021.08.25 11:40:26.053 3: MyAlexa: read: end of file reached while sysread
2021.08.25 11:40:26.054 3: MyAlexa: stopped

Auszug aus der Alexa log
*** CONFIG: parsed completely
[2021-8-25 11:40:20] os.homedir()=/opt/fhem
[2021-8-25 11:40:20] this is alexa-fhem 0.5.61
[2021-8-25 11:40:20] connecting to FHEM ...
[2021-8-25 11:40:20] [fhem] defaults to: will not send proactive events
[2021-8-25 11:40:21] [fhem] trying longpoll to listen for fhem events
[2021-8-25 11:40:21] [fhem] starting longpoll: http://127.0.0.1:8084/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1629884421493
[2021-8-25 11:40:21] [fhem] got csrfToken: csrf_115901610473824
[2021-8-25 11:40:21] [fhem] Checking devices and attributes...
[2021-8-25 11:40:21] [fhem]   executing: http://127.0.0.1:8084/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_115901610473824&XHR=1
[2021-8-25 11:40:21] [fhem]   executing: http://127.0.0.1:8084/fhem?cmd=jsonlist2%20TYPE%3Dalexa&fwcsrf=csrf_115901610473824&XHR=1
[2021-8-25 11:40:21] [fhem] waiting for events ...
[2021-8-25 11:40:21] [fhem] Fetching FHEM devices...
[2021-8-25 11:40:21] [fhem] fetching: http://127.0.0.1:8084/fhem?cmd=jsonlist2%20alexaName%3D..*&fwcsrf=csrf_115901610473824&XHR=1
[2021-8-25 11:40:21] [fhem] longpoll ended, reconnect in: 200msec
[2021-8-25 11:40:22] [fhem] trying longpoll to listen for fhem events
[2021-8-25 11:40:22] [fhem] starting longpoll: http://127.0.0.1:8084/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1629884422182
[2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (http://127.0.0.1:8084/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_115901610473824&XHR=1).
[2021-8-25 11:40:24] [fhem]   401: Authorization Required
[2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (http://127.0.0.1:8084/fhem?cmd=jsonlist2%20TYPE%3Dalexa&fwcsrf=csrf_115901610473824&XHR=1).
[2021-8-25 11:40:24] [fhem]   401: Authorization Required
[2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (null)
[2021-8-25 11:40:24] [fhem]   401: Authorization Required
*** FHEM: connection failed: 401: Authorization Required
[2021-8-25 11:40:25] Got SIGTERM, shutting down alexa-fhem...
[2021-8-25 11:40:25] Reading alexaFHEM.ProxyConnection set to stopping;; alexa-fhem terminating


fhem@Zotak:~/alexa-fhem$ ls -l /opt/fhem/.ssh
insgesamt 16
-rw-r--r-- 1 fhem dialout 1128 Aug 25 06:55 authorized_keys old
-rw------- 1 fhem dialout 3243 Aug 25 07:13 id_rsa
-rw-r--r-- 1 fhem dialout  736 Aug 25 07:13 id_rsa.pub
-rw-r--r-- 1 fhem dialout 1770 Aug 23 09:55 known_hosts


Port 3000 ist auf Router freigegeben
auffallend war - das die andere Alexa Variante andauernd von Connected auf Loginerror oder so ähnlich (denn ich habe es derzeit deinstalliert) umsprang

hat hier jemand bitte einen Hinweis für mich

danke im Voraus
FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

MadMax-FHEM

#1
ssh-Verzeichnis sieht ok aus...
(bei known_hosts sind unnötige "r r" aber das ist/sollte egal sein / auf jeden Fall bzgl. alexa-fhem)
...ist aber (verm.) nicht das Problem.

Zitat
2021.08.25 11:40:21.961 3: Login denied for user >Fhem12345< via WEBphone_127.0.0.1_60782

bzw.:

Zitat
[2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (http://127.0.0.1:8084/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_115901610473824&XHR=1).
[2021-8-25 11:40:24] [fhem]   401: Authorization Required

Bist du sicher, dass Port (8084) und dafür dann die eingetragenen (WO? config.json oder Alexa-Device?) User/PW stimmen?

Warum nutzt du nicht einfach den fhem Connector?
Bzw. nutzt du den doch?
(zumindest ist die alexa-fhem Version neu)
EDIT: und das hier sieht auch danach aus
Zitat
[2021-8-25 11:40:20] os.homedir()=/opt/fhem
[2021-8-25 11:40:20] this is alexa-fhem 0.5.61

Wozu dann den Port 3000 öffnen?

Custom Skill?

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)

tagedieb

Hallo danke für die schnelle antwort

ZitatWarum nutzt du nicht einfach den fhem Connector?
Bzw. nutzt du den doch?
den wollte ich nutzen - doch hier erhalte ich:
Checking your key:

Status ActivationKey: Good Key

Checking connection status:

Status SSH: NOT online - no SSH session established

Status Reverse-Portmapping: -

Status nodejs-Connectivity: -

Status nodejs-Interaction: -


darauf hin ging ich auf Fehlersuche

muss
[2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (http://127.0.0.1:8084/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_115901610473824&XHR=1). die FHEM Server ip stehen oder die vom lokalen Host, wenn ich den Connector benutzen möchte?

meine alexa-fhem config
{
   "sshproxy" : {
      "description" : "FHEM Connector",
      "ssh" : "/usr/bin/ssh"
   },
   "connections" : [
      {
         "server" : "127.0.0.1",
         "name" : "fhem",
         "port" : "8084",
         "uid" : 999,
         "filter" : "alexaName=..*",
         "webname" : "fhem"
      }
   ]
}


Wozu dann den Port 3000 öffnen?

Custom Skill?


ja

vg
FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

MadMax-FHEM

#3
Naja, also der Fehler bzw. die Fehlermeldung ist ja sehr eindeutig...

Evtl. mal für einen Test einen weiteren FHEMWEB definieren OHNE allowed (nur zum Test) und den dann in die alexa-fhem.cfg (unter EDIT Files / ist schon die, die du verwendest?) eintragen.
Wenn das dann geht: Zugangsdaten zu fhem prüfen! (du musst die ja beim Alexa-Device gesetzt haben, in der config stehen ja keine drin)

Ob dann das Connector-Problem behoben ist werden wir sehen...
...immer eines nach dem anderen ;)

fhem und alexa-fhem laufen schon auf dem selben Rechner?
Mit derselben IP (localhost)?

Also alexa-fhem kann per localhist auf fhem zugreifen (prinzipiell / bis auf dass der Login nicht klappt)?

Gut für Custom Skill muss nat. der Port offen sein...
...aber du musst auch noch die Einträge für den Custom Skill in die alexa-fhem.cfg eintragen, sonst wird das nix ;)
(aber: eins nach dem andern ;)  )

EDIT:
Zitat
muss
Code: [Auswählen]

[2021-8-25 11:40:24] [fhem] There was a problem connecting to FHEM (http://127.0.0.1:8084/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_115901610473824&XHR=1).

die FHEM Server ip stehen oder die vom lokalen Host, wenn ich den Connector benutzen möchte?
verstehe ich nicht...
Prinzipiell müssen alexa-fhem und fhem nicht auf demselben System laufen. Allerdings versucht das Alexa-Device ja alexa-fhem (lokal) zu starten...
...daher ist es auf dem selben System einfacher.
Ansonsten musst du alexa-fhem selber starten (wie "früher") und irgendwie das Alexa-Device "beruhigen" bzgl. fehlgeschlagenem alexa-fhem Start (evtl. geht auch mittlerweile remote-Start)...

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)

tagedieb

Hallo Joachim

das funktioniert
2021.08.25 13:09:51.890 5: MyAlexa: read: [2021-8-25 13:09:51] BearerToken '...E0A24' read from MyAlexa
2021.08.25 13:09:51.890 5: MyAlexa: read: [2021-8-25 13:09:51] 39_alexa.pm is new version: true
2021.08.25 13:09:51.890 5: MyAlexa: read: [2021-8-25 13:09:51] [fhem]   executing: http://127.0.0.1:8081/fhem?cmd=%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bset%20MyAlexa%20proxyToken%20D921957A9C0C1EEF%3B%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_653424378912237&XHR=1
2021.08.25 13:09:52.762 5: MyAlexa: read: [2021-8-25 13:09:52] [fhem]   executing: http://127.0.0.1:8081/fhem?cmd=%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bset%20MyAlexa%20proxyKey%20CFF9AF9D-B2D9D7C2ECC43C98-D921957A9C0C1EEF%3B%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_653424378912237&XHR=1
2021.08.25 13:09:53.317 5: MyAlexa: read: [2021-8-25 13:09:52] sshautoconf: completed successfully
2021.08.25 13:09:53.317 5: MyAlexa: read: [2021-8-25 13:09:52] *** SSH: proxy configuration set up done
2021.08.25 13:09:53.317 5: MyAlexa: read: [2021-8-25 13:09:52] Reading alexaFHEM.ProxyConnection set to starting;; starting SSH
2021.08.25 13:09:53.317 5: MyAlexa: read: [2021-8-25 13:09:52] [fhem]   executing: http://127.0.0.1:8081/fhem?cmd=%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20MyAlexa%20alexaFHEM.ProxyConnection%20starting%3B%3B%20starting%20SSH%3B%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_653424378912237&XHR=1
2021.08.25 13:09:53.318 5: MyAlexa: read: [2021-8-25 13:09:52] Starting SSH with -R 1234:127.0.0.1:34927 -oServerAliveInterval=90 -i /opt/fhem/.ssh/id_rsa -p 58824 fhem-va.fhem.de
2021.08.25 13:09:53.318 5: MyAlexa: read: [2021-8-25 13:09:52] SSH setup completed with new bearer token
2021.08.25 13:09:53.789 5: MyAlexa: read: [2021-8-25 13:09:53] Reading alexaFHEM.ProxyConnection set to running;; SSH connected
2021.08.25 13:09:53.789 5: MyAlexa: read: [2021-8-25 13:09:53] [fhem]   executing: http://127.0.0.1:8081/fhem?cmd=%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20MyAlexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20SSH%20connected%3B%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_653424378912237&XHR=1
2021.08.25 13:09:53.789 5: MyAlexa: read: [2021-8-25 13:09:53] *** SSH: proxy connection established
2021.08.25 13:09:53.789 5: MyAlexa: read: [2021-8-25 13:09:53] SSH: Welcome at the reverse proxy!  This pseudoshell does not react to any input - do not get irritated. 
2021.08.25 13:09:54.315 5: MyAlexa: read: [2021-8-25 13:09:54] [fhem]   executing: http://127.0.0.1:8081/fhem?cmd=%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3B%7B%20FW_directNotify(%22%23FHEMWEB

jedoch hier hakt es noch  (port 8081 ist vorrübergehend freigeschalten worden)
Checking your key:
Status ActivationKey: Good Key
Checking connection status:
Status SSH: NOT online - no SSH session established
Status Reverse-Portmapping: -
Status nodejs-Connectivity: -
Status nodejs-Interaction: -

vg
FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

tagedieb

fhem und alexa-fhem laufen schon auf dem selben Rechner?
Mit derselben IP (localhost)?


zur Zeit ja
ich möchte das dann aber wieder auf dem  anderen Server laufen lassen, doch ersteinmal soll dieser sauber laufen, denn ich habe hier einige Baustellen festgestellt

FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

MadMax-FHEM

#6
Hast du den Skill verknüpft?

https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa#Alexa-FHEM_aktivieren
https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa#Finale:_Skill_verkn.C3.BCpfen

Wenn du später alexa-fhem umziehst: die ssh-Schlüssel "mitnehmen" oder eben Skill neu verknüpfen ("ablernen" und neu Verknüpfen steht im alexa-fhem Connector wiki)...
EDIT: https://forum.fhem.de/index.php/topic,60452.msg1170930.html#msg1170930

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)

tagedieb

Hallo Joachim
ZitatHast du den Skill verknüpft?

https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa#Alexa-FHEM_aktivieren
https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa#Finale:_Skill_verkn.C3.BCpfen

ja habe ich
"intern"
läuft es

2021.08.25 13:28:38.592 2: Fritzbox7590 ERROR: cannot get SID, check connection/hostname/fritzbox-user/password
2021.08.25 13:29:22.778 2: MyAlexa: starting alexa-fhem: /usr/bin/alexa-fhem -c ./alexa-fhem.cfg -a Fhem12345:01vg16&eF
2021.08.25 13:29:22.835 5: MyAlexa: read: [2021-8-25 13:29:22] Got SIGTERM, shutting down alexa-fhem...
2021.08.25 13:29:22.835 5: MyAlexa: read: [2021-8-25 13:29:22] Reading alexaFHEM.ProxyConnection set to stopping;; alexa-fhem terminating
2021.08.25 13:29:22.835 5: MyAlexa: read: [2021-8-25 13:29:22] [fhem]   executing: http://127.0.0.1:8081/fhem?cmd=%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20MyAlexa%20alexaFHEM.ProxyConnection%20stopping%3B%3B%20alexa-fhem%20terminating%3B%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_653424378912237&XHR=1
2021.08.25 13:29:22.835 5: MyAlexa: read: [2021-8-25 13:29:22] Stopping SSH ...
2021.08.25 13:29:22.835 5: MyAlexa: read: [2021-8-25 13:29:22] Reading alexaFHEM.ProxyConnection set to stopped
2021.08.25 13:29:22.835 5: MyAlexa: read: [2021-8-25 13:29:22] [fhem]   executing: http://127.0.0.1:8081/fhem?cmd=%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20MyAlexa%20alexaFHEM.ProxyConnection%20stopped%3B%7B%24defs%7B%22MyAlexa%22%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_653424378912237&XHR=1
2021.08.25 13:29:22.835 5: MyAlexa: read: [2021-8-25 13:29:22] *** SSH: exited with 143
2021.08.25 13:29:25.684 3: MyAlexa: read: end of file reached while sysread
2021.08.25 13:29:25.685 3: MyAlexa: stopped
2021.08.25 13:29:25.734 2: MyAlexa: starting alexa-fhem: /usr/bin/alexa-fhem -c ./alexa-fhem.cfg -a Fhem12345:01vg16&eF
2021.08.25 13:29:25.734 5: MyAlexa: using /usr/bin/alexa-fhem
2021.08.25 13:29:25.742 3: MyAlexa: starting
2021.08.25 13:29:25.801 3: MyAlexa: using logfile: ./log/alexa-2021-08-25.log
2021.08.25 13:29:26.181 5: MyAlexa: read: [2021-8-25 13:29:26] using config from ./alexa-fhem.cfg
2021.08.25 13:29:26.189 5: MyAlexa: read: *** CONFIG: parsed completely
2021.08.25 13:29:26.195 5: MyAlexa: read: [2021-8-25 13:29:26] this is alexa-fhem 0.5.61
2021.08.25 13:29:26.196 5: MyAlexa: read: Startup rejected. Reason: Error: ENOENT: no such file or directory, open './ke


jedoch in Alexa - Verknüpfung steht immer noch

NOT online - no SSH session established  :-(

vg
FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

tagedieb

#8
das steht jetzt in der Alexa log
*** CONFIG: parsed completely
[2021-8-25 13:29:26] this is alexa-fhem 0.5.61
Startup rejected. Reason: Error: ENOENT: no such file or directory, open './key.pem'


war das - wo man den rsa und pub löschen sollte?
FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

MadMax-FHEM

Hm, jetzt bin ich (etwas) ratlos...

Ich weiß nicht wo das herkommt, dass "key.pem" genommen werden soll

Es wird aber schon noch diese Config genommen: "2021.08.25 13:29:26.181 5: MyAlexa: read: [2021-8-25 13:29:26] using config from ./alexa-fhem.cfg" ?

Da steht ja nichts drin, also eigentlich standard nämlich /opt/fhem/.ssh

Hast du den Skill auch mal zurück gesetzt und neu verknüpft?
Bekommst du einen Proxy-Key: get Alexa-Device proxyKey

Wie hast du alexa-fhem installiert?
Wie im Wiki angegeben?
Hattest du noch "alte Sachen" von "früheren" alexa-fhem Installationen?

Du kannst dir auch ein neues alexa-config anlegen lassen (hast ja außer Port nichts geändert?)...

Evtl. müssen jetzt Andre (justme1968) oder/und gvzdus mal drauf schauen...

Sorry, 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)

tagedieb

Ich weiß nicht wo das herkommt, dass "key.pem" genommen werden soll

Es wird aber schon noch diese Config genommen: "2021.08.25 13:29:26.181 5: MyAlexa: read: [2021-8-25 13:29:26] using config from ./alexa-fhem.cfg" ?


nein, ich hatte nachdem alles lief, eine Sicherungscopie mit den Skilldaten aktualisiert und alexa neu gestartet
mit der 2021.08.25 13:29:26.181 5: funktioniert es mit ssh wieder
alexaFHEM

running /usr/bin/alexa-fhem

2021-08-25 14:45:13
alexaFHEM.ProxyConnection
running; SSH connected


ich bekomme auch einen proxy code,  diesen ich in der Alexa app bei Anfrage einkopiert habe, doch ich bekomme kene ssh Verbindung :-)
daher hatte es mit der "modifizierten" datei probiert und einen  Proxa key generieren lassen und auch das hat nach dem einkopieren nicht funktioniert

den Skill hatte ich schon vor meiner Hilfe suche zurückgesetzt und seitdem versuche ich ihn neu zu aktivieren
ich habe alexa nach wiki installiert, hatte jedoch die Alte Version noch , diese funktionierte bis zu meinen Serverproblem vor 10 Tagen einwandfrei und wurde auch stets mit fhem geupdatet
ob es mit einer neuen, sauberen Installation besser funktionieren würde? kann da auch an meinem Netzwerk liegen, denn die FB meckert auch immer das sie sich icht verbinden kann - obwohl passwort und Benutzer stimmen und auch neu eingegeben wurden?
Alexa sagt mir das der mit  xxxx verbundene Skill nicht aktiviert , bitte aktiviere den Skill......

FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

MadMax-FHEM

#11
Sorry, ist jetzt etwas "wirr"...

Zitat
mit der 2021.08.25 13:29:26.181 5: funktioniert es mit ssh wieder

Wovon sprichst du?
Alexa-Modul?
(nehme ich an)

Mit deiner aktuellen Installation (und Konfiguration) von alexa-fhem?

Zitat
ich bekomme auch einen proxy code,  diesen ich in der Alexa app bei Anfrage einkopiert habe, doch ich bekomme kene ssh Verbindung :-)
daher hatte es mit der "modifizierten" datei probiert und einen  Proxa key generieren lassen und auch das hat nach dem einkopieren nicht funktioniert

Äh was?

Zitat
ich habe alexa nach wiki installiert, hatte jedoch die Alte Version noch , diese funktionierte bis zu meinen Serverproblem vor 10 Tagen einwandfrei und wurde auch stets mit fhem geupdatet
Aber im Wiki steht doch ganz deultich: ALLES ALTE LÖSCHEN! Bevor man neu installiert...
Ob das das Problem ist: keine Ahnung.

Mit ALT ist aber eher "Installation aus zip-Datei" gemeint...
...also ganz alt nicht eine alte alexa-fhem Connector Installation.

UND: alexa-fhem wurde NOCH NIE mit fhem update geupdated! Bzw. aufpassen:

es gibt alexa-fhem: nodejs -> das wird NIE per fhem Update upgedated (Update siehe Wiki)
und es gibt das Alexa-Modul: ja klar das ist "im" fhem Update...

Eventuell mal (genau) beschreiben was du von "lief" bis jetzt gemacht hast und auch wie die Version installiert/konfiguriert wurde, die schon gelaufen ist (nach "Restore" wieder läuft?)...

Was noch sein kann, dass eine aktuelle Installation in einem anderen Pfad landet als eine (knapp) frühere Version von alexa-fhem.
Bzw. eine "manuelle" Installation (alte Methode -> zip Datei) sicher woanders war.

Also evtl. mal suchen, ob du 2 Versionen hast...

Allerdings sagt 0.5.61 eigentlich, dass die neue (neueste) Version gestartet wird/wurde...
...steht ja so im alexa-fhem Log.

Evtl. auch mal alexa-fhem Log posten, wenn du zurückstellst auf: es geht wieder (hab ich doch richtig verstanden, dass wenn du was "zurückstellst" es wieder geht!? Was genau tust du da? Sicherung einspielen? Wie erstellt? Oder "nur" das Alexa-Modul "tauschen"?)

EDIT: eine Garantie, dass es mit einer frischen Neuinstallation geht kann ich nicht geben. Aber es geht doch schnell. Alles löschen was mit alexa-fhem zu tun hat (vorher halt die Custom Skill Sachen / "eigene Sachen" sichern). Dann einfach laut Wiki installieren. Alexa-Device anlegen und Skill verknüpfen. Allerdings: ich denke erstellte Routinen etc. sind dann "weg"...

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)

tagedieb

ich möchte mal versuchen das Wirrwar aufzuklären
ich habe die Alex-fhem config dateien zum probieren dupliziert und manuell Daten aus der config.sample.json ausgetauscht und jedesmal als alexa-fhem.config, probiert jedoch eine Alte Sicherung mit den Skilldaten manuell bearbeitet, mit den jetzigen Daten aus der aktuellen alexa-fhem config, dann aber die funktionierende wieder verwendet - also hin und her
und für jede einen Proxykey generiert, ehe ich mit der alexa app verbinden wollte
UND: alexa-fhem wurde NOCH NIE mit fhem update geupdated! Bzw. aufpassen:
damit meinte ich das mein System FHEM immer geupdatet wurde und die Version alexa 5 schon vor der Neuinstallation bestanden hat

Was noch sein kann, dass eine aktuelle Installation in einem anderen Pfad landet als eine (knapp) frühere Version von alexa-fhem.
Bzw. eine "manuelle" Installation (alte Methode -> zip Datei) sicher woanders war.

Also evtl. mal suchen, ob du 2 Versionen hast..

damals musste ich noch den Inhalt der config sample json in die Alexa-fhem config kopieren und in genau der sind auch die Skilldaten  :-(


Aber im Wiki steht doch ganz deultich: ALLES ALTE LÖSCHEN! Bevor man neu installiert...
ich habe jedoch auch im Forum gelesen, das man das Alexa device nicht wieder löschen sollte, da hier alle Einstellungen verbunden sind ??

vg
FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

tagedieb

???? ich weiss nicht warum - jedoch wurden die Geräte jetzt von der App eingelesen und es funktioniert

Vielen Dank für die Hilfe

vg
FHEM 5.6 auf Cubitruck
CUL und Cul 868 und 2 HM LAN an Zbox
Remoteserver auf 2.Zboxi
HM-CC-RT-DN,HM-LC-Bl1PBU-FM,HM-LC-SW1-FM,HM-LC-SW4-PCB,HM-LC-Sw1PBU-FM,HM-PB-2-WM55,HM-PB-6-WM55,HM-SCI-3-FM,HM-SEC-RHS,HM-SEC-SC,HM-SEC-SC-2,HM-SEC-TIS,HM-WDS10-TH-O u.viele mehr
diverse IT Empfänger und LW3

MadMax-FHEM

Na dann is ja gut! :)

Mit ALLES löschen war eher auch ALLES außer dem Alexa-Device gemeint...
...wobei ich nicht wüsste was sich das merkt, außer nat. (wie bei dir evtl./verm.) die Custom Skill Einträge...

Ansonsten ist auch das "gefahrlos" löschbar...

Viel Spaß wieder, 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)