alexa-fhem: amazon alexa smart home skill für fhem

Begonnen von justme1968, 05 November 2016, 23:21:32

Vorheriges Thema - Nächstes Thema

freak4all

Ja da scheinen die Rechte zu fehlen, bzw wie du schon sagst der user ist falsch.
-su: /opt/fhem/log/alexa-2018-11.log: Permission denied


sudo update-rc.d alexa
Das hab ich gemacht gehabt, was sollte das bewirken?

wie mach ich das jetzt das alexa-fhem mit dem user pi läuft?
PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

MadMax-FHEM

Was sagt:

sudo cat /opt/fhem/log/alexa-2018-11.log

(wobei es bei den ganzen Dingen die im Script nicht passen eigentlich egal ist ;)  )

Hmm, umstricken auf User pi...

alexa-fhem noch mal runterladen (oder ins Home von pi kopieren: /home/pi) und dann im Home von pi entpacken OHNE sudo etc.

Dann eben dort npm install (hmm, eigentlich auch ohne sudo denke ich)...

Dann die config.json nach /home/pi/.alexa/ kopieren und die Rechte anpassen:

sudo chown pi:pi /home/pi/.alexa/config.json

Mit etwas Glück...

Evtl. könnte auch ein "Verschieben" des Verzeichnisses und "Anpassen" der Rechte reichen, dazu stecke ich aber zu wenig in node...
...aber testen kann man es ja mal ;)

Also:

sudo mv /root/alexa-fhem/ /home/pi/alexa-fhem/

sudo chown -R pi:pi /home/pi/alexa-fhem

Dann noch wie oben die config.json:

sudo mv /root/.alexa/ /home/pi/.alexa/

und dann noch Rechte:

sudo chown -R pi:pi /home/pi/.alexa

Falls das nicht geht evtl. noch mal npm install in /home/pi/alexa-fhem...
Und wenn es dann nicht geht, dann wird wohl an einer Neuinstallation unter /home/pi nichts vorbei gehen.

Bei Installation unter /opt/fhem (was auch immer wieder geschieht) halt die Rechte auf User pi anpassen oder im Startscript den User fhem...

Einfacher ist allerdings die Installation als User pi unter /home/pi/alexa-fhem ;)

Ausprobieren halt dann erst mal:

cd /home/pi/alexa-fhem
./bin/alexa

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)

freak4all

Super vielen Dank für deine super schnelle Hilfe! Steh wie du siehst noch am Anfang und muss noch viel lernen.
Ich werd das aber heute nicht mehr schaffen, muss erstmal schlafen.
Ich meld mich wieder!
PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

MadMax-FHEM

Was nat. noch gehen könnte (aber nicht schön ist, da als root!) ist das Script anpassen.

Also wie folgt:


#!/bin/sh
### BEGIN INIT INFO
# Provides: alexa
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time for alexa
# Description: Enable service provided by daemon.
### END INIT INFO
export PATH=$PATH:/usr/local/bin
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
PID=`pidof alexa`
export ALEXAPATH="/root/alexa-fhem"
export LOGPATH="/opt/fhem/log"
case "$1" in
start)
if ps -p $PID > /dev/null 2>&1; then
        echo "Alexa is already running"
        perl /opt/fhem/fhem.pl 7072 "setreading FHEM.Alexa.Status info Alexa is already running"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa.Status on"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa off"
else
#        su - "pi" -c "cd $ALEXAPATH;./bin/alexa > $LOGPATH/alexa-`date +%Y-%m`.log 2>&1 &"
        cd $ALEXAPATH;./bin/alexa > $LOGPATH/alexa-`date +%Y-%m`.log 2>&1 &
        echo "Alexa starting"
        sleep 2
        $0 status
fi
;;
stop)
if ! ps -p $PID > /dev/null 2>&1; then
        echo "Alexa is not running"
        perl /opt/fhem/fhem.pl 7072 "setreading FHEM.Alexa.Status info Alexa is not running"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa.Status off"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa off"
else
        kill $PID
        echo "Alexa closed"
        perl /opt/fhem/fhem.pl 7072 "setreading FHEM.Alexa.Status info Alexa closed"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa.Status off"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa off"
fi
;;
restart)
if ! ps -p $PID > /dev/null 2>&1; then
        $0 start
