Hauptmenü

Neueste Beiträge

#11
FHEMWEB / Aw: Neuer Style: f18
Letzter Beitrag von schwatter - 25 April 2026, 18:54:52
@Rudi
Ich habe f18_resize() noch einmal angepasst, sodass showMicro und showSpeaker immer an der richtigen Stelle positioniert werden.
Den Download im vorherigen Post habe ich entsprechend aktualisiert.

Könntest du dir das bitte ansehen und kurz bewerten, ob die Lösung sinnvoll ist?
Leider verhindert die Browser-Policy, dass man das generell erlauben kann. Bzw. Spam- bzw. Missbrauchsabwehr.


Gruß schwatter
#12
Sprachsteuerung / Aw: (WIP) FHEMWEB interaktiv (...
Letzter Beitrag von schwatter - 25 April 2026, 18:46:47
Zitat von: Beta-User am 21 April 2026, 07:23:50@schwatter: Ich würde mir sowas auch für die "Text2Speech-Automatik" aus https://forum.fhem.de/index.php?msg=1362354 wünschen. Den zugehörigen Code sehe ich mir bei Gelegenheit an (ein angehängtes diff wäre evtl. hilfreich, um sich direkt in die Materie reinzudenken), und habe auch noch nicht verstanden, warum man das nicht per notify aus FHEM heraus macht.

Nabend,

mein Server steht im Keller und an dem ist mit bluealsa ein Bluetoothspeaker gepairt. Was ist aber, wenn nur das Tablet mit
Browser da ist. Damit kann Audio abgespielt werden, ohne das mir das Audiodevice bekannt ist.
Oder ist dir ein Weg mit notify bekannt, mit dem die direkt in Fhem Audio abspielen kannst, ohne das du ein Audiodevice
definiert hast?

--- /tmp/f18.js 2026-04-25 18:34:22.000000000 +0200
+++ /opt/fhem/www/pgm2/f18.js 2026-04-23 12:57:49.000000000 +0200
@@ -1,5 +1,5 @@
 "use strict";
-FW_version["f18.js"] = "$Id$";
+FW_version["f18.js"] = "$Id: f18.js 31043 2026-03-28 19:41:39Z rudolfkoenig $";
 
 // TODO: hierMenu+Pin,SVGcolors,floorplan
 // Known bugs: AbsSize is wrong for ColorSlider
@@ -18,7 +18,9 @@
               menu:   "111111", sel:   "333333", inpBack:"444444" }
 };
 var f18_isday;
+window.f18_playMedia_active = false;
 
