Ankündigung

Einklappen
Keine Ankündigung bisher.

Amazon Alexa Plugin

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Hallo,
    So, irgendwie komme ich hier nicht weiter. Ich bekomme in der Alexa App das Gerät welches ich in der Item Conf. angelegt habe nichgt zu gesicht. Wenn ich einen Test in der AWS umgebung mache kommt der folgende fehler: (IP - mit xx unkenntlich gemacht)
    Code:
    { "errorMessage": "connect ECONNREFUSED xx.xx.xx.xx:443", "errorType": "Error", "stackTrace": [ "Object.exports._errnoException (util.js:870:11)", "exports._exceptionWithHostPort (util.js:893:20)", "TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)" ] }
    Ich habe so das Gefühl das irgendwas mit meinem Port oder dem Verzeichnis nicht stimmt welches ich in der Lambda Funktion hinterlegt habe. Kann mir jemand mal nen Tipp geben?

    Also: Port 443 an Fritzbox weitergeleitet richtung Smarthome 443 -> Ist das richtig? Muss ich im Smarthome Server den Port noch irgendwo öffnen?
    Welchen Pfad muß ich der Funktion angeben?

    Danke für eure Hilfe.

    Kommentar


      Roho0303 wieso gehst du auf den https (443) port? Warum nicht einen unbelegten 4stelligen nehmen?
      den den du im plugin konfiguriert hast musst du nehmen..

      Kommentar


        Alexa hört standardmäßig auf 9000, du kannst also in der fritzbox einen beliebigen Port wie 8000 auf 9000 weiterleiten. aws muss dann auf 8000 connecten

        Kommentar


          hört sich übrigens an als hättest du keinen nginx installiert und hättest damit keine ssl Terminierung, sondern eine einfache Port Weiterleitung eingerichtet.
          aws braucht in der derzeitigen impl, und weil es security mäßig notwendig ist, einen ssl Endpunkt.
          durch eine Port Weiterleitung von Fritz auf smarthomeNG alexa hast du aber noch keinen ssl Endpunkt, nicht mal wenn du den Standard Port 443 von ssl für deine Port Weiterleitung Missbrauchst

          Kommentar


            hmmm ok, habe jetzt einen anderen Port genommen und den über die Fritzbox an den Smarthome Server geleitet.

            Fehler sieht jetzt so aus:
            Code:
             
             {   "errorMessage": "write EPROTO",   "errorType": "Error",   "stackTrace": [     "Object.exports._errnoException (util.js:870:11)",     "exports._exceptionWithHostPort (util.js:893:20)",     "WriteWrap.afterWrite (net.js:763:14)"   ] }
            In der Plugin Config habe ich wie folgt configuriert:

            Code:
            [alexa]
                class_name = Alexa
                class_path = plugins.alexa
            #   service_host = "0.0.0.0"
                service_port = 8089
            Noch ne Idee? Was ist der Pfad genau? ist der so korrekt? '/usr/local/smarthome'

            Kommentar


              Ok, dann schlage ich mich mal durch ngix... Ich dachte es wäre für den ersten Test nicht zwingend erforderlich...#

              Kommentar


                Also irgendwie bekomme ich es nicht auf die Reihe... :-(

                Ich habe jetzt alles angelegt, aber immer noch einen Fehler in AWS Console. Das einzige was nicht so richtig geklappt hat war das Anlegen des Zertifikates da hat certbot gemeckert.

                Noch jemand ne Idee?


                Code:
                Domain: xxxx.ddns.net
                   Type:   connection
                   Detail: Could not connect to xxx.ddns.net
                
                   To fix these errors, please make sure that your domain name was
                   entered correctly and the DNS A record(s) for that domain
                   contain(s) the right IP address. Additionally, please check that
                   your computer has a publicly routable IP address and that no
                   firewalls are preventing the server from communicating with the
                   client. If you're using the webroot plugin, you should also verify
                   that you are serving files from the webroot path you provided.

                Kommentar


                  Hmmm, wenn ich den Port in der Fritzbox als "Expended Host" freischalte dann sagt mir certbot das hier....


                  Code:
                  IMPORTANT NOTES:
                   - The following errors were reported by the server:
                  
                     Domain: xxxxxx.ddns.net
                     Type:   unauthorized
                     Detail: Invalid response from
                     http://xxxxxx.ddns.net/.well-known/acme-challenge/9aLgODwMqe-hyLgL0afwbU8ccUXez0F9IQiiaD9IdPE:
                     "<html>
                     <head><title>404 Not Found</title></head>
                     <body bgcolor="white">
                     <center><h1>404 Not Found</h1></center>
                     <hr><center>"
                  
                     To fix these errors, please make sure that your domain name was
                     entered correctly and the DNS A record(s) for that domain
                     contain(s) the right IP address.

                  Hier nochmal meine Config der your-home:



                  Code:
                  # Alexa
                  server {
                      listen 8089 ssl;
                      server_name xxxx.ddns.net;
                      access_log /var/log/nginx/alexa.log combined;
                      error_log /var/log/nginx/alexa.err debug;
                      auth_basic "Alexa";
                      auth_basic_user_file /etc/nginx/htpasswd.alexa;
                      include /etc/nginx/conf.d/common;
                  
                      location / {
                          proxy_pass http://192.168.178.168:8089/;
                          proxy_set_header Host $host;
                          proxy_set_header X-Real-IP $remote_addr;
                          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                      }
                  }

                  Kommentar


                    fehlt da die Freigabe des well-known dirs für das letsencrypt Challenge response Verfahrens?

                    Kommentar


                      Ansonsten ist "
                      Could not connect to xxx.ddns.net" doch sehr deutlich?

                      Kommentar


                        Code:
                        fehlt da die Freigabe des well-known dirs für das letsencrypt Challenge response Verfahrens?
                        Das kann sein, die frage ist nur wo setze ich hier welche freigabe?

                        Code:
                        Could not connect to xxx.ddns.net" doch sehr deutlich?
                        Sorry, aber für mich leider nicht, das sagt mir nur das es nicht funktioniert.

                        Also ich versuche mich dem Problem mal Schrittweise zu nähern:

                        1) Was genau für Portfreigaben sind erforderlich um ein Zertifikat zu erstellen? Ich habe ein bisschen rumgesucht und bin immer wieder darauf gestoßen das der Port 80 oder 443 auf der Fritzbox freigegeben sein muß? Und dann muß dieser auf den Webserver Port der Smartvisu zeigen? So das ich die Smartvisu aus dem Inetz ereichen kann?

                        Wenn ich also meine Visu aus dem Inet erreicbar mache, was ich grundsätzlich erstmal nicht möchte bekomme ich folgende Meldung:


                        Code:
                        Failed authorization procedure. xxx.ddns.net (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to xxx.ddns.net
                        
                        IMPORTANT NOTES:
                         - The following errors were reported by the server:
                        
                           Domain: xxx.ddns.net
                           Type:   connection
                           Detail: Could not connect to xxxx.ddns.net
                        
                           To fix these errors, please make sure that your domain name was
                           entered correctly and the DNS A record(s) for that domain
                           contain(s) the right IP address. Additionally, please check that
                           your computer has a publicly routable IP address and that no
                           firewalls are preventing the server from communicating with the
                           client. If you're using the webroot plugin, you should also verify
                           that you are serving files from the webroot path you provided.

                        2) Hier nochmal meine Configs, vielleicht ist auch hier ein Fehler drin:


                        Code:
                         
                         user www-data; worker_processes 2; pid /run/nginx.pid;  events {         worker_connections 768;         # multi_accept on; }  http {         sendfile on;         tcp_nopush on;         tcp_nodelay on;         keepalive_timeout 65;         types_hash_max_size 2048;         server_tokens off;          # server_names_hash_bucket_size 64;         # server_name_in_redirect off;          include /etc/nginx/mime.types;         default_type application/octet-stream;          ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE         ssl_prefer_server_ciphers on;          access_log /var/log/nginx/access.log;         error_log /var/log/nginx/error.log;          gzip on;         gzip_disable "msie6";          # gzip_vary on;         # gzip_proxied any;         # gzip_comp_level 6;         # gzip_buffers 16 8k;         # gzip_http_version 1.1;         # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;          # include /etc/nginx/conf.d/*.conf;         include /etc/nginx/sites-enabled/*; }
                        Code:
                        # letsencrypt shizzle
                        ssl_certificate /etc/letsencrypt/live/xxx.ddns.net/fullchain.pem;
                        ssl_certificate_key /etc/letsencrypt/live/xxx.ddns.net/privkey.pem;
                        
                        ssl_stapling on;
                        ssl_stapling_verify on;
                        
                        # maintain the .well-known directory alias for letsencrypt & renewals
                        location /.well-known {
                          auth_basic off;
                          alias /var/www/.well-known;
                        }


                        Code:
                         SSL-Redirect & LetsEncrypt Endpoint
                        server {
                                listen 8089 default_server;
                        
                                # redirect every requested $host (any, even invalid ones) to its SSL URL
                                location / {
                                        return 301 https://$host$request_uri;
                                }
                        
                                # LetsEncrypt Endpoint
                                location /.well-known {
                                  allow all;
                                  alias /var/www/.well-known;
                                }
                        }
                        
                        # Sitemap
                        server {
                                listen 8089 ssl default_server;
                        
                                access_log /var/log/nginx/sitemap.log combined;
                                auth_basic "Alexa";
                                auth_basic_user_file /etc/nginx/htpasswd;
                                include /etc/nginx/include.d/common;
                        
                                #add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
                        
                                location / {
                                        root /var/www/sitemap;
                                        index index.html;
                                }
                        }
                        
                        # Alexa
                        server {
                                listen 8089  ssl;
                                server_name xxx.ddns.net;
                                access_log /var/log/nginx/alexa.log combined;
                                auth_basic "Alexa";
                                auth_basic_user_file /etc/nginx/htpasswd.alexa;
                                include /etc/nginx/include.d/common;
                        
                                location / {
                                        proxy_pass http://192.168.178.168:8089/;
                                        proxy_set_header Host $host;
                                        proxy_set_header X-Real-IP $remote_addr;
                                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                                }
                        }
                        
                        # ANOTHER-SERVICE.YOUR-HOME.DYNDNS.TLD

                        Sie Sitemap habe ich nicht erstellt....

                        Kommentar


                          Nur im sicherzugehen, du kennst ddns.net und andere dynamische dns Dienste und schreibst hier nur xxx.ddns.net weil du den vollen hostname hier im Forum nicht nennen willst - ODER?

                          Kommentar


                            So ist es. xxxx ist ein Platzhalter. Generell ist es aber so das meine ddns Adresse erstmal nicht genutzt wird um mein Smarthome fernzusteuern. Ich habe also keine weiterleitung von Port 80 auf meinen internen smartvisu webserver port (8085). Ich habe nun lediglich eine Weiterleitung des Ports 8089 an der fritz box auf den Port 8089 in meinem Smarthome Server (diesen habe ich dann in der Alexa Plugin config angepasst.) -> Aber soweit komme ich ja gar nicht...


                            Code:
                               
                            [alexa]
                                class_name = Alexa
                                class_path = plugins.alexa
                            #   service_host = "0.0.0.0"
                                service_port = 8089

                            Kommentar


                              Für letsencrypt musst du zumindest temporär auf den Port des Webserver weiterleiten.
                              Und zwar wahrscheinlich die Standard Ports. Also z.B. von Port 80 auf 8085 und Port 443 auf den ssl Port deines Webserver

                              Kommentar


                                Habe jetzt beide Ports freigegeben als die 80 auf dei 8085 und die 443 auf die 443. Leider kommt der gleiche Fehler:

                                Code:
                                - The following errors were reported by the server:
                                
                                   Domain: xxxx.ddns.net
                                   Type:   unauthorized
                                   Detail: Invalid response from
                                   http://xxxx.ddns.net/.well-known/acme-challenge/0mw_Hd04mUcOuo8n2dij-TuwbWb1cj5Yypba0-P1OQw:
                                   "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
                                   <html><head>
                                   <title>404 Not Found</title>
                                   </head><body>
                                   <h1>Not Found</h1>
                                   <p"
                                
                                   To fix these errors, please make sure that your domain name was
                                   entered correctly and the DNS A record(s) for that domain
                                   contain(s) the right IP address.

                                Ich frage mich wie genau diese ACME-Challenge funktioniert. Weil es gibt das Verzeichnis nicht wirklich bei mir auf dem Server. Hier ist nach http://xxxx.ddns.net/.well-known/... Schluß.

                                Kommentar

                                Lädt...
                                X