Hauptmenü

Neueste Beiträge

#91
Sprachsteuerung / Aw: [gelöst] Alexa + homebrid...
Letzter Beitrag von Moli - 19 April 2026, 20:19:04
Oh falsch, das war ein Logfilter Problem!!

[19/04/2026, 20:17:57] [FHEM] esp_klima_gaeste is thermostat
[19/04/2026, 20:17:57] [FHEM] esp_klima_gaeste has
[19/04/2026, 20:17:57] [FHEM]   Custom Power [power]
[19/04/2026, 20:17:57] [FHEM]   TargetTemperature [desired-temp]
[19/04/2026, 20:17:57] [FHEM]   CurrentTemperature [measured-temp]
[19/04/2026, 20:17:57] [FHEM]   CurrentHeatingCoolingState [mode]
[19/04/2026, 20:17:57] [FHEM]   On [mode;mode auto,mode off]
[19/04/2026, 20:17:57] [FHEM]   TargetHeatingCoolingState [mode]
[19/04/2026, 20:17:57] [FHEM] esp_klima_gaeste will try to send proactive events
[19/04/2026, 20:17:57] [FHEM] esp_klima_gaeste uses ID: 69c9027a-f33f-18b8-40fe-8f5803560ed5a2e7
  2026-04-19 20:17:57 caching: esp_klima_gaeste-power: 8
[19/04/2026, 20:17:57] [FHEM]     caching: Custom Power: 8 (as number; from '8')
  2026-04-19 20:17:57 caching: esp_klima_gaeste-desired-temp: 23.0
  2026-04-19 20:17:57 caching: esp_klima_gaeste-measured-temp: 20.8
  2026-04-19 20:17:57 caching: esp_klima_gaeste-mode: off
#92
Off-Topic / Aw: Shelly Group an der Frankf...
Letzter Beitrag von JudgeDredd - 19 April 2026, 20:04:55
Gut eine Milliarde Marktkapitalisierung. Da kann ich ja gleich den ganzen Laden kaufen 😅
#93
TabletUI / FTUI 3 nach FHEM update Syntax...
Letzter Beitrag von Schniebi - 19 April 2026, 19:50:42
Hallo,

Ich habe heute ein updat von FHEM durchgeführt. Seit dem habe ich folgenden Fehler auf den Tablet UIs:

FHEM Command failed
SyntaxError: JSON.parse: unexpected end od data at line 1column 1 of the JSON data

Refresh request failed: Result is null

Es werden viele Sachen nicht mehr dar gestellt.

Hier mal meine HTML:

<!DOCTYPE html>
<html>

<head>
  <!--
    /* FHEM tablet ui - FTUI */
    /**
    * UI builder framework for FHEM
    *
    * Version: 3.0.0
    *
    * Copyright (c) 2015-2021 Mario Stephan <mstephan@shared-files.de>
    * Under MIT License (http://www.opensource.org/licenses/mit-license.php)
    * https://github.com/knowthelist/ftui
    */
    -->
  <script src="ftui.js"></script>

  <link href="ftui.css" rel="stylesheet">
  <link href="themes/ftui-theme.css" rel="stylesheet">
  <link href="favicon.ico" rel="icon" type="image/x-icon" />
  <link href="themes/retro-theme.css" rel="stylesheet"
        ftui-binding [disabled]="local:theme | map('`.*`:true, retro:false') | toBool()">

  <!-- avoid 300ms delay on click-->
  <meta name="viewport" content="width=device-width">

  <meta name="mobile-web-app-capable" content="yes">
  <meta name="toast_position" content="topLeft">


  <!-- verbose level 0-4 -->
  <meta name="debug" content="0">


  <title>FTUI Schniebi</title>
</head>