+$(window).on('load', function() {$('body').css('opacity', 1);});
 $(window).resize(f18_resize);
 $(document).ready(function(){
   f18_room  = $("div#content").attr("room");
@@ -115,11 +117,16 @@
   $("<div id='micro'></div>").prependTo("div#menuScrollArea")
     .css( {"background-image":"url('"+f18_icon.micro+"')", "cursor":"pointer" })
     .click(f18_stt);
+   
+  // Innerhalb von f18_menu()
+  $("<div id='speaker'></div>").prependTo("div#menuScrollArea")
+    .css( {"background-image":"url('"+f18_icon.speaker+"')", "cursor":"pointer" })
+    .click(f18_playMedia);
 
   $("div#menu").prepend("<div></div>");
   f18_addPin("div#menu > div:first", "menu", true, fixMenu, f18_small);
   setTimeout(function(){
-        $("#menu,#content,#logo,#hdr,#menuBtn,#textInput,#micro")
+        $("#menu,#content,#logo,#hdr,#menuBtn,#textInput,#micro,#speaker")
         .addClass("animated"); }, 10);
   function
   fixMenu()
@@ -130,6 +137,8 @@
         f18_getAttr("hideMenu") ? "none" : "block");
     $("#micro").css("display",
         f18_getAttr("showMicro") ? "block" : "none");
+    $("#speaker").css("display",
+        f18_getAttr("showSpeaker") ? "block" : "none");
     if(f18_getAttr("Pinned.menu")) {
       $("body").addClass("pinnedMenu");
       $("#menu").removeClass("hidden");
@@ -152,25 +161,17 @@
 
   var stt = new SpeechRecognition();
   stt.continuous = true;
-  stt.interimResults = true;
   stt.lang = $("body").attr("data-language") == "EN" ? "en-US":"de-DE";
 
   var doSend = false;
-  var txt='';
+  var txt;
 
   stt.onresult = function(e){
-    var interim_txt='';
-    for(let r of e.results) {
-      if(r.isFinal) {
-        txt = r[0].transcript;
-        $("#f18_stt").html(txt);
-      } else {
-        interim_txt += r[0].transcript;
-        $("#f18_stt").html(interim_txt);
-      }
-    }
+    txt='';
+    for(var i1=0; i1<event.results.length; i1++)
+      txt += event.results[i1][0].transcript;
+    $("#f18_stt").html(txt);
   };
-
   stt.onaudiostart = function(e){ $("#stt_state").html("Audio started") };
   stt.onaudioend   = function(e){ $("#stt_state").html("Audio stopped") };
   stt.onspeechstart= function(e){ $("#stt_state").html("Speech started") };
@@ -181,10 +182,8 @@
 
   $("#FW_okDialog").remove();
   var div = $("<div id='FW_okDialog'>");
-  $(div).html(`<div id="stt_avl"></div>
-               <div id="stt_state"></div>
-               <div id="f18_stt" style="min-height:200px;min-width:200px">
-               </div>`);
+  $(div).html('<div id="stt_state"></div><div id="f18_stt" '+
+              'style="min-height:200px;min-width:200px"></div>');
   $("body").append(div);
   var oldPos = $("body").scrollTop();
   $(div).dialog({
@@ -196,31 +195,58 @@
     ],
     close:function(){
       if(doSend && txt) {
-        var fw_id = $("body").attr("fw_id");
-        if(typeof fully !== 'undefined')
+         if(typeof fully !== 'undefined')
            FW_cmd(FW_root + "?cmd=set TYPE=FULLY:FILTER=deviceid=" +
                   fully.getDeviceId()+" STTinput "+encodeURIComponent(txt)+
-                  " ["+fw_id+"]&XHR=1");
+                  " ["+$("body").attr("fw_id")+"]&XHR=1");
   
-        FW_cmd(`${FW_root}?cmd=setreading `+
-               `TYPE=FHEMWEB:FILTER=FW_ID=${fw_id}:FILTER=inform=.%2B `+
-               `STT ${encodeURIComponent(txt)}&XHR=1`);
+        FW_cmd(FW_root+"?cmd=setreading "+f18_webName+
+               " STT "+encodeURIComponent(txt)+"&XHR=1");
       }
       stt.stop();
       $(div).remove();
     }
   });
-}
 
-function
-f18_speak(txt)
-{
-  let synth = window.speechSynthesis;
-  if(!synth)
-    return FW_okDialog("No speechSynthesis available");
-  speechSynthesis.speak(new SpeechSynthesisUtterance(txt));
 }
 