else
        $0 stop
        $0 start
fi
;;
status)
if ps -p $PID > /dev/null 2>&1; then
        echo "Alexa is running PID $PID"
        perl /opt/fhem/fhem.pl 7072 "setreading FHEM.Alexa.Status info Alexa running as PID $PID"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa.Status on"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa off"
else
        echo "Alexa is not running"
        perl /opt/fhem/fhem.pl 7072 "setreading FHEM.Alexa.Status info Alexa is not running"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa.Status off"
        perl /opt/fhem/fhem.pl 7072 "set FHEM.Alexa off"
fi
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
echo "script done"
exit 0


Da das Startscript eh als root gestartet wird könnte das auch klappen...

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)

MadMax-FHEM

Zitat von: freak4all am 06 November 2018, 22:41:22
Super vielen Dank für deine super schnelle Hilfe! Steh wie du siehst noch am Anfang und muss noch viel lernen.
Ich werd das aber heute nicht mehr schaffen, muss erstmal schlafen.
Ich meld mich wieder!

Kein Thema...

Besser erst mal in Ruhe lesen (hab ja einiges geschrieben ;)  )...
...versuchen nachzuvollziehen (ganz wichtig, da einiges als "sudo"/"root" ausgeführt wird und ich für Fehlerfreiheit nat. nicht gerantieren kann, also besser mal mitdenken vor dem Eintippen und Ausführen ;)  )

Und dann in Ruhe mal eine (oder eine nach der anderen ;)  ) Variante ausprobieren...

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)

freak4all

so ich hab mal eine erste kleine erfolgsmeldung.
habe deinen letzten tipp zu erst umgesetzt.
starte ich das geänderte script und schließe ich ssh (putty) finded mein echo plus weiterhin meine beiden geräte. mache ich einen reboot vom pi wird nix gefunden, das script startet also nicht von allein.

werde mal noch weitere optionen probieren.
PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

MadMax-FHEM

#3906
Hast du "nur" das:

sudo update-rc.d alexa

Oder das:

sudo update-rc.d alexa defaults

ausgeführt!?

Gibt es eine (neue) Logdatei von alexa-fhem!?

ls /opt/fhem/log/alexa*.*

EDIT: mach doch mal ein sudo chmod +x /etc/init.d/alexa

EDIT2: was kommt bei: sudo service alexa 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)

freak4all

#3907
also ich habe
sudo update-rc.d alexa defaults
ausgeführt

mein log sagt folgendes
path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.join (path.js:1236:7)
    at Function.User.storagePath (/root/alexa-fhem/lib/user.js:30:15)
    at Function.User.configPath (/root/alexa-fhem/lib/user.js:34:25)
    at Server._loadConfig (/root/alexa-fhem/lib/server.js:34:25)
    at new Server (/root/alexa-fhem/lib/server.js:26:23)
    at module.exports (/root/alexa-fhem/lib/cli.js:17:16)
    at Object.<anonymous> (/root/alexa-fhem/bin/alexa:17:22)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)


hab inzwischen auch unter dem user pi alexa-fhem installiert, es läuft auch...jedoch nur solang putty offen ist

Edit:

bei
sudo service alexa start
kommt garnichts, jedenfalls seh ich keine ausgabe in der console
PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

MadMax-FHEM

#3908
Was sagt: sudo service alexa status

Hast du den chmod mal ausgeführt?
Und dann noch mal update rc.d?

Aber wenn alexa-fhem unter pi nun läuft, dann sollte das "Original-Script" von dir eigentlich laufen!?

EDIT: nach dem Zurückändern auf User pi mal mit sudo /etc/init.d/alexa start testen... Evtl. kann es sein, dass (jetzt) User pi keine Rechte hat das Log zu schreiben. Evtl. den Log-Pfad im Script mal auf /home/pi ändern...

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)

freak4all

bei status erhalte ich folgendes
● alexa.service - LSB: Start daemon at boot time for alexa
   Loaded: loaded (/etc/init.d/alexa; generated; vendor preset: enabled)
   Active: active (exited) since Wed 2018-11-07 21:00:17 CET; 1min 34s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 503 ExecStart=/etc/init.d/alexa start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/alexa.service