<body>
  <ftui-speak [text]="speakFlur:state"></ftui-speak>
  <ftui-grid base-width="106" base-height="85" margin="5" shape="round" color="success">

      <ftui-grid-tile row="1" col="1" height="3" width="5" shape="round" color="dark">
        <ftui-row width="80%" height="0%">
          <ftui-clock format="ee" class="size-9 thin" unit="."></ftui-clock>
          <ftui-clock format="DD.MM.YYYY" class="size-9 thin"></ftui-clock>
        </ftui-row>
        <ftui-row width="90%" height="0%">
          <ftui-clock format="hh:mm" class="size-11 thin"></ftui-clock>
          <ftui-label class="size-11 thin">Uhr</ftui-label>
        </ftui-row>
      </ftui-grid-tile>

      <ftui-grid-tile row="4" col="1" height="2" width="5" color="dark">
        <header class="thin"><ftui-label size="3" color="orange">WETTERVOHERSAGE</ftui-label></header>
         <ftui-row width="80%" height="10%">
          <ftui-label size="4">Heute</ftui-label>
         <ftui-weather icon-set="meteocons" provider="proplanta" [condition]="DWD_Wetter:fc0_3_wwd" size="1"></ftui-weather>
           <ftui-label [text]="DWD_Wetter:fc0_Tn | round(0)" size="4" unit="°C">min.    </ftui-label>
           <ftui-label [text]="DWD_Wetter:fc0_Tx | round(0)" size="4" unit="°C">max.    </ftui-label>
        </ftui-row>
        <ftui-row width="80%" height="10%">
          <ftui-label size="4">Morgen</ftui-label>
          <ftui-weather icon-set="meteocons" provider="DWD" [condition]="DWD_Wetter:fc1_3_wwd" size="1"></ftui-weather>
           <ftui-label [text]="DWD_Wetter:fc1_Tn | round(0)" size="4" unit="°C">min.    </ftui-label>
           <ftui-label [text]="DWD_Wetter:fc1_Tx | round(0)" size="4" unit="°C">max.    </ftui-label>
        </ftui-row>
      </ftui-grid-tile>
    
     <ftui-grid-tile row="4" col="6" height="2" width="2" color="dark">
        <header class="thin"><ftui-label size="3" color="orange">POOL</ftui-label></header>
        <ftui-column width="80%" height="10%">
          <ftui-column align-items="center">
             <ftui-label [text]="ESPEasy_Pool_Temp_Pool:temperature | fix(1)" class="size-8 thin" unit="°C"></ftui-label>
          </ftui-column>
          
       <ftui-row width="65%">
          <ftui-column height="10%">
             <ftui-icon class="size-1" [name]="ESPEasy_Pool_Pumpe:State | map('off:sani_garden_pump, on:sani_garden_pump')" [color]="ESPEasy_Pool_Pumpe:State | map('off:gray, on:green')"></ftui-icon>
          </ftui-column>
          <ftui-column height="10%">
             <ftui-icon class="size-1" [name]="ESPEasy_Pool_Heizung:State | map('off:sani_heating, on:sani_heating')" [color]="ESPEasy_Pool_Heizung:State | map('off:gray, on:green')"></ftui-icon>
          </ftui-column>
       </ftui-row>
      </ftui-column>     
      
   <ftui-column>
      <ftui-row width="65%">
         <ftui-column>
            <ftui-label size="1">Pumpe</ftui-label>
         </ftui-column>
         <ftui-column>
            <ftui-label size="1">Heizung</ftui-label>
         </ftui-column>
      </ftui-row>
   </ftui-column>
      </ftui-grid-tile>
    
     <ftui-grid-tile row="4" col="8" height="4" width="1" color="dark">
        <header class="thin"><ftui-label size="3" color="orange">ESPs</ftui-label></header>
      <ftui-icon class="size-0" [name]="MQTT2_ESP_Strom:LWT | map('Offline:it_memory, Online:it_memory')" [color]="MQTT2_ESP_Strom:LWT | map('Offline:red, Online:green')"></ftui-icon>
       <ftui-label size="1">Strom</ftui-label>
       <ftui-icon class="size-0" [name]="ESPEasy_Pool_state:presence | map('absent:it_memory, present:it_memory')" [color]="ESPEasy_Pool_state:presence | map('absent:red, present:green')"></ftui-icon>
       <ftui-label size="1">Pool</ftui-label>
       <ftui-icon class="size-0" [name]="ESPEasy_Aquarium_state:presence | map('absent:it_memory, present:it_memory')" [color]="ESPEasy_Aquarium_state:presence | map('absent:red, present:green')"></ftui-icon>
       <ftui-label size="1">Aquarium</ftui-label>
       <ftui-icon class="size-0" [name]="ESPEasy_MV_State:presence | map('absent:it_memory, present:it_memory')" [color]="ESPEasy_MV_State:presence | map('absent:red, present:green')"></ftui-icon>
       <ftui-label size="1">Magnetventile</ftui-label>
       <ftui-icon class="size-0" [name]="ESPEasy_Temp_Schlafzimmer_state:presence | map('absent:it_memory, present:it_memory')" [color]="ESPEasy_Temp_Schlafzimmer_state:presence | map('absent:red, present:green')"></ftui-icon>
       <ftui-label size="1">Schlafzimmer</ftui-label>
       <ftui-icon class="size-0" [name]="ESPEasy_Temp_Lena_state:presence | map('absent:it_memory, present:it_memory')" [color]="ESPEasy_Temp_Lena_state:presence | map('absent:red, present:green')"></ftui-icon>
       <ftui-label size="1">Lena</ftui-label>   
      </ftui-grid-tile>
    
     <ftui-grid-tile row="4" col="9" height="2" width="1" color="dark">
        <header class="thin"><ftui-label size="3" color="orange">MÄHNDY</ftui-label></header>
        <ftui-icon class="size-4" [name]="dummy_Landroid_Steuerung:state | map('off:scene_robo_lawnmower, on:scene_robo_lawnmower')" [color]="dummy_Landroid_Steuerung:state | map('off:gray, on:green')"></ftui-icon>
      <ftui-label size="1" [text]="dummy_Landroid_Steuerung:state | map('off:Partymodus, on:Aktiv')"></ftui-label>
      </ftui-grid-tile>
     
      <ftui-grid-tile row="6" col="1" height="1" width="2" color="dark">
       <header class="thin"><ftui-label size="3" color="orange">AUSSENTEMPERATUR</ftui-label></header>
        <ftui-label [text]="Gartenpumpe:temperature_0 | fix(1)" class="size-7 thin" unit="°C"></ftui-label>
      </ftui-grid-tile>
     
      <ftui-grid-tile row="7" col="1" height="1" width="2" color="dark">
       <header class="thin"><ftui-label size="3" color="orange">INNENTEMPERATUR</ftui-label></header>
        <ftui-label [text]="HM_54BF41:temperature | fix(1)" class="size-7 thin" unit="°C"></ftui-label>
      </ftui-grid-tile>
    
     <ftui-grid-tile row="6" col="3" height="2" width="5" color="dark">
      <header class="thin"><ftui-label size="3" color="orange">ABFALLTERMINE</ftui-label></header>
      <ftui-column>
      <ftui-row margin-top="3" margin-bottom="3" width="70%">
       <ftui-label size="3">Biotonne:</ftui-label>
         <ftui-label [text]="abfall_Abfall:calendar_Abfall_Biotonne_date" size="3"></ftui-label>
       <ftui-label [text]="abfall_Abfall:calendar_Abfall_Biotonne_weekday" size="3"></ftui-label>
      </ftui-row>
      </ftui-column>
      <ftui-column>
      <ftui-row margin-top="3" margin-bottom="3" width="70%">
       <ftui-label size="3">Gelber Sack:</ftui-label>
         <ftui-label [text]="abfall_Abfall:calendar_Abfall_GelberSack_date" size="3"></ftui-label>
       <ftui-label [text]="abfall_Abfall:calendar_Abfall_GelberSack_weekday" size="3"></ftui-label>
      </ftui-row>
      </ftui-column>
      <ftui-column>
      <ftui-row margin-top="3" margin-bottom="3" width="70%">
       <ftui-label size="3">Papiertonne:</ftui-label>
         <ftui-label [text]="abfall_Abfall:calendar_Abfall_Papiertonne_date" size="3"></ftui-label>
       <ftui-label [text]="abfall_Abfall:calendar_Abfall_Papiertonne_weekday" size="3"></ftui-label>
      </ftui-row>
      </ftui-column>
      <ftui-column>
      <ftui-row margin-top="3" margin-bottom="3" width="70%">
       <ftui-label size="3">Restabfall:</ftui-label>
         <ftui-label [text]="abfall_Abfall:calendar_Abfall_Restabfall_date" size="3"></ftui-label>
       <ftui-label [text]="abfall_Abfall:calendar_Abfall_Restabfall_weekday" size="3"></ftui-label>
      </ftui-row>
       </ftui-column>   
      </ftui-grid-tile>
     
      <ftui-grid-tile row="1" col="6" height="3" width="3" color="dark">
        <header class="thin"><ftui-label size="3" color="orange">SOLAR</ftui-label></header>
        <ftui-column>
         <ftui-row margin-top="3" margin-bottom="3" width="80%">
            <ftui-column align-items="left">
            <ftui-label text="Ersparnis:" size="4"></ftui-label>
            </ftui-column>
             <ftui-column align-items="right">
            <ftui-label [text]="dummy_Stromersparnis_gesamt:Preis | fix(2)" size="4" unit="€"></ftui-label>
            </ftui-column>
         </ftui-row>
         <ftui-row margin-top="3" margin-bottom="3" width="80%">
            <ftui-column align-items="left">
            <ftui-label text="Momentan:" size="4"></ftui-label>
            </ftui-column>
             <ftui-column align-items="right">
            <ftui-label [text]="dummy_PV_Leistung_Momentan:Leistung | round(0)" size="4" unit="W"></ftui-label>
            </ftui-column>
         </ftui-row>
         <ftui-row margin-top="3" margin-bottom="3" width="80%">
            <ftui-column align-items="left">
            <ftui-label text="Gesamt:" size="4"></ftui-label>
            </ftui-column>
             <ftui-column align-items="right">
            <ftui-label [text]="PV_Leistung_Gesamt:STATE | round(1)" size="4" unit="Kwh"></ftui-label>
            </ftui-column>
         </ftui-row>
         <ftui-row margin-top="3" margin-bottom="3" width="80%">
            <ftui-column align-items="left">
            <ftui-label text="Effektivität:" size="4"></ftui-label>
            </ftui-column>
             <ftui-column align-items="right">
            <ftui-label [text]="dummy_Effektivitaet:Prozent | round(1)" size="4" unit="%"></ftui-label>
            </ftui-column>
         </ftui-row>
         <ftui-row margin-top="3" margin-bottom="3" width="80%">
            <ftui-column align-items="left">
            <ftui-label text="Stromzähler:" size="4"></ftui-label>
            </ftui-column>
             <ftui-column align-items="right">
            <ftui-label [text]="StromzaehlerMomentan:state | round(0)" size="4" unit="W"></ftui-label>
            </ftui-column>
         </ftui-row>
         </ftui-column>
      </ftui-grid-tile>
    
     <ftui-grid-tile row="1" col="9" height="3" width="1" color="dark">
        <header class="thin"><ftui-label size="3" color="orange">ABFALL</ftui-label></header>
        <ftui-icon name="trash-o" size="7" [class-name]="dummy_Abfall_morgen:state  | step('0:``, 1:hop, 2:``')" [color]="dummy_Abfall_morgen:state  | step('0:gray, 1:orange, 2:gray')"></ftui-icon>
        </ftui-row>
        <ftui-row width="40%" height="0%">
         <ftui-label [text]="abfall_Abfall:next_weekday" size="1"></ftui-label>
        </ftui-row>
      </ftui-grid-tile>
    
     <ftui-grid-tile row="6" col="9" height="2" width="1" color="dark">
        <header class="thin"><ftui-label size="3" color="orange">NACHT-PV</ftui-label></header>
      <ftui-label class="size-5" [text]="MQTT2_solar_114184531895:power | round(0)" [color]="MQTT2_solar_114184531895:power | map('0.0:gray, .*:green')" unit="W"></ftui-label>
      </ftui-grid-tile>

   </ftui-grid>

