Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Problemlösungen und Hinweise von allgemeinem Interesse zur Haussteuerung mit HomeMatic

Moderator: Co-Administratoren

Benutzeravatar
blackhole
Beiträge: 3730
Registriert: 21.07.2015, 14:03
System: CCU
Hat sich bedankt: 184 Mal
Danksagung erhalten: 587 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von blackhole » 02.02.2024, 12:16

Aktualisiertes "Lötzimmer-Skript" verfügbar

Alex Noack hat das Lötzimmer-Skript (alexa_remote_control.sh) aktualisiert:
Alex Noack hat geschrieben:
2024-02-01: v0.21b
  • changed the output of -lastalexa back to the output of devicelist.txt

Die Vorgehensweise, zur Aktualisierung der Alexa.sh/CCU-Installation auf die neue Lötzimmer-Skript-Version, ist im Abschnitt "Update des Lötzimmer-Skripts" der Anleitung beschrieben.

  • Prüfen des Lötzimmer-Skripts auf Aktualität:

    Code: Alles auswählen

    /usr/local/addons/alexa/alexa.sh --check-arc
  • Update des Lötzimmer-Skripts:

    Code: Alles auswählen

    /usr/local/addons/alexa/alexa.sh --update-arc

daniello08
Beiträge: 1
Registriert: 10.02.2024, 20:26
System: CCU und Access Point
Hat sich bedankt: 1 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von daniello08 » 10.02.2024, 20:37

Hi, PN kriege ich iwi nicht hin. Ich hätte gern das tar.gz für die CCU3 3.73.9. Danke sehr.

Benutzeravatar
Roland M.
Beiträge: 9806
Registriert: 08.12.2012, 15:53
System: CCU
Wohnort: Graz, Österreich
Hat sich bedankt: 252 Mal
Danksagung erhalten: 1381 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von Roland M. » 10.02.2024, 21:09

Hallo und willkommen im Forum!
daniello08 hat geschrieben:
10.02.2024, 20:37
PN kriege ich iwi nicht hin.
Wenn du diese Zeilen liest, sind auch die PN bei dir freigeschaltet! ;)


Roland
Zur leichteren Hilfestellung bitte unbedingt beachten:
  • Bezeichnung (HM-... bzw. HmIP-...) der betroffenen Geräte angeben (nicht Artikelnummer)
  • Kurzbeschreibung des Soll-Zustandes (Was soll erreicht werden?)
  • Kurzbeschreibung des Ist-Zustandes (Was funktioniert nicht?)
  • Fehlermeldungen genau abschreiben, besser noch...
  • Screenshots von Programmen, Geräteeinstellungen und Fehlermeldungen (direkt als jpg/png) einstellen!

-----------------------------------------------------------------------
1. CCU2 mit ~100 Geräten (in Umstellung auf RaspberryMatic-OVA auf Proxmox-Server)
2. CCU2 per VPN mit ~50 Geräten (geplant: RaspberryMatic auf Charly)
3. CCU2 per VPN mit ~40 Geräten (geplant: RaspberryMatic auf CCU3)
CCU1, Test-CCU2, Raspi 1 mit kleinem Funkmodul, RaspberryMatic als VM unter Proxmox, Access Point,...

OrlandoGardiner
Beiträge: 10
Registriert: 07.12.2018, 12:09
Hat sich bedankt: 1 Mal
Danksagung erhalten: 1 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von OrlandoGardiner » 17.02.2024, 22:30

Hej blackhole,
script gibt komischerweise nichts auf der Alexa aus. Eine Variable löst als Trigger folgendes Script aus:

Code: Alles auswählen