+(function() {
+    const _old = FW_doUpdate;
+    FW_doUpdate = (evt) => {
+        _old(evt);
+
+        if (evt?.data && evt.data.includes("-lastFilename")) {
+            try {
+                const match = evt.data.match(/[^"]+-lastFilename","([^"]+)"/);
+                const path = match ? match[1] : null;
+
+                if (window.f18_playMedia_active && path) {
+                    _f18_play(path);
+                }
+            } catch (e) {
+                console.error("f18-Media-Fehler:", e);
+            }
+        }
+    };
+})();
+
+const _f18_play = (path) => {
+    const url = window.location.origin + path.replace("/opt/fhem/www", "/fhem").replace(/^\.\//, "/fhem/");
+    new Audio(url).play().catch(console.error);
+};
+
+function f18_playMedia() {
+    window.f18_playMedia_active = !window.f18_playMedia_active;
+    const s = document.getElementById("speaker");
+   
+    if (s) {
+        s.style.filter = window.f18_playMedia_active
+            ? "invert(36%) sepia(85%) saturate(760%) hue-rotate(85deg) brightness(90%) contrast(105%)"
+            : "none";
+    }
+   
+    if (window.f18_playMedia_active) new Audio().play().catch(() => {});
+}
 
 function
 f18_serviceWorkerRegister(verbose)
@@ -566,6 +592,7 @@
       $("div.pinHeader div.pin").css("display", c ? "none":"block");
     });
     addHider("showMicro", true, "STT", f18_menu);
+    addHider("showSpeaker", true, "Speaker", f18_menu);
     addHider("fixedInput", false, "Fixed input and menu", f18_setFixedInput);
     addHider("wrapcolumns",false,"Wrap columns<br>on small screen",
                         f18_setWrapColumns);
@@ -633,18 +660,20 @@
       pm = f18_getAttr("Pinned.menu") || hm,
       rm = (f18_getAttr("rightMenu") && f18_small),
       sm = f18_getAttr("showMicro"),
+      sp = f18_getAttr("showSpeaker"),
       hti = f18_getAttr("hideTextInput");
 
   var left = 0;
   left += hl ? 0 : 40;
-  left += sm ? 28 : 0;
+  if (sm && sp) left += 56;
+  else if (sm || sp) left += 28;
   left += pm ? 0 : 44;
   left += hti ? 0 : 40;
   var lleft = (pm || hl ? 10 : 52);
   $("input.maininput").css({ width:(w-left-(FW_isiOS ? 36 : 24))+'px',
                              "margin-left":(rm ? "0px" : "10px"),
                              display: hi ? "none":"block"});