</body>

</html>
#94
Codeschnipsel / json2nameValue verstehen - ein...
Letzter Beitrag von martinp876 - 19 April 2026, 19:50:07
Ich habe versucht json2nameValue zu verstehen - im Zusammenhang mit MQTT2.
MQTT2 liefert "im Automode" indiuskutabel lange Namen - und zu viel sowieso. Also muss man filtern und übersetzen.
Aktuelles Beispiel ist ein ESP32 mit (aktuell) 5 Temperatursensoren. GEht erst einmal prima. das Zerlegen der Tasmota MQTT Infos geht mit json2nameValue gut. Da nun die Namen quatsch sind muss man den Sensoren Namen geben um die Readings zu erzeugen.

json2nameValue bietet nun die Option "map" sowie einen Positiv und einen negativ filter. Ich habe keine schlüssige Dokumentation hierzu gefunden - eben so keine Beispiele.
Musss man den Code prüfen: Negativ Filter betreffen die ürsprünglichen Namen während positv-filter die "gemappten" Daten betreffen. Da ich allerding das Mapping nicht einfichten konnte ist es am Ende eh egal - ich konnte es nicht zum Laufen bekommen.

Am Ende war ich deutlich schneller, selbst eine Funktion zu erstellen. Die einfache Option, diese in MQTT readlingList einzupflegen scheitert dann wieder an der Einschrängung, ein Kommando in eine Zeile schreiben zu müssen. Da hat man ich den Trenner gespart bzw \n genutzt.