Nov 07 20:59:54 raspberrypi systemd[1]: Starting LSB: Start daemon at boot time
Nov 07 21:00:02 raspberrypi alexa[503]: Alexa starting
Nov 07 21:00:04 raspberrypi alexa[503]: Alexa is running PID 519
Nov 07 21:00:17 raspberrypi alexa[503]: script done
Nov 07 21:00:17 raspberrypi alexa[503]: script done
Nov 07 21:00:17 raspberrypi systemd[1]: Started LSB: Start daemon at boot time f
lines 1-13/13 (END)...skipping...
● alexa.service - LSB: Start daemon at boot time for alexa
   Loaded: loaded (/etc/init.d/alexa; generated; vendor preset: enabled)
   Active: active (exited) since Wed 2018-11-07 21:00:17 CET; 1min 34s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 503 ExecStart=/etc/init.d/alexa start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/alexa.service

Nov 07 20:59:54 raspberrypi systemd[1]: Starting LSB: Start daemon at boot time for alexa...
Nov 07 21:00:02 raspberrypi alexa[503]: Alexa starting
Nov 07 21:00:04 raspberrypi alexa[503]: Alexa is running PID 519
Nov 07 21:00:17 raspberrypi alexa[503]: script done
Nov 07 21:00:17 raspberrypi alexa[503]: script done
Nov 07 21:00:17 raspberrypi systemd[1]: Started LSB: Start daemon at boot time for alexa.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~


chmod hab ich natürlich ausgeführt

ja also ich werd das nochmal unter pi starten und mein script vom letzten mal verwenden...mal schauen was passiert
PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

freak4all

#3910
da stimmt noch was nicht
pi@raspberrypi:~ $ sudo chmod 755 /etc/init.d/alexa
pi@raspberrypi:~ $ sudo update-rc.d alexa defaults
pi@raspberrypi:~ $ sudo /etc/init.d/alexa start
-su: line 0: cd: /opt/fhem/alexa-fhem: No such file or directory
-su: /opt/fhem/log/alexa-2018-11.log: Permission denied
Alexa starting
Alexa is not running
script done
script done
pi@raspberrypi:~ $


manuell starten unter pi funktioniert aber
pi@raspberrypi:~ $ cd /home/pi/alexa-fhem
pi@raspberrypi:~/alexa-fhem $ ./bin/alexa
[2018-11-7 21:09:27] using /home/pi/.alexa/config.json
[2018-11-7 21:09:27] ---
[2018-11-7 21:09:27] this is alexa-fhem 0.4.4
[2018-11-7 21:09:27] Fetching FHEM devices...
[2018-11-7 21:09:27] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1541621367884
[2018-11-7 21:09:27] Server listening on: https://:::3000
[2018-11-7 21:09:27] [FHEM] Checking devices and attributes...
[2018-11-7 21:09:27] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22,%22userattr%22,%22%22)%7D&fwcsrf=csrf_166608315128457&XHR=1
[2018-11-7 21:09:27] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE=alexa&fwcsrf=csrf_166608315128457&XHR=1
[2018-11-7 21:09:27] [FHEM] Fetching FHEM devices...
[2018-11-7 21:09:27] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=alexa&fwcsrf=csrf_166608315128457&XHR=1
[2018-11-7 21:09:28] [FHEM] got: 3 results
[2018-11-7 21:09:28] [FHEM] homebridgeMapping: On=state,values=OFF:0;ON:1,cmdOff=OFF,cmdOn=ON
[2018-11-7 21:09:28] [FHEM] Flur_LED1 is switch
[2018-11-7 21:09:28] [FHEM] Flur_LED1 has
[2018-11-7 21:09:28] [FHEM]   On [state;ON,OFF]
[2018-11-7 21:09:28] [FHEM] { reading: 'state',
  values: [ 'OFF:0', 'ON:1' ],
  cmdOff: 'OFF',
  cmdOn: 'ON',
  device: 'Flur_LED1',
  informId: 'Flur_LED1-state',
  characteristic_type: 'On',
  log:
   { [Function: bound ]
     debug: [Function],
     info: [Function],
     warn: [Function],
     error: [Function],
     log: [Function],
     prefix: 'FHEM' },
  value2homekit: { OFF: '0', ON: '1' },
  value2homekit_re: [] }
  2018-11-07 21:09:28 caching: Flur_LED1-state: ON
