alexa-fhem: amazon alexa smart home skill für fhem, api version 3

Begonnen von justme1968, 19 Dezember 2017, 22:16:30

Vorheriges Thema - Nächstes Thema

justme1968

da sind ein paar fehlermeldungen ziemlich am anfang die ich nicht verstehe (und deren zeilennummer nicht zur aktuellen version passen) bitt schau mal ob du mehr dazu findest.

es müsste auch eine personOfId ausgabe geben die ich nicht finde. vielleicht ein folgefehler.

kann es sein das du ein tippfehler im server.js file hast? installiere bitte mal mit npm install -g drüber
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

cs-online

FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

cs-online

npm install -g im Terminal hat nichts gebracht, ich bekomme bei "starte FHEM" immernoch die Ansage "Hallo, amzn1.ask.person.AHAWTLSCA7S6UULEKK3OJOCUVSEQZJXXXXXXXXXXXXXXXXXXXX", das bedeutet, die server.js, in die ich

var weristes ='.';
    if(person !== 'unknown') weristes = ' '+  person + ',';
    if( event.request.type === 'LaunchRequest' ) {
      in_session = true;
      response.response.outputSpeech.text = 'Hallo' + weristes + ' Wie kann ich helfen?';
if( 0 ) {


eingefügt hatte (wie gesagt, hatte bis kürzlich funktioniert), wurde nicht ersetzt. Muss ich da vorher was löschen ?
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

justme1968

hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

cs-online

pi@raspberrypi:~ $ sudo find / -name alexa-fhem -exec ls -lad {} \;
find: '/run/user/1000/gvfs': Keine Berechtigung
drwxr-xr-x 5 root root 4096 Dez 20 20:44 /usr/local/lib/node_modules/alexa-fhem
lrwxrwxrwx 1 root root 40 Dez 20 20:44 /usr/local/bin/alexa-fhem -> ../lib/node_modules/alexa-fhem/bin/alexa


ich hatte noch einen Sicherungsordner, den habe ich gelöscht, nochmal "npm install -g" (ohne sudo), da kommt das hier bei raus:

pi@raspberrypi:~ $ npm install -g
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! code ENOLOCAL
npm ERR! Could not install from "" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-01-16T18_21_26_466Z-debug.log


im Debug.log steht:

0 info it worked if it ends with ok
1 warn npm npm does not support Node.js v10.15.2
2 warn npm You should probably upgrade to a newer version of node as we
3 warn npm can't make any promises that npm will work with this version.
4 warn npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
5 warn npm You can find the latest version at https://nodejs.org/
6 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '-g' ]
7 info using npm@5.8.0
8 info using node@v10.15.2
9 verbose npm-session e95e2be5cfad59bf
10 silly install loadCurrentTree
11 silly install readGlobalPackageData
12 silly fetchPackageMetaData error for file: Could not install from "" as it does not contain a package.json file.
13 verbose stack Error: ENOENT: no such file or directory, open '/home/pi/package.json'
14 verbose cwd /home/pi
15 verbose Linux 4.19.75-v7l+
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g"
17 verbose node v10.15.2
18 verbose npm  v5.8.0
19 error code ENOLOCAL
20 error Could not install from "" as it does not contain a package.json file.
21 verbose exit [ 1, true ]
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

cs-online

#695
Habs hinbekommen, einmal den ganzen Ordner gelöscht und dann mit sudo npm install -g alexa-fhem neu installiert, jetzt läuft das wieder :-)
FHEM auf RPI 4 4GB, HM-WLAN-Gateway, einige HM-Aktoren,2x EBUSD an Heizung+Solar, ESP8266 am Strom-,Gas-,Wasserzähler, in WLAN-Steckdosen und Relaisleisten, Sonoff S20, Shelly1,2 und 2.5,Lacrosse-Gateway und Sensoren,Sduino,Alexa-Fhem,Huawei PV mit Speicher, alles auf einem RPI und da geht noch mehr

justme1968

hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

HD97

Ich habe eben von alexa-fhem auf den FHEM-Connector wie in der Wiki beschrieben umgestellt, bekomme jedoch bei "alexaFHEM.ProxyConnection" die Meldung
"error; user homedir writable by group/other ('chmod 755 /opt/fhem' required)", obwohl die Rechte genauso (also für /opt/fhem 755) gegeben sind. Hat jemand eine Ahnung was der Grund sein könnte?

gvzdus

Die Zeilen stammen von mir, und ich habe keine Idee, wie da etwas fehlinterpretiert werden könnte:

    let stat = fs.statSync(User.getHomedir());
    if (stat && (stat.mode & (fs.constants.S_IWGRP | fs.constants.S_IWOTH ))>0) {
      writeout('*** Error: Your Homedirectory is writable by group/other. This will not work with SSH');
      return "user homedir writable by group/other ('chmod 755 " + User.getHomedir() + "' required)";
    }


Guckst Du auf dem richtigen Server?
So sieht es bei mir aus:

ls -ld /opt/fhem
drwxr-xr-x 21 fhem dialout 4096 Dez  6 00:05 /opt/fhem