Also noch ein Umweg. Wirklich userfreindlich ist das nicht - aber möglich, wie alles.
Ich werde noch ein einer eleganteren Version arbeiten
==> gibt es schon bessere Funktionen und gibt es eine komplette Doku zu json2nameValue?
  • #funktion als Reading einbauen
  • # Funktion definieren "evalRead"
  • # Readingslist erstellen

  userattr  EvalRead:textField-long
  EvalRead
{
my $x= json2nameValue($EVENT);
my $mttqID ="StatusSNS_DS18B20-";
my %didH = ("000000505B1A" => "WPRaum"
    ,"00000051CAD9" => "WP_ein"
    ,"000000526D95" => "WP_aus"
    ,"000000544C2C" => "Wasser"
    ,"0000005310E3" => "Boiler");
my (%midH,%resH);
for my $n (grep/_Id$/,keys %{$x}) {
    $n =~ m/.*-(.*?)_Id/;
    $midH{$1."_Id"}= defined $didH{%{$x}{$n}} ? $didH{%{$x}{$n}} : $1."_undef"};
for my $n (grep/_Temperature$/,keys %{$x}){
    $n =~ m/.*-(.*?)_Temp/;
    $resH{"temp_".$midH{$1."_Id"}}= %{$x}{$n}};
\%resH}
  readingList DVES_FB81CC:stat/tasmota_FB81CC/STATUS8:.* {eval AttrVal($NAME,"EvalRead","")}
#95
Sprachsteuerung / Aw: [gelöst] Alexa + homebrid...
Letzter Beitrag von Moli - 19 April 2026, 19:47:42
Hi, ich danke dir vielmals für deine Mühe!