[2018-11-7 21:09:28] [FHEM] homebridgeMapping: On=state,values=OFF:0;ON:1,cmdOff=OFF,cmdOn=ON
[2018-11-7 21:09:28] [FHEM] Flur_LED2 is switch
[2018-11-7 21:09:28] [FHEM] Flur_LED2 has
[2018-11-7 21:09:28] [FHEM]   On [state;ON,OFF]
[2018-11-7 21:09:28] [FHEM] { reading: 'state',
  values: [ 'OFF:0', 'ON:1' ],
  cmdOff: 'OFF',
  cmdOn: 'ON',
  device: 'Flur_LED2',
  informId: 'Flur_LED2-state',
  characteristic_type: 'On',
  log:
   { [Function: bound ]
     debug: [Function],
     info: [Function],
     warn: [Function],
     error: [Function],
     log: [Function],
     prefix: 'FHEM' },
  value2homekit: { OFF: '0', ON: '1' },
  value2homekit_re: [] }
  2018-11-07 21:09:28 caching: Flur_LED2-state: ON
[2018-11-7 21:09:28] [FHEM] MyAlexa: no service type detected
[2018-11-7 21:09:28] [FHEM] no device created for MyAlexa (alexa)
[2018-11-7 21:09:28] [FHEM] alexa device is MyAlexa
[2018-11-7 21:09:28] [FHEM] MyAlexa is switch
[2018-11-7 21:09:28] [FHEM] MyAlexa has
[2018-11-7 21:09:28] [FHEM] homebridgeMapping: #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

TargetPosition=verb=mach,articles=den;die,values=auf:100;zu:0
TargetPosition=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

TargetTemperature=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=grad

Volume:verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

#Weckzeit=verb=stelle,valuePrefix=auf;für,values=AMAZON.TIME,valueSuffix=uhr
[2018-11-7 21:09:28] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7BMyAlexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;%7B$defs%7BMyAlexa%7D-%3E%7B%22alexa-fhem%20version%22%7D%20=%20%220.4.4%22%7D;%7B$defs%7BMyAlexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&fwcsrf=csrf_166608315128457&XHR=1
[2018-11-7 21:09:28] perfectOfVerb:
[2018-11-7 21:09:28] { stelle: 'gestellt',
  schalte: 'geschaltet',
  'färbe': 'gefärbt',
  mach: 'gemacht' }
[2018-11-7 21:09:28] verbsOfIntent:
[2018-11-7 21:09:28] [ OnIntent: [ 'schalte' ],
  prozentIntent: [ 'stelle' ],
  HueIntent: [ 'stelle' ],
  HueIntentB: [ 'färbe' ],
  SaturationIntent: [ 'stelle' ],
  SaturationIntentB: [ 'sättige' ],
  TargetPositionIntent: [ 'mach' ],
  gradIntent: [ 'stelle' ] ]
[2018-11-7 21:09:28] characteristicsOfIntent:
[2018-11-7 21:09:28] { OnIntent: [ 'On' ],
  prozentIntent: [ 'Brightness', 'TargetPosition', 'Volume' ],
  HueIntent: [ 'Hue' ],
  HueIntentB: [ 'Hue' ],
  SaturationIntent: [ 'Saturation' ],
  SaturationIntentB: [ 'Saturation' ],
  TargetPositionIntent: [ 'TargetPosition' ],
  gradIntent: [ 'TargetTemperature' ] }
[2018-11-7 21:09:28] prefixOfIntent:
[2018-11-7 21:09:28] { OnIntent: undefined,
  prozentIntent: 'auf',
  HueIntent: 'auf',
  HueIntentB: undefined,
  SaturationIntent: 'auf',
  SaturationIntentB: undefined,
  TargetPositionIntent: undefined,
  gradIntent: 'auf' }
[2018-11-7 21:09:28] suffixOfIntent:
[2018-11-7 21:09:28] { OnIntent: undefined,
  prozentIntent: 'prozent',
  HueIntent: undefined,
  HueIntentB: undefined,
  SaturationIntent: undefined,
  SaturationIntentB: undefined,
  TargetPositionIntent: undefined,
  gradIntent: 'grad' }