-  $("#menu,#content").css("top", (hi && pm && hl && hti && !sm) ? "10px" : "50px");
+  $("#menu,#content").css("top", (hi && pm && hl && hti && !sm && !sp) ? "10px" : "50px");
   $("#hdr").css({ left:(rm ? 10 : left)+'px' });
   $("#textInput").css({ left: (rm ? "auto":(left-32)+"px"),
                         right:(rm ? (lleft+32)+"px":"auto"),
@@ -652,8 +681,8 @@
   $("#menuBtn").toggle(!pm || f18_small);
   $("#menuBtn").css({ left:rm ? "auto":"10px",  right:rm ? "10px":"auto" });
   $("#logo")   .css({ left:rm ? "auto":lleft ,  right:rm ? "48px":"auto" });
-  $("#micro")  .css({ left:rm ? "auto":(lleft+32)+"px",
-                     right:rm ? (lleft+64)+"px":"auto" });
+  $("#micro").css({left:rm?"auto":(lleft+32)+"px",right:rm?(lleft+64)+"px":"auto",display:sm?"block":"none"});
+  $("#speaker").css({left:rm?"auto":(sm?(lleft+64):(lleft+32))+"px",right:rm?(sm?(lleft+128):(lleft+64))+"px":"auto",display:sp?"block":"none"}); 
   $("#menu").css({ display: (hm ? "none":"block") });
   if(FW_isiOS)
     $("#logo,#menuBtn").css({ top:'12px'});
@@ -1057,12 +1086,13 @@
   // font-awesome: txInp:plus-square
   var prf='data:image/svg+xml;utf8,<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path fill="gray" d="';
   var sfx='"/></svg>';
-  f18_icon.pinIn  = prf+'M 896 1088q66 0 128-15v655q0 26-19 45t-45 19h-128q-26 0-45-19t-19-45v-655q62 15 128 15zm0-1088q212 0 362 150t150 362-150 362-362 150-362-150-150-362 150-362 362-150zm0 224q14 0 23-9t9-23-9-23-23-9q-146 0-249 103t-103 249q0 14 9 23t23 9 23-9 9-23q0-119 84.5-203.5t203.5-84.5z'+sfx;
-  f18_icon.burger = prf+'M 1664 1344v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45z'+sfx;
-  f18_icon.arrows = prf+'M 1792 896q0 26-19 45l-256 256q-19 19-45 19t-45-19-19-45v-128h-384v384h128q26 0 45 19t19 45-19 45l-256 256q-19 19-45 19t-45-19l-256-256q-19-19-19-45t19-45 45-19h128v-384h-384v128q0 26-19 45t-45 19-45-19l-256-256q-19-19-19-45t19-45l256-256q19-19 45-19t45 19 19 45v128h384v-384h-128q-26 0-45-19t-19-45 19-45l256-256q19-19 45-19t45 19l256 256q19 19 19 45t-19 45-45 19h-128v384h384v-128q0-26 19-45t45-19 45 19l256 256q19 19 19 45z'+sfx;
-  f18_icon.ban    = prf+'M 1440 893q0-161-87-295l-754 753q137 89 297 89 111 0 211.5-43.5t173.5-116.5 116-174.5 43-212.5zm-999 299l755-754q-135-91-300-91-148 0-273 73t-198 199-73 274q0 162 89 299zm1223-299q0 157-61 300t-163.5 246-245 164-298.5 61-298.5-61-245-164-163.5-246-61-300 61-299.5 163.5-245.5 245-164 298.5-61 298.5 61 245 164 163.5 245.5 61 299.5z'+sfx;
-  f18_icon.txInp  = prf+'M 1302,839 V 939 c 0,19 -15,37 -36,37 H 993 v 277 c 0,19 -15,37 -36,37 H 856 c -20,0 -36,-15 -36,-37 V 977 H 546 c -20,0 -36,-15 -36,-37 V 839 c 0,-19 15,-37 36,-37 H 818 V 521 c 0,-19 15,-37 36,-37 h 97 c 20,0 36,15 36,37 V 798 H 1261 c 20,0 36,15 36,37 z M 1600,331 V 1447 c 0,83 -65,151 -148,151 H 360 C 277,1600 212,1532 212,1448 V 331 C 212,246 277,180 360,180 H 1450 c 81,0 147,66 147,151 z M 1450,1428 V 350 c 0,-8 -7,-17 -17,-17 H 379 c -9,0 -17,7 -17,17 V 1428 c 0,8 7,17 17,17 H 1431 c 9,0 17,-7 17,-17 z'+sfx;
-  f18_icon.micro  = prf+'M 840 1324 c -298 0 -542 -243 -542 -542 c 0 -31 25 -57 57 -57 c 31 0 57 25 57 57 C 413 1017 604 1209 840 1209 c 235 0 426 -191 426 -426 c 0 -31 25 -57 57 -57 s 57 25 57 57 C 1382 1081 1138 1324 840 1324 z M 840 1133 L 840 1133 c -191 0 -349 -157 -349 -349 V 349 C 490 157 648 0 840 0 h 0 c 191 0 349 157 349 349 v 435 C 1189 976 1031 1133 840 1133 z M 840 1665 c -31 0 -57 -25 -57 -57 V 1281 c 0 -31 25 -57 57 -57 c 31 0 57 25 57 57 v 325 C 897 1639 871 1665 840 1665 z M 1035 1680 H 644 c -31 0 -57 -25 -57 -57 s 25 -57 57 -57 h 390 c 31 0 57 25 57 57 S 1067 1680 1035 1680 z'+sfx;
+  f18_icon.pinIn   = prf+'M 896 1088q66 0 128-15v655q0 26-19 45t-45 19h-128q-26 0-45-19t-19-45v-655q62 15 128 15zm0-1088q212 0 362 150t150 362-150 362-362 150-362-150-150-362 150-362 362-150zm0 224q14 0 23-9t9-23-9-23-23-9q-146 0-249 103t-103 249q0 14 9 23t23 9 23-9 9-23q0-119 84.5-203.5t203.5-84.5z'+sfx;
+  f18_icon.burger  = prf+'M 1664 1344v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45z'+sfx;
+  f18_icon.arrows  = prf+'M 1792 896q0 26-19 45l-256 256q-19 19-45 19t-45-19-19-45v-128h-384v384h128q26 0 45 19t19 45-19 45l-256 256q-19 19-45 19t-45-19l-256-256q-19-19-19-45t19-45 45-19h128v-384h-384v128q0 26-19 45t-45 19-45-19l-256-256q-19-19-19-45t19-45l256-256q19-19 45-19t45 19 19 45v128h384v-384h-128q-26 0-45-19t-19-45 19-45l256-256q19-19 45-19t45 19l256 256q19 19 19 45t-19 45-45 19h-128v384h384v-128q0-26 19-45t45-19 45 19l256 256q19 19 19 45z'+sfx;
+  f18_icon.ban     = prf+'M 1440 893q0-161-87-295l-754 753q137 89 297 89 111 0 211.5-43.5t173.5-116.5 116-174.5 43-212.5zm-999 299l755-754q-135-91-300-91-148 0-273 73t-198 199-73 274q0 162 89 299zm1223-299q0 157-61 300t-163.5 246-245 164-298.5 61-298.5-61-245-164-163.5-246-61-300 61-299.5 163.5-245.5 245-164 298.5-61 298.5 61 245 164 163.5 245.5 61 299.5z'+sfx;
+  f18_icon.txInp   = prf+'M 1302,839 V 939 c 0,19 -15,37 -36,37 H 993 v 277 c 0,19 -15,37 -36,37 H 856 c -20,0 -36,-15 -36,-37 V 977 H 546 c -20,0 -36,-15 -36,-37 V 839 c 0,-19 15,-37 36,-37 H 818 V 521 c 0,-19 15,-37 36,-37 h 97 c 20,0 36,15 36,37 V 798 H 1261 c 20,0 36,15 36,37 z M 1600,331 V 1447 c 0,83 -65,151 -148,151 H 360 C 277,1600 212,1532 212,1448 V 331 C 212,246 277,180 360,180 H 1450 c 81,0 147,66 147,151 z M 1450,1428 V 350 c 0,-8 -7,-17 -17,-17 H 379 c -9,0 -17,7 -17,17 V 1428 c 0,8 7,17 17,17 H 1431 c 9,0 17,-7 17,-17 z'+sfx;
+  f18_icon.micro   = prf+'M 840 1324 c -298 0 -542 -243 -542 -542 c 0 -31 25 -57 57 -57 c 31 0 57 25 57 57 C 413 1017 604 1209 840 1209 c 235 0 426 -191 426 -426 c 0 -31 25 -57 57 -57 s 57 25 57 57 C 1382 1081 1138 1324 840 1324 z M 840 1133 L 840 1133 c -191 0 -349 -157 -349 -349 V 349 C 490 157 648 0 840 0 h 0 c 191 0 349 157 349 349 v 435 C 1189 976 1031 1133 840 1133 z M 840 1665 c -31 0 -57 -25 -57 -57 V 1281 c 0 -31 25 -57 57 -57 c 31 0 57 25 57 57 v 325 C 897 1639 871 1665 840 1665 z M 1035 1680 H 644 c -31 0 -57 -25 -57 -57 s 25 -57 57 -57 h 390 c 31 0 57 25 57 57 S 1067 1680 1035 1680 z'+sfx;
+  f18_icon.speaker = prf +'M 640 640 L 640 1152 L 960 1152 L 1280 1472 L 1280 320 L 960 640 Z M 1408 512 C 1536 640 1536 1152 1408 1280' +sfx;
 }
 
 function


Gruß schwatter
#13
Sprachsteuerung / Aw: Alexa Verbindung fehlerhaf...
Letzter Beitrag von Burny4600 - 25 April 2026, 18:33:21
alexa-fhem.cfg
{
   "sshproxy" : {
      "ssh" : "/usr/bin/ssh",
      "description" : "FHEM Connector"
   },
   "connections" : [
      {
         "name" : "FHEM",
         "port" : "8083",
         "ssl" : true,
         "auth" : {
            "pass" : "PASSWORT",
            "user" : "USER"
         },
         "uid" : 1002,
         "server" : "127.0.0.1",
         "webname" : "fhem",
         "filter" : "alexaName=..*"
      }
   ]
}

list ALEXA
Internals:
   CFGFN      /media/hdd/fhem/mycfg/alexa/alexa_rasp01.cfg
   FD         301
   FUUID      69cb8faf-f33f-f4d2-01c9-5f1d0ee67fb435dc
   FVERSION   39_alexa.pm:0.238200/2021-02-24
   LAST_START 2026-04-25 16:11:08
   NAME       ALEXA
   NOTIFYDEV  global,global:npmjs.*alexa-fhem.*
   NR         938
   NTFY_ORDER 50-ALEXA
   PARTIAL   
   PID        1997
   STARTS     1
   STATE      running /usr/bin/alexa-fhem
   TYPE       alexa
   active     0
   alexa-fhem version 0.5.65
   currentlogfile /media/hdd/fhem/log01/alexa/alexa-2026-04-25.log
   eventCount 3
   logfile    %L/alexa/alexa-%Y-%m-%d.log
   CoProcess:
     cmdFn      alexa_getCMD
     name       alexaFHEM
     state      running /usr/bin/alexa-fhem
   READINGS:
     2026-04-25 16:11:08   alexaFHEM       running /usr/bin/alexa-fhem
     2026-04-25 16:11:45   alexaFHEM.ProxyConnection running; SSH connected
     2026-04-25 12:48:01   alexaFHEM.bearerToken crypt:0426765e547474077120260472010375
     2026-04-25 12:48:02   alexaFHEM.skillRegKey crypt:04547120237477721d2356010905700357020e5303760004041f05262401562173507527220676020227
   helper:
Attributes:
   alexaFHEM-auth crypt:710c460f120d76400552530c0209
   alexaFHEM-config ./alexa-fhem.cfg
   alexaFHEM-log %L/alexa/alexa-%Y-%m-%d.log
   alexaMapping #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:0;zu:100
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

   alexaProactiveEvents 1
   alexaRoom  EG_Stiegenhaus,OG1_Schlafzimmer,OG1_Wohnzimmer
   alexaTypes #Type=<alias>[,<alias2>[,...]]
blind=jalousie,jalousien,rolladen,rolläden,rollo,rollos
 
light=aquariumlicht,beleuchtung,blumenlampe,globus,kastenlicht,licht,lampe,lampen,leselicht,stehlampe,vitrinenlicht

outlet=brunnen,luftbefeuchter,steckdose

switch=ventilator,raumlicht

thermometer=

thermostat=

   alias      Alexa
   articles   der,die,das,den
   comment    Neue Geräte an Alexa übergaben:
get Amazon.Account devices

set ALEXA restart

ALEXA, suche smarte Geräte
   devStateIcon stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@0CFB0C:stop
   devStateStyle style="text-align:left;;font-weight:bold;;"
   echoRooms  #<deviceId>=<room>   entspricht der Seriennummer auf der Amazon Geräteübersicht des Echo Gerätes

GN42ML05425201LT=OG1_Schlafzimmer

G071R20721550LPE=OG1_Wohnzimmer

G8M2DB05419602J3=OG2_Buero1
   fhemIntents #IntentName=<sample utterance>
gutenMorgen=guten morgen
guteNacht=gute nacht

   group      Alexa Verteilung
   icon       alexa2@cyan
   persons    #<personId>=<name>

   prepositions in,im,in der
   room       _AMAZON
   sortby     01.02
   stateFormat alexaFHEM

cat /etc/passwd | grep fhem
fhem:x:1002:1002::/home/fhem:/bin/bash
#14
Sprachsteuerung / Aw: Alexa Verbindung fehlerhaf...
Letzter Beitrag von passibe - 25 April 2026, 18:12:48
Zitat von: Burny4600 am 25 April 2026, 17:41:42Es wird immer von Alexa/Echo nach dem Verzeichnis /home/fhem gesucht, und ich muss es manuell anlegen.

Dann ist irgendwas falsch konfiguriert ...

Zeig uns doch mal
1. deine alexa-fhem.cfg,
2. ein list vom Alexa-Device und
3. die Ausgabe von cat /etc/passwd | grep fhem
Übrigens bitte das hier: https://forum.fhem.de/index.php?topic=144266.msg1361482#msg1361482
nochmal lesen (musst nicht alles lesen, das Fettgedruckte am Anfang und der "wie schon gesagt"-Teil reichen).
#15
Sprachsteuerung / Aw: Alexa Verbindung fehlerhaf...
Letzter Beitrag von JoWiemann - 25 April 2026, 17:46:41
Zitat von: Burny4600 am 25 April 2026, 17:41:42Es ist dringend notwendig den alten Alexa/Echo Mist zu entfernen und nur mehr das aktuelle zusammenzufassen.
Sonst wird es immer für sehr viele User sehr schwierig das zum Laufen zu bringen.

Hallo Chris,

das Fhem Wiki ist von Usern für User. Es steht Dir also frei einen Account zu beantragen, was echt unkompliziert ist, und Deine Verbesserungen in der Anleitung dort zu hinterlegen.

Grüße Jörg
#16
Sprachsteuerung / Aw: Alexa Verbindung fehlerhaf...
Letzter Beitrag von Burny4600 - 25 April 2026, 17:41:42
Zitat/home/fhem <- gibt es nicht, bzw. nur bei dir? , warum auch immer...

Ich bin jetzt mit allem Aktuellen durch. Es wird immer von Alexa/Echo nach dem Verzeichnis /home/fhem gesucht, und ich muss es manuell anlegen.

Ich denke du hast etwas falsch verstanden.
FHEM wird unter /opt/fhem installiert. Das ist auch so korrekt.
Alexa oder Echo, wie auch immer es benannt wird, sucht aber nach einem Verzeichnis /home/fhem/.ssh.


Dann bitte Check den Installationsvorgang.
Standart Trixie 64Bit Lite
$ uname -r
6.12.75+rpt-rpi-2712

Aktuelle Neuinstallation von FHEM.

Neuinstallation Alexa/Echo
sudo apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_25.x | sudo -E bash -
sudo apt install nodejs -y
node -v
v25.9.0

https://github.com/npm/cli/releases/
sudo npm install -g npm@11.13.0
npm -version
11.13.0

sudo npm install -g alexa-fhem

sudo nano /etc/ssh/ssh_config
Folgende Einträge am Ende der Datei
### FHEM
    HostKeyAlgorithms +ssh-rsa
    PubkeyAcceptedKeyTypes +ssh-rsa

sudo npm install --prefix /opt/fhem/cache/alexa-cookie alexa-cookie2
sudo chown -R fhem: /opt/fhem/cache/alexa-cookie

sudo mkdir /home/fhem
sudo chown -R fhem: /home/fhem
sudo ls -l /home/fhem/.ssh
sudo chown fhem:dialout /home/fhem/.ssh
ps -ef | egrep '(alexa|ssh)'
root         827       1  0 15:53 ?        00:00:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
fhem        1200     887  0 16:29 ?        00:00:00 node /usr/bin/alexa-fhem -c ./alexa-fhem.cfg -a xx:xx -s
fhem        1213    1200  0 16:29 ?        00:00:00 /usr/bin/ssh -R 1234:127.0.0.1:40085 -oServerAliveInterval=90 -i /home/fhem/.ssh/id_rsa -p 58824 fhem-va.fhem.de
root        1214     827  0 16:30 ?        00:00:00 sshd-session: admin [priv]
admin       1261    1214  0 16:30 ?        00:00:00 sshd-session: admin@pts/0
admin       1279    1263  0 16:31 pts/0    00:00:00 grep -E --color=auto (alexa|ssh)

sudo nano /etc/sudoers
fhem    ALL=(ALL) NOPASSWD: ALL

Zumindest habe ich jetzt wieder Verbindung zu AMAZON.

Wenn das passt, versuche ich den Rest aktuell zu installieren.

Es ist dringend notwendig den alten Alexa/Echo Mist zu entfernen und nur mehr das aktuelle zusammenzufassen.
Sonst wird es immer für sehr viele User sehr schwierig das zum Laufen zu bringen.
#17
Wettermodule / Aw: [Erledigt] Fehlende Werte ...
Letzter Beitrag von Marko1976 - 25 April 2026, 16:43:59
Dann spricht der direkten Multiplikation nichts entgegen.
Regenwahrscheinlichkeit wird in der Regel ja als Prozentwert angegeben.
#18
Wettermodule / Aw: [Erledigt] Fehlende Werte ...
Letzter Beitrag von CoolTux - 25 April 2026, 16:37:10
Da ich die commandref eh noch anpassen muss und das zusammenstellen der Readings immer in den API Modulen passiert können wir hier gerne das ganze in Prozent machen.
#19
EnOcean / Aw: EnOcean PioTek Multigatewa...
Letzter Beitrag von klaus.schauer - 25 April 2026, 15:56:07
Zitat von: piotek am 24 April 2026, 11:56:31Warum erwähne ich die 868 MHz Antenne so sehr? Nun weil die Antenne eben für den TCM515 ist und nicht für den WLAN Anschluss.
D.h. eine 33cm Antenne ist eben keine 868MHz Antenne. Sie wird zwar gehen aber die Anpassung des TCM515 ist eben an eine echte
868Mhz (Lambda/4) gemacht worden. Insofern macht es natürlich, für beste Reichweiten, Sinn die beiliegende Antenne auch wirklich
zu benutzen. Viel mehr werdet ihr da nicht "rausholen".
Was soll denn falsch sein an einer Antenne, die für 868 MHz konstruiert ist und durch einen anderen Aufbau einen Gewinn von nicht 3 dB sondern 5 dB verbunden mit eine stärkeren Richtcharakteristik hat, wie z. B. https://shop.busware.de/product_info.php/products_id/31?
#20
Sprachsteuerung / Aw: Alexa Verbindung fehlerhaf...
Letzter Beitrag von MadMax-FHEM - 25 April 2026, 15:54:48
Das ist, wie du gemerkt hast der uralte Wiki, wo man den Skill noch selbst hosten musste bzw. für Custom Skill.

tar.gz, Startscript, ... <- braucht es alles schon ewig nicht mehr

Richtig und bereits einige Male genannt ist der Connector Wiki.

/home/fhem <- gibt es nicht, bzw. nur bei dir? , warum auch immer...

Standard bei fhem Installation ist (wurde auch schon oft geschrieben): /opt/fhem

Andere haben es mit dem Connector Wiki (plus eben bzgl. Verschlüsselungsanpassung wegen neuem OS und fhem Vereinsserver) geschafft, siehe entspr. Posts...

Warum du dich so schwer tust: keine Ahnung (außer eben deine eigenartige Installationsweise generell / hatte ich ja auch schon mehrfach angesprochen)

Gruß, Joachim