Ich hatte noch kleine Änderungen gemacht, die Sensoren auf measured-temp und desired-temp. Ich dachte, vielleicht hilft eine Teilerkennung, sonst habe ich nichts verändert und das schnell angepasst.

Bei mir sieht es leider noch immer so aus, das ganze "has" scheint ja zu fehlen.
Ich kann keine Geräte löschen, da nerve ich Amazon schon über 1 Jahr mit, bisher leider erfolglos, ich helfe mir immer mit Umbennenung aber ob das reicht, weiss ich nicht.

[19/04/2026, 19:37:47] [FHEM] esp_klima_gaeste is thermostat
[19/04/2026, 19:37:47] [FHEM] esp_klima_gaeste has
[19/04/2026, 19:37:47] [FHEM] esp_klima_gaeste will try to send proactive events
[19/04/2026, 19:37:47] [FHEM] esp_klima_gaeste uses ID: 69c9027a-f33f-18b8-40fe-8f5803560ed5a2e7
  2026-04-19 19:37:47 caching: esp_klima_gaeste-mode: off
  2026-04-19 19:37:47 caching: esp_klima_gaeste-measured-temp: 20.7
  2026-04-19 19:39:20 caching: esp_klima_gaeste-measured-temp: 20.8

2026.04.19 19:46:08 5:  alexa: read: [19/04/2026, 19:46:08] {
2026.04.19 19:46:08 5:  alexa: read:   On: {
2026.04.19 19:46:08 5:  alexa: read:     reading: 'mode',
2026.04.19 19:46:08 5:  alexa: read:     valueOn: '/heat|cool|auto/',
2026.04.19 19:46:08 5:  alexa: read:     valueOff: 'off',
2026.04.19 19:46:08 5:  alexa: read:     cmdOn: 'mode auto',
2026.04.19 19:46:08 5:  alexa: read:     cmdOff: 'mode off',
2026.04.19 19:46:08 5:  alexa: read:     device: 'esp_klima_gaeste',
2026.04.19 19:46:08 5:  alexa: read:     informId: 'esp_klima_gaeste-mode',
2026.04.19 19:46:08 5:  alexa: read:     characteristic_type: 'On',
2026.04.19 19:46:08 5:  alexa: read:     log: [Function: bound ] {
2026.04.19 19:46:08 5:  alexa: read:       debug: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       info: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       warn: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       error: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       log: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       prefix: 'FHEM'
2026.04.19 19:46:08 5:  alexa: read:     },
2026.04.19 19:46:08 5:  alexa: read:     characteristic: undefined
2026.04.19 19:46:08 5:  alexa: read:   },
2026.04.19 19:46:08 5:  alexa: read:   CurrentTemperature: {
2026.04.19 19:46:08 5:  alexa: read:     reading: 'measured-temp',
2026.04.19 19:46:08 5:  alexa: read:     device: 'esp_klima_gaeste',
2026.04.19 19:46:08 5:  alexa: read:     informId: 'esp_klima_gaeste-measured-temp',
2026.04.19 19:46:08 5:  alexa: read:     characteristic_type: 'CurrentTemperature',
2026.04.19 19:46:08 5:  alexa: read:     log: [Function: bound ] {
2026.04.19 19:46:08 5:  alexa: read:       debug: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       info: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       warn: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       error: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       log: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       prefix: 'FHEM'
2026.04.19 19:46:08 5:  alexa: read:     },
2026.04.19 19:46:08 5:  alexa: read:     characteristic: undefined,
2026.04.19 19:46:08 5:  alexa: read:     last_update: 1776620420,
2026.04.19 19:46:08 5:  alexa: read:     cached: 20.7
2026.04.19 19:46:08 5:  alexa: read:   },
2026.04.19 19:46:08 5:  alexa: read:   TargetTemperature: {
2026.04.19 19:46:08 5:  alexa: read:     reading: 'target',
2026.04.19 19:46:08 5:  alexa: read:     cmd: 'desired-temp',
2026.04.19 19:46:08 5:  alexa: read:     minValue: 16,
2026.04.19 19:46:08 5:  alexa: read:     maxValue: 30,
2026.04.19 19:46:08 5:  alexa: read:     device: 'esp_klima_gaeste',
2026.04.19 19:46:08 5:  alexa: read:     informId: 'esp_klima_gaeste-target',
2026.04.19 19:46:08 5:  alexa: read:     characteristic_type: 'TargetTemperature',
2026.04.19 19:46:08 5:  alexa: read:     log: [Function: bound ] {
2026.04.19 19:46:08 5:  alexa: read:       debug: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       info: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       warn: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       error: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       log: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       prefix: 'FHEM'
2026.04.19 19:46:08 5:  alexa: read:     },
2026.04.19 19:46:08 5:  alexa: read:     characteristic: undefined
2026.04.19 19:46:08 5:  alexa: read:   },
2026.04.19 19:46:08 5:  alexa: read:   CurrentHeatingCoolingState: {
2026.04.19 19:46:08 5:  alexa: read:     reading: 'mode',
2026.04.19 19:46:08 5:  alexa: read:     values: [ 'off:OFF', 'cool:COOL', 'heat:HEAT', 'auto:AUTO' ],
2026.04.19 19:46:08 5:  alexa: read:     device: 'esp_klima_gaeste',
2026.04.19 19:46:08 5:  alexa: read:     informId: 'esp_klima_gaeste-mode',
2026.04.19 19:46:08 5:  alexa: read:     characteristic_type: 'CurrentHeatingCoolingState',
2026.04.19 19:46:08 5:  alexa: read:     log: [Function: bound ] {
2026.04.19 19:46:08 5:  alexa: read:       debug: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       info: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       warn: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       error: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       log: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       prefix: 'FHEM'
2026.04.19 19:46:08 5:  alexa: read:     },
2026.04.19 19:46:08 5:  alexa: read:     value2homekit: { off: 'OFF', cool: 'COOL', heat: 'HEAT', auto: 'AUTO' },
2026.04.19 19:46:08 5:  alexa: read:     value2homekit_re: [],
2026.04.19 19:46:08 5:  alexa: read:     characteristic: undefined
2026.04.19 19:46:08 5:  alexa: read:   },
2026.04.19 19:46:08 5:  alexa: read:   TargetHeatingCoolingState: {
2026.04.19 19:46:08 5:  alexa: read:     reading: 'mode',
2026.04.19 19:46:08 5:  alexa: read:     values: [ 'off:OFF', 'cool:COOL', 'heat:HEAT', 'auto:AUTO' ],
2026.04.19 19:46:08 5:  alexa: read:     cmds: [
2026.04.19 19:46:08 5:  alexa: read:       'OFF:mode+off',
2026.04.19 19:46:08 5:  alexa: read:       'COOL:mode+cool',
2026.04.19 19:46:08 5:  alexa: read:       'HEAT:mode+heat',
2026.04.19 19:46:08 5:  alexa: read:       'AUTO:mode+auto'
2026.04.19 19:46:08 5:  alexa: read:     ],
2026.04.19 19:46:08 5:  alexa: read:     device: 'esp_klima_gaeste',
2026.04.19 19:46:08 5:  alexa: read:     informId: 'esp_klima_gaeste-mode',
2026.04.19 19:46:08 5:  alexa: read:     characteristic_type: 'TargetHeatingCoolingState',
2026.04.19 19:46:08 5:  alexa: read:     log: [Function: bound ] {
2026.04.19 19:46:08 5:  alexa: read:       debug: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       info: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       warn: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       error: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       log: [Function (anonymous)],
2026.04.19 19:46:08 5:  alexa: read:       prefix: 'FHEM'
2026.04.19 19:46:08 5:  alexa: read:     },
2026.04.19 19:46:08 5:  alexa: read:     value2homekit: { off: 'OFF', cool: 'COOL', heat: 'HEAT', auto: 'AUTO' },
2026.04.19 19:46:08 5:  alexa: read:     value2homekit_re: [],
2026.04.19 19:46:08 5:  alexa: read:     homekit2cmd: {
2026.04.19 19:46:08 5:  alexa: read:       OFF: 'mode off',
2026.04.19 19:46:08 5:  alexa: read:       COOL: 'mode cool',
2026.04.19 19:46:08 5:  alexa: read:       HEAT: 'mode heat',
2026.04.19 19:46:08 5:  alexa: read:       AUTO: 'mode auto'
2026.04.19 19:46:08 5:  alexa: read:     },
2026.04.19 19:46:08 5:  alexa: read:     homekit2cmd_re: [],
2026.04.19 19:46:08 5:  alexa: read:     characteristic: undefined
2026.04.19 19:46:08 5:  alexa: read:   }
2026.04.19 19:46:08 5:  alexa: read: }
2026.04.19 19:46:08 5:  alexa: read: [19/04/2026, 19:46:08] {"event":{"header":{"namespace":"Alexa.Discovery","name":"AddOrUpdateReport","payloadVersion":"3","messageId":"f14c132b-5ce3-48c3-98b5-ca71f056b61f"},"payload":{"endpoints":[{"endpointId":"69c9027a-f33f-18b8-40fe-8f5803560ed5a2e7","manufacturerName":"MQTT2_DEVICE","description":"n: esp_klima_gaeste, r: regeln","friendlyName":"klima gäste","displayCategories":["THERMOSTAT"],"additionalAttributes":{"manufacturer":"FHEM","model":""},"capabilities":[{"type":"AlexaInterface","interface":"Alexa","version":"3"},{"type":"AlexaInterface","interface":"Alexa.ThermostatController","version":"3","properties":{"supported":[{"name":"targetSetpoint"},{"name":"thermostatMode"}],"configuration":{"supportsScheduling":false,"supportedModes":["OFF","COOL","HEAT","AUTO"]},"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.TemperatureSensor","version":"3","properties":{"supported":[{"name":"temperature"}],"proactivelyReported":true,"retrievable":true}},{"type":"AlexaInterface","interface":"Alexa.PowerController","version":"3","properties":{"supported":[{"name":"powerState"}],"proactivelyReported":true,"retrievable":true}}],"cookie":{"device":"esp_klima_gaeste","fuuid":"69c9027a-f33f-18b8-40fe-8f5803560ed5a2e7"}}],"scope":{"type":"BearerToken","token":"access-token-from-Amazon"}}}}
2026.04.19 19:46:08 5:  alexa: read: [19/04/2026, 19:46:08] posting skill event
2026.04.19 19:46:08 5:  alexa: read: [19/04/2026, 19:46:08] posted skill event: 202:
#96
Wunschliste / Aw: 2 CUL betreiben
Letzter Beitrag von martinp876 - 19 April 2026, 19:32:07
1)  HM-MOD-RPI-PCB  über LAN<-> RS232 zu betreiben könnte funktionieren. Es ist ein HM module und könnte das Timing selbst machen. Sollte ich einmal test. Sollte das nicht stimmen sehe ich bei der Mehfach Wandlung Problerme mit dem Timing. Aber: einen Versuch ist es wert. Etwas Aufwand bspw mit Gebäuse.
2) Danke für die Stackable Erklärung. Da ich keine entsprechenden Multi-IO Unit betreibe ist es für mich also irrelevant
3) HM-MOD-RPI-PCB wieder in Angriff nehmen kann ich noch einmal versuchen. Ja, auf einfach hatte ich gehofft. Wenn man ein Problem hat ist es (für mich zumindest) schwer, die Fehlstelle zu isolieren. Wenn alles geht ist es of einfach. Ich denke daher zuerst an die LAN/RS232 Lösung - da liegen debug optionen auf dem Tisch