[2018-11-7 21:09:28] alexaTypes:
[2018-11-7 21:09:28] { light: [ 'licht', 'lampen' ],
  blind:
   [ 'rolladen',
     'rolläden',
     'jalousie',
     'jalousien',
     'rollo',
     'rollos' ] }
[2018-11-7 21:09:28] roomOfEcho:
[2018-11-7 21:09:28] {}
[2018-11-7 21:09:28] fhemIntents:
[2018-11-7 21:09:28] { FHEMgutenMorgenIntent: 'gutenMorgen',
  FHEMguteNachtIntent: 'guteNacht' }
[2018-11-7 21:09:28] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7BMyAlexa%7D-%3E%7B%22active%22%7D%20=%201;;undef%7D;list%20MyAlexa%20.Alexa.Authorization;%7B$defs%7BMyAlexa%7D-%3E%7B%22active%22%7D%20=%200;;undef%7D&fwcsrf=csrf_166608315128457&XHR=1


Edit:

das script läuft, war nur der pfad anzupassen

pi@raspberrypi:~/alexa-fhem $ sudo /etc/init.d/alexa start
Alexa starting
Alexa is running PID 970
script done
script done
pi@raspberrypi:~/alexa-fhem $
PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

MadMax-FHEM

#3911
Pfade in deinem Script passen nicht...

Script startet /opt/fhem/alexa-fhem aber manuell startest du unter /home/pi/alexa-fhem

Und auch mal wie geschrieben den Logpfad im Script ändern auf /home/pi sonst kann User pi nicht schreiben...

Evtl. in Ruhe noch mal über alles drüber schauen... ;)

EDIT: und automatisch? Also nach/bei Boot...

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)

freak4all

soweit ist alles angepasst, log wird geschrieben und alexa-fhem startet nach script aufruf wie es soll.
nach dem reboot des pi mit "sudo reboot" wird aber trotzdem alexa-fhem nicht gestartet, jedenfalls tauchen meine beiden tasmota devices als offline auf. starte ich manuell und mache eine suche sind die geräte verfügbar. versteh das nicht, denn laut status läft das script doch nach dem start?!

sudo service alexa status
pi@raspberrypi:~ $ sudo service alexa status
● alexa.service - LSB: Start daemon at boot time for alexa
   Loaded: loaded (/etc/init.d/alexa; generated; vendor preset: enabled)
   Active: active (exited) since Wed 2018-11-07 21:37:03 CET; 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 501 ExecStart=/etc/init.d/alexa start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/alexa.service

Nov 07 21:36:47 raspberrypi systemd[1]: Starting LSB: Start daemon at boot time
Nov 07 21:36:47 raspberrypi alexa[501]: Alexa starting
Nov 07 21:36:50 raspberrypi alexa[501]: Alexa is running PID 519
Nov 07 21:37:03 raspberrypi alexa[501]: script done
Nov 07 21:37:03 raspberrypi alexa[501]: script done
Nov 07 21:37:03 raspberrypi systemd[1]: Started LSB: Start daemon at boot time f
lines 1-13/13 (END)...skipping...
● alexa.service - LSB: Start daemon at boot time for alexa
   Loaded: loaded (/etc/init.d/alexa; generated; vendor preset: enabled)
   Active: active (exited) since Wed 2018-11-07 21:37:03 CET; 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 501 ExecStart=/etc/init.d/alexa start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/alexa.service

Nov 07 21:36:47 raspberrypi systemd[1]: Starting LSB: Start daemon at boot time for alexa...
Nov 07 21:36:47 raspberrypi alexa[501]: Alexa starting
Nov 07 21:36:50 raspberrypi alexa[501]: Alexa is running PID 519
Nov 07 21:37:03 raspberrypi alexa[501]: script done
Nov 07 21:37:03 raspberrypi alexa[501]: script done
Nov 07 21:37:03 raspberrypi systemd[1]: Started LSB: Start daemon at boot time for alexa.

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

MadMax-FHEM

Eigenartig...

Was steht denn im alexa-fhem Log?

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)

freak4all

Kann ich dir erst morgen sagen, hab den PC jetzt aus. Irgendwo klemmt da noch was..., aber das wird schon. Bis morgen

Gesendet von meinem HTC U11 mit Tapatalk

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....