MadMax-FHEM

Zitat von: HD97 am 27 Januar 2020, 11:40:44
Ich habe eben von alexa-fhem auf den FHEM-Connector wie in der Wiki beschrieben umgestellt, bekomme jedoch bei "alexaFHEM.ProxyConnection" die Meldung
"error; user homedir writable by group/other ('chmod 755 /opt/fhem' required)", obwohl die Rechte genauso (also für /opt/fhem 755) gegeben sind. Hat jemand eine Ahnung was der Grund sein könnte?

Hast du (sicherheitshalber) mal sudo chmod 755 /opt/fhem ausgeführt!?

Ansonsten poste doch mal:

ls -la /opt/fhem

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)

HD97

ja habe ich schon ausgeführt.

Ausgabe sieht so aus:

pi@Homecenter:~ $ ls -la /opt/fhem
insgesamt 7976
drwxr-xrwx 18 fhem dialout    4096 Jan 27 11:37 .
drwxrwxrwx  6 root root       4096 Dez 11 11:37 ..
drwx------  2 fhem dialout    4096 Jan 27 10:50 .alexa
-rw-r--r--  1 fhem dialout     750 Jan 27 11:37 alexa-fhem.cfg
-rw-r--r--  1 fhem dialout     702 Jan 27 10:52 alexa-fhem.cfg.previous
drwxr-xr-x  5 pi   pi         4096 Jul 23  2018 alexa-fhem.old
drwxrwxrwx  2 fhem dialout    4096 Dez  6 00:39 backup
-rwx------  1 fhem dialout    2551 Jan 27 11:32 .bash_history
-rwxr--r--  1 fhem dialout  324894 Jan 27 10:47 CHANGED
drwx------  3 fhem dialout    4096 Jul 21  2018 .config
-rwxr--r--  1 fhem dialout   39782 Dez  6 00:40 configDB.pm
-rw-r--r--  1 pi   pi          675 Jan 27 10:35 configOld.json
drwxr-xr-x 44 fhem dialout    4096 Mär  2  2018 contrib
-rw-r--r--  1 root root         98 Dez  8 15:06 db.conf
drwxr-xr-x  3 fhem dialout    4096 Mär  2  2018 demolog
drwxr-xr-x  4 fhem dialout    4096 Mär  2  2018 docs
drwxrwxr-x  6 fhem dialout   28672 Jan 27 11:37 FHEM
-rwxr--r--  1 fhem dialout  107801 Jan 27 11:01 fhem.cfg
-rwxr--r--  1 fhem dialout   25544 Jul 10  2019 fhem.cfg.demo
-rw-rw-rw-  1 fhem root    6742016 Jan 27 11:17 fhem.db
-rw-rw-rw-  1 fhem dialout   32768 Jan 27 11:51 fhem.db-shm
-rw-rw-rw-  1 fhem dialout  535632 Jan 27 11:51 fhem.db-wal
-rwxr-xr-x  1 fhem dialout  159742 Jan 27 10:47 fhem.pl
drwxr-xr-x  4 fhem dialout    4096 Nov  7  2018 .homebridge
drwxrwxrwx  2 fhem dialout   12288 Jan 27 00:00 log
-rwxr--r--  1 fhem dialout   42382 Jan 27 10:47 MAINTAINER.txt
drwxr-xr-x  2 fhem dialout    4096 Jul 21  2018 .nano
drwxr-xr-x  5 fhem dialout    4096 Jul 21  2018 .npm
-rwxr--r--  1 fhem dialout     935 Feb 19  2017 README_DEMO.txt
drwxr-xr-x  7 fhem dialout    4096 Aug  6  2018 restoreDir
-rwx------  1 fhem dialout    1024 Jul 21  2018 .rnd
drwxr-xr-x  2 fhem dialout    4096 Dez 13 14:47 .ssh
drwxr-xr-x  2 fhem dialout    4096 Aug 10 21:44 unused
drwxr-xr-x 10 fhem dialout    4096 Apr  4  2019 www

HD97

ZitatGuckst Du auf dem richtigen Server?
Wie meinst du das? Ich habe nur einen Raspi auf dem alles läuft, also denke ich, dass ich auf dem richtigen schaue.


amenomade

Zitat von: HD97 am 27 Januar 2020, 11:57:56
ja habe ich schon ausgeführt.

Dann ist es fehlgeschlagen. Aktuell hast Du 757 und nicht 755 auf /opt/fhem
Zitatpi@Homecenter:~ $ ls -la /opt/fhem
insgesamt 7976
drwxr-xrwx 18 fhem dialout    4096 Jan 27 11:37 .
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

HD97

Ja ok, habe ich nochmal ausgeführt jetzt habe ich 755 und es geht trotzdem nicht. Braucht man nicht 777 damit group und other schreiben können?

gvzdus

... dann dürfte aber jetzt die Fehlermeldung eine andere sein, oder irgendeine "Magie" ändert es automatisch auf 757 um.

Zu Deiner Frage: Nein, warum sollten andere Prozesse auf dem Raspi in das Homedir von FHEM schreiben können?