Da ich aktuell komplett überlastet bin wird alles dauern - andere Prios. Dei Installation läuft also mit CUL(ohne TS) wir erwartet. Einfaches schalten geht. Komplexe übertragungen schwierig. Das ausschalten von ~10 Schaltstellen "gute-Nacht-Schalter" +über Scene scheitert so gut wie immer - es werden nur einzelne Lichter gelöscht... muss ich von Hand "nachschalten"

Danke für die Tips

#97
SVG / Plots / logProxy / Aw: SVG Plot nach Umstellung v...
Letzter Beitrag von e_brandt - 19 April 2026, 19:10:07
Danke jetzt funktioniert es: $val=($val=~'on'?1:0)
#98
SVG / Plots / logProxy / Aw: SVG Plot nach Umstellung v...
Letzter Beitrag von betateilchen - 19 April 2026, 18:32:23
Zitat von: betateilchen am 19 April 2026, 17:07:09Wenn ich mich recht erinnere, gibt es entweder hier im Forum oder im Wiki einen Artikel, der beschreibt, was man bei der Umstellung beachten und anpassen muss.

https://wiki.fhem.de/wiki/SVG-Plots_von_FileLog_auf_DbLog_umstellen
#99
Solaranlagen / Aw: Marstek Venus E Modulentwi...
Letzter Beitrag von chri0815 - 19 April 2026, 18:05:31
Hallo Zusammen,
lang hat es gedauert aber ich habe jetzt eine erste Modulversion für den Marstek Venus E. Wer Verbesserungen hat, kann das gern einfügen. Ich habe aus der API Doku nur die Get Befehle übernommen. Zum Konfigurieren die IP Adresse und Den Port 30000 angeben. Das Intervall bei den attr definieren, aber nicht zu klein setzen, eher 10s oder höher.
Nicht vergessen im Marstek die Local API Schnitstelle einschalten!!!
Grüße

######################################################################
# 99_Marstek.pm
# FHEM Modul für Marstek Geräte (Venus C/E/D)
# Liest SOC, Bat-Power, PV-Power, Lade-/Entladeleistung
# Unterstützt Startwert für SOC (soc_start) und Polling
######################################################################

package main;

use strict;
use warnings;
use IO::Socket::INET;
use JSON::PP;
use Time::HiRes qw(gettimeofday);

##########################
# Modul-Initialisierung
##########################
sub Marstek_Initialize {
    my ($hash) = @_;
    $hash->{DefFn}    = "Marstek_Define";
    $hash->{UndefFn}  = "Marstek_Undef";
    $hash->{AttrFn}   = "Marstek_Attr";
    $hash->{GetFn}   = "Marstek_Get";
    $hash->{NotifyFn} = "Marstek_Notify";
    $hash->{AttrList} = "interval";
}

##########################
# Define
##########################
sub Marstek_Define {
    my ($hash, $def) = @_;
    my @args = split(" ", $def);

    return "Usage: define <name> Marstek <IP> <PORT>" unless @args == 4;

    $hash->{IP}       = $args[2];
    $hash->{PORT}     = $args[3];
    $hash->{INTERVAL} = 60;

    InternalTimer(gettimeofday()+1, sub { Marstek_Poll($hash) }, 0);
    return undef;
}