string echodevice = "Alexa";
string message = dom.GetObject(ID_SYSTEM_VARIABLES).Get("Alexa_TTS_Text").Value();
system.Exec("/usr/local/addons/alexa/alexa.sh -d '" #echodevice.ToUTF8() #"' -e speak:'" #message.ToUTF8() #"' &");


Alexa bleibt jedoch stumm und gibt nicht einen Mucks von sich. Hier die gewünschten logs:

Code: Alles auswählen

root@RaspberryMatic:~# ls -la /tmp/.alexa*
-rw-rw-r--    1 root     root            61 Feb 17 22:24 /tmp/.alexa.activity.csrf
-rw-rw-r--    1 root     root         11325 Feb 17 22:24 /tmp/.alexa.activity.json
-rw-rw-r--    1 root     root           882 Feb 17 22:00 /tmp/.alexa.cookie
-rw-rw-r--    1 root     root          1103 Feb 17 22:00 /tmp/.alexa.cookie.json
-rw-rw-r--    1 root     root         13421 Feb 17 22:00 /tmp/.alexa.devicelist.json
-rw-rw-r--    1 root     root          1537 Feb 17 22:00 /tmp/.alexa.devicelist.txt
-rw-rw-r--    1 root     root             0 Feb 17 22:00 /tmp/.alexa.devicelist_wha.txt
root@RaspberryMatic:~# ls -la /usr/local/addons/
total 984
drwxr-xr-x    9 root     root          4096 Feb 17 20:59 .
drwxr-xr-x   10 root     root          4096 Feb  6 07:56 ..
drwx------    3 root     root          4096 Feb 17 21:59 alexa
-rw-r--r--    1 root     root        968582 Feb 17 20:59 alexa-5.11.tar.gz
drwxr-xr-x    5 root     root          4096 Feb 17 21:22 cuxd
drwxr-xr-x    3 root     root          4096 Feb  8 20:37 hap-homematic
drwxrwxr-x    3 root     root          4096 Feb  6 08:20 hvl
drwxr-xr-x    5 root     root          4096 Jun 14  2018 jq
drwxr-xr-x   12 root     root          4096 Mar 13  2021 redmatic
drwxr-xr-x    6 root     root          4096 Feb 25  2021 rmupdate
root@RaspberryMatic:~# ls -la /usr/local/addons/alexa/
total 1668
drwx------    3 root     root          4096 Feb 17 21:59 .
drwxr-xr-x    9 root     root          4096 Feb 17 20:59 ..
-rw-------    1 root     root          2400 Jun 21  2023 alexa.conf
-rwxr-xr-x    1 root     root         16651 Jun 21  2023 alexa.sh
-rwxr-xr-x    1 root     root          3486 Feb 17 21:59 alexa_remote_control.conf
-rwxr-xr-x    1 root     root         52304 Feb 17 21:12 alexa_remote_control.sh
-rwxr-xr-x    1 root     root         34484 Jun 21  2023 base64
-rw-------    1 root     root        226639 Feb 17 21:49 cacert.pem
-rwxr-xr-x    1 root     root        923164 May 23  2022 iconv
-rwxr-xr-x    1 root     root        269108 Sep 26  2021 jq
drwx------    2 root     root          4096 Jun 21  2023 legal
-rwxr-xr-x    1 root     root        149436 Sep 26  2021 oathtool
root@RaspberryMatic:~# /usr/local/addons/alexa/alexa.sh --version
Alexa.sh script and package v5.11
Alexa remote control script v0.21b
root@RaspberryMatic:~# /usr/local/addons/alexa/alexa.sh --check-cookie
the following devices exist in your account:
Bad
Fitnessraum
Phoebe
Phillip
PLAY5
Küche
Gästezimmer
Enjoy the silence
Esszimmer
Sonos
Schlafzimmer
Soundbar
Sonos Roam
Alexa
This Device

Cookie is good - nothing to do.
Same date and time found in CCU system variable - nothing to do.

Cookie file: 17.02.2024 22:00 Uhr
Device list: 17.02.2024 22:00 Uhr

Benutzeravatar
blackhole
Beiträge: 3730
Registriert: 21.07.2015, 14:03
System: CCU
Hat sich bedankt: 184 Mal
Danksagung erhalten: 587 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von blackhole » 18.02.2024, 10:43

Test der Sprachausgabe auf Echo Device "Esszimmer" via Shell, unter Umgehung möglicher HM-Fehlerquellen:

Code: Alles auswählen

/usr/local/addons/alexa/alexa.sh -d "Esszimmer" -e speak:"Test"

OrlandoGardiner
Beiträge: 10
Registriert: 07.12.2018, 12:09
Hat sich bedankt: 1 Mal
Danksagung erhalten: 1 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von OrlandoGardiner » 18.02.2024, 13:49

Bleibt still, obwohl Befehl gefeuert wird.

Code: Alles auswählen

root@RaspberryMatic:~# /usr/local/addons/alexa/alexa.sh -d "Alexa" -e speak:"Test"
sending cmd:speak:Test to dev:Alexa type:AIPK7MM90V7TB serial:G0B1GB061506020N customerid:A3IWG3CIIMB1PT

Benutzeravatar
blackhole
Beiträge: 3730
Registriert: 21.07.2015, 14:03
System: CCU
Hat sich bedankt: 184 Mal
Danksagung erhalten: 587 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von blackhole » 18.02.2024, 14:22

Was ist "Alexa" für ein Gerät?
Klappt es mit dem Gerät namens "Esszimmer"?
Welche SPEAKVOL ist konfiguriert?

Führe eigenständig weitere Tests durch, liefere Ergebnisse und genaue Infos zu den involvierten Geräten.

OrlandoGardiner
Beiträge: 10
Registriert: 07.12.2018, 12:09
Hat sich bedankt: 1 Mal
Danksagung erhalten: 1 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von OrlandoGardiner » 18.02.2024, 15:06

Das sind alles keine Alexa Geräte sondern Sonos Lautsprecher. Adressiere ich an jene, passiert ebenfalls nicht. Läuft Musik, wird diese lauter, aber eine Sprachausgabe erfolgt ebenfalls nicht.

Code: Alles auswählen

root@RaspberryMatic:~# /usr/local/addons/alexa/alexa.sh -d "Esszimmer" -e speak:"Test"
sending cmd:speak:Test to dev:Esszimmer type:A15ERDAKK5HQQG serial:4a400312e20a49e7a646afaa003cb5df customerid:A3IWG3CIIMB1PT

Code: Alles auswählen

root@RaspberryMatic:~# /usr/local/addons/alexa/alexa.sh -d "PLAY5" -e speak:"Test"
sending cmd:speak:Test to dev:PLAY5 type:A15ERDAKK5HQQG serial:26201f741bb449498376b4e73bfda032 customerid:A3IWG3CIIMB1PT

Benutzeravatar
blackhole
Beiträge: 3730
Registriert: 21.07.2015, 14:03
System: CCU
Hat sich bedankt: 184 Mal
Danksagung erhalten: 587 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von blackhole » 18.02.2024, 15:10

OrlandoGardiner hat geschrieben:
18.02.2024, 15:06
Das sind alles keine Alexa Geräte sondern Sonos Lautsprecher

Wie lautet die Überschrift von diesem Thread?

OrlandoGardiner
Beiträge: 10
Registriert: 07.12.2018, 12:09
Hat sich bedankt: 1 Mal
Danksagung erhalten: 1 Mal

Re: Alexa.sh v5.11 (stable) - Sprachausgabe und Fernsteuerung für Amazon Echo

Beitrag von OrlandoGardiner » 18.02.2024, 15:24

Du hast geschrieben "Esszimmer" :D

Das einzige Echo Show Gerät ist "Alexa". FireOS 7.5.6.2 (PS7561/3854).

Habe jetzt die tmp-Files gelöscht und per renew erneuert. Nun kommt beim Versuch, Alexa zum sprechen zu bringen ein Fehler:

Code: Alles auswählen

root@RaspberryMatic:~# /usr/local/addons/alexa/alexa.sh --renew-tmpfiles
cookie does not exist. logging in ...
device list does not exist. downloading ...
the following devices exist in your account:
Bad
Fitnessraum
Phoebe
Phillip
PLAY5
Kueche
Gästezimmer
Enjoy the silence
Esszimmer
Sonos
Schlafzimmer
Soundbar
Sonos Roam
Alexa
This Device

Cookie is good - nothing to do.
Push date and time or error message to CCU system variable.

Cookie file: 18.02.2024 15:22 Uhr
Device list: 18.02.2024 15:22 Uhr
root@RaspberryMatic:~# /usr/local/addons/alexa/alexa.sh -d "Alexa" -e speak:"Achtung, Achtung. Dies ist ein Test"
sending cmd:speak:Achtung, Achtung. Dies ist ein Test to dev:Alexa type:AIPK7MM90V7TB serial:G0B1GB061506020N customerid:A3IWG3CIIMB1PT
cut: /tmp/.alexa.volume.G0B1GB061506020N: No such file or directory

Antworten

Zurück zu „HomeMatic Tipps & Tricks - keine Fragen!“