##########################
# Undef
##########################
sub Marstek_Undef {
    my ($hash) = @_;
    RemoveInternalTimer($hash);
    return undef;
}

##########################
# Attribute
##########################
sub Marstek_Attr {
    my ($cmd, $name, $attrName, $attrValue) = @_;
    my $hash = $defs{$name};

    if ($attrName eq "interval" && $attrValue =~ /^\d+$/) {
        $hash->{INTERVAL} = $attrValue;
    }
    return undef;
}

##########################
# Notify
##########################
sub Marstek_Notify {
    my ($hash, $dev) = @_;
    return undef;
}

##########################
# Gemeinsame Request-Funktion
##########################
sub Marstek_DoRequest {
    my ($hash, $method, $units) = @_;
    my $success = 0;
    my $sock = IO::Socket::INET->new(
        PeerAddr => $hash->{IP},
        PeerPort => $hash->{PORT},
        Proto    => 'udp',
        Timeout  => 2
    );

    if ($sock) {
        my $req = {
            id     => 1,
            method => $method,
            params => { id => 0 }
        };

        my $json = encode_json($req);
        $sock->send($json);

        my $resp = "";

        eval {
            local $SIG{ALRM} = sub { die "Timeout\n" };
            alarm 2;
            $sock->recv($resp, 4096);
            alarm 0;
        };

        if ($@ && $@ ne "Timeout\n") {
            Log 3, "Marstek Poll recv error ($method): $@";
        }

        my $data;
        eval { $data = decode_json($resp) };

        if ($@) {
            Log 3, "Marstek JSON decode error ($method): $@";
        }

        if ($data && $data->{result}) {
            for my $key (keys %{$units}) {
                if (exists $data->{result}{$key}) {
                    readingsSingleUpdate(
                        $hash,
                        $key,
                        $data->{result}{$key} . " " . $units->{$key},
                        1
                    );
                    $success = 1;  # mark success if at least one reading updated
                }
            }
        }

        close($sock);
    }
    else {
        readingsSingleUpdate($hash, "state", "timeout", 1);
    }
    return $success;
}

##########################
# Polling
##########################
sub Marstek_Poll {
    my ($hash) = @_;
    return unless $hash;
    my $success = 0;
    eval {
        $success ||= Marstek_DoRequest($hash, "ES.GetStatus", {
            bat_soc       => "%",
            bat_cap       => "Wh",
            pv_power      => "W",
            ongrid_power  => "W",
            offgrid_power => "W",
            total_pv_energy           => "Wh",
            total_grid_output_energy  => "Wh",
            total_grid_input_energy   => "Wh",
            total_load_energy         => "Wh",
        });

        $success ||= Marstek_DoRequest($hash, "Bat.GetStatus", {
            id              => "",
            soc             => "%",
            charge_flag     => "",
            dischrg_flag    => "",
            bat_temp        => "C",
            bat_capacity    => "Wh",
            rated_capacity  => "Wh",
        });

        $success ||= Marstek_DoRequest($hash, "Wifi.GetStatus", {
            id        => "",
            wifi_mac  => "",
            ssid      => "",
            rssi      => "",
            sta_ip    => "",
        });

        $success ||= Marstek_DoRequest($hash, "ES.GetMode", {
            id             => "",
            mode           => "",
            ct_state       => "",
            total_power    => "W",
            input_energy   => "Wh",
            output_energy  => "Wh",
        });
    };

    if ($@) {
        Log 3, "Marstek Poll error: $@";
    }

    # State korrekt setzen
    readingsSingleUpdate($hash, "state", $success ? "ok" : "timeout", 1);


    InternalTimer(
        gettimeofday() + ($hash->{INTERVAL} // 60),
        sub { Marstek_Poll($hash) },
        0
    );
}
##########################
# Get
##########################
sub Marstek_Get {
    my ($hash, $name, $opt, @args) = @_;

    return "\"get $name\" needs at least one argument" unless(defined($opt));

    if ($opt eq "update") {
        Marstek_Poll($hash);
        return "Update triggered";
    }else {
    # IMPORTANT! This defines the list of possible commands
    my $list = "update:noArg";
        return "Unknown argument $opt, choose one of $list";
    }
  return -1;
   }
1;
#100
Off-Topic / Aw: Shelly Group an der Frankf...
Letzter Beitrag von Prof. Dr. Peter Henning - 19 April 2026, 18:04:24
Darum kann man die jetzt günstig kriegen, mittelfristig geht das m.E. wieder hoch.

LG

pah