Zum Inhalt springen

FHEMWEB/ControlMiniDash: Unterschied zwischen den Versionen

Aus FHEMWiki
Schwatter (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Schwatter (Diskussion | Beiträge)
Zeile 35: Zeile 35:


Beispiel ohne Buttons:
Beispiel ohne Buttons:
<syntaxhighlight lang="Perl">
<syntaxhighlight lang="perl">
  attr <device> webCmd climacontrol
  attr <device> webCmd climacontrol
  attr <device> widgetOverride climacontrol:controlminidash,measured-temp,humidity,desired-temp,state,#,#,#,#,#,#
  attr <device> widgetOverride climacontrol:controlminidash,measured-temp,desired-temp,measured-temp,humidity,desired-temp,state,#,#,#,#,#,#
</syntaxhighlight>
</syntaxhighlight>


Beispiel mit FhemSVG-Buttons:
Beispiel mit FhemSVG-Buttons:
<syntaxhighlight lang="Perl">
<syntaxhighlight lang="perl">
  attr <device> webCmd climacontrol
  attr <device> webCmd climacontrol
  attr <device> widgetOverride climacontrol:controlminidash,measured-temp,humidity,desired-temp,state,sani_heating_manual@controlMode.manual,rc_MINUS@temp-5,sani_heating_boost@boost,sani_heating_automatic@controlMode.automatic,rc_PLUS@temp+5,sani_heating_mode@night_day'
  attr <device> widgetOverride climacontrol:controlminidash,measured-temp,desired-temp,measured-temp,humidity,desired-temp,state,sani_heating_manual@controlMode.manual,rc_MINUS@temp-5,sani_heating_boost@boost,sani_heating_automatic@controlMode.automatic,rc_PLUS@temp+5,sani_heating_mode@night_day'
</syntaxhighlight>
</syntaxhighlight>


Wenn im Device keine Luftfeuchte/Humidity vorhanden ist, kann diese mit # an der dritten Position ausgeblendet werden.
Wenn im Device keine Luftfeuchte/Humidity vorhanden ist, kann diese mit # an der dritten Position ausgeblendet werden.
<syntaxhighlight lang="Perl">
<syntaxhighlight lang="perl">
  attr HmIP_KLHR_STHD webCmd controlMD auto:manu:boost:on:off
  attr HmIP_KLHR_STHD webCmd controlMD auto:manu:boost:on:off
  attr HmIP_KLHR_STHD widgetOverride controlMD:controlminidash,measured-temp,#,desired-temp,HEATING_COOLING,#,#,#,#,#,#
  attr HmIP_KLHR_STHD widgetOverride controlMD:controlminidash,measured-temp,desired-temp,measured-temp,#,desired-temp,HEATING_COOLING,#,#,#,#,#,#
</syntaxhighlight>
</syntaxhighlight>


Zeile 67: Zeile 67:
| Aktiviert das Dashboard-Widget.
| Aktiviert das Dashboard-Widget.
|-
|-
| <code>measured-temp</code>
|<code>ring1Val</code>
| Reading
|Istwert
| Anzeige der gemessenen Temperatur.
|Zeigt nach dem Setzen des Sollwerts den aktuellen Istwert an.
|-
|-
| <code>humidity</code>
|<code>ring2Val</code>
| Reading
|Sollwert
| Anzeige der Luftfeuchtigkeit. Nicht vorhanden → mit <code>#</code> deaktivieren.
|Zu setzender Wert.
|-
|-
| <code>desired-temp</code>
| <code>info1@unit</code>
| Reading / Setter
| Status-/Textfeld
| Anzeige und Steuerung der Solltemperatur.
| Freiwählbares Reading.
|-
|-
| <code>state</code>
| <code>info2@unit</code>
| Anzeige eines Status- oder Textfelds.
| Status-/Textfeld
| Das Reading ist frei wählbar.  
| Freiwählbares Reading.
|-
| <code>info3@unit</code>
| Status-/Textfeld
| Freiwählbares Reading.
|-
| <code>info4@unit</code>
| Status-/Textfeld
| Freiwählbares Reading.  
|-
|-
| <code>btnXIcon@btnXCmd </code>
| <code>btnXIcon@btnXCmd </code>
Zeile 101: Zeile 109:
Beispiel-Definition:
Beispiel-Definition:


<syntaxhighlight lang="Perl">
<syntaxhighlight lang="perl">
  defmod widgetControlUserAttr dummy
  defmod widgetControlUserAttr dummy
  attr widgetControlUserAttr userattr btn1Cmd btn1Color btn1Icon btn2Cmd btn2Color btn2Icon btn3Cmd btn3Color btn3Icon btn4Cmd btn4Color btn4Icon btn5Cmd btn5Color btn5Icon btn6Cmd btn6Color btn6Icon
  attr widgetControlUserAttr userattr btn1Cmd btn1Color btn1Icon btn2Cmd btn2Color btn2Icon btn3Cmd btn3Color btn3Icon btn4Cmd btn4Color btn4Icon btn5Cmd btn5Color btn5Icon btn6Cmd btn6Color btn6Icon
Zeile 126: Zeile 134:
  attr widgetControlUserAttr subType Thermostat
  attr widgetControlUserAttr subType Thermostat
  attr widgetControlUserAttr webCmd climacontrol
  attr widgetControlUserAttr webCmd climacontrol
  attr widgetControlUserAttr widgetOverride climacontrol:controlminidash,measured-temp,humidity,desired-temp,state,#,#,#,#,#,#
  attr widgetControlUserAttr widgetOverride climacontrol:controlminidash,measured-temp,desired-temp,measured-temp,humidity,desired-temp,state,#,#,#,#,#,#
  setstate widgetControlUserAttr heating
  setstate widgetControlUserAttr heating
  setstate widgetControlUserAttr 2025-11-30 11:51:37 desired-temp 20.0
  setstate widgetControlUserAttr 2025-11-30 11:51:37 desired-temp 20.0
Zeile 136: Zeile 144:
=== Mit DOIF diverse Widgets in einem Table zusammenfassen ===
=== Mit DOIF diverse Widgets in einem Table zusammenfassen ===


<syntaxhighlight lang="Perl">
<syntaxhighlight lang="perl">
  defmod di_widget DOIF ##
  defmod di_widget DOIF ##
  attr di_widget room Test
  attr di_widget room Test
  attr di_widget uiTable {package ui_Table;;\
  attr di_widget uiTable {package ui_Table;;\
  $_param='controlminidash,measured-temp,humidity,desired-temp,state,sani_heating_manual@controlMode.manual,rc_MINUS@temp-5,sani_heating_boost@boost,sani_heating_automatic@controlMode.automatic,rc_PLUS@temp+5,sani_heating_mode@night_day';;\
  $_param='controlminidash,measured-temp,desired-temp,measured-temp,humidity,desired-temp,state,sani_heating_manual@controlMode.manual,rc_MINUS@temp-5,sani_heating_boost@boost,sani_heating_automatic@controlMode.automatic,rc_PLUS@temp+5,sani_heating_mode@night_day';;\
  $_set="set desired-temp";;\
  $_set="set desired-temp";;\
  }\
  }\

Version vom 3. Januar 2026, 01:05 Uhr

Mini
Mini

ControlMiniDash – kompaktes Dashboard-Widget

Dieses Widget stellt ein kompaktes Dashboard bereit, das direkt in einem Device im FHEMWEB (PGM2) Frontend definiert werden kann. Es wurde ursprünglich für ein Klimaanlagen-Setup entwickelt und dient als flexibles, visuelles Bedienelement für Geräte wie z. B. den HmIP-WTH-2.

Das Widget besteht aus zentralen Informationstexten, einem farbigen Außenring, einem Sliderbutton für die Solltemperatur sowie bis zu sechs frei definierbaren Buttons.

Hilfe


Funktionen

Zentrale Textelemente

Vier Textelemente werden in der Mitte angezeigt:

  • Gemessene Temperatur
  • Luftfeuchtigkeit
  • Solltemperatur
  • Freitextfeld / Statusfeld

Interaktion

  • Der runde Button auf dem Außenring ermöglicht das direkte Erhöhen oder Verringern der Solltemperatur.
  • Der Außenring ändert seine Farbe abhängig von der aktuellen Temperatur (7 °C bis 30 °C).
  • Links (1–3) und rechts (4–6) können jeweils drei frei belegbare Buttons definiert werden.
  • Für die Buttons können sowohl Data-URL-SVG als auch FHEM-SVG-Icons verwendet werden.


Einrichtung im Device

Das Widget wird über webCmd und widgetOverride aktiviert.

Beispiel ohne Buttons:

 attr <device> webCmd climacontrol
 attr <device> widgetOverride climacontrol:controlminidash,measured-temp,desired-temp,measured-temp,humidity,desired-temp,state,#,#,#,#,#,#

Beispiel mit FhemSVG-Buttons:

 attr <device> webCmd climacontrol
 attr <device> widgetOverride climacontrol:controlminidash,measured-temp,desired-temp,measured-temp,humidity,desired-temp,state,sani_heating_manual@controlMode.manual,rc_MINUS@temp-5,sani_heating_boost@boost,sani_heating_automatic@controlMode.automatic,rc_PLUS@temp+5,sani_heating_mode@night_day'

Wenn im Device keine Luftfeuchte/Humidity vorhanden ist, kann diese mit # an der dritten Position ausgeblendet werden.

 attr HmIP_KLHR_STHD webCmd controlMD auto:manu:boost:on:off
 attr HmIP_KLHR_STHD widgetOverride controlMD:controlminidash,measured-temp,desired-temp,measured-temp,#,desired-temp,HEATING_COOLING,#,#,#,#,#,#

Parameterübersicht

Abschnitt Bedeutung Beschreibung
<beliebigerName> webCmd-Zuweisung Gibt an, welches webCmd das Widget repräsentiert.
controlminidash Widget-Typ Aktiviert das Dashboard-Widget.
ring1Val Istwert Zeigt nach dem Setzen des Sollwerts den aktuellen Istwert an.
ring2Val Sollwert Zu setzender Wert.
info1@unit Status-/Textfeld Freiwählbares Reading.
info2@unit Status-/Textfeld Freiwählbares Reading.
info3@unit Status-/Textfeld Freiwählbares Reading.
info4@unit Status-/Textfeld Freiwählbares Reading.
btnXIcon@btnXCmd Button-Attribute Individuelle Definition von Icon und Befehl für die sechs möglichen Buttons.
Beispiel:sani_heating_automatic@controlMode.automatic
# Button ausblenden Beispiel:
 climacontrol:controlminidash,measured-temp,humidity,desired-temp,state,#,#,#,#,#,#


Individualisierung per userattr

Damit können Fhemcmd's, Farbe und Icon für jeden der sechs Buttons separat konfiguriert werden.

Beispiel-Definition:

 defmod widgetControlUserAttr dummy
 attr widgetControlUserAttr userattr btn1Cmd btn1Color btn1Icon btn2Cmd btn2Color btn2Icon btn3Cmd btn3Color btn3Icon btn4Cmd btn4Color btn4Icon btn5Cmd btn5Color btn5Icon btn6Cmd btn6Color btn6Icon
 attr widgetControlUserAttr btn1Cmd   set widgetControlUserAttr state cooling
 attr widgetControlUserAttr btn1Color blue
 attr widgetControlUserAttr btn1Icon  data:image/svg+xml;;charset=utf-8,%3Csvg%20xmlns...
 attr widgetControlUserAttr btn2Cmd   { fhem("set widgetControlUserAttr desired-temp ".(ReadingsVal("widgetControlUserAttr","desired-temp",0)-0.5)) }
 attr widgetControlUserAttr btn2Color blue
 attr widgetControlUserAttr btn2Icon  data:image/svg+xml;;charset=utf-8,%3Csvg%20xmlns...
 attr widgetControlUserAttr btn3Cmd   set widgetControlUserAttr state off
 attr widgetControlUserAttr btn3Icon  data:image/svg+xml...
 attr widgetControlUserAttr btn4Cmd   set widgetControlUserAttr state heating
 attr widgetControlUserAttr btn4Color red
 attr widgetControlUserAttr btn4Icon  data:image/svg+xml...
 attr widgetControlUserAttr btn5Cmd   { fhem("set widgetControlUserAttr desired-temp ".(ReadingsVal("widgetControlUserAttr","desired-temp",0)+0.5)) }
 attr widgetControlUserAttr btn5Color red
 attr widgetControlUserAttr btn5Icon  data:image/svg+xml...
 attr widgetControlUserAttr btn6Cmd   set widgetControlUserAttr state on
 attr widgetControlUserAttr btn6Color green
 attr widgetControlUserAttr btn6Icon  data:image/svg+xml...
 attr widgetControlUserAttr readingList measured-temp humidity desired-temp state
 attr widgetControlUserAttr room Test
 attr widgetControlUserAttr setList measured-temp humidity desired-temp state
 attr widgetControlUserAttr subType Thermostat
 attr widgetControlUserAttr webCmd climacontrol
 attr widgetControlUserAttr widgetOverride climacontrol:controlminidash,measured-temp,desired-temp,measured-temp,humidity,desired-temp,state,#,#,#,#,#,#
 setstate widgetControlUserAttr heating
 setstate widgetControlUserAttr 2025-11-30 11:51:37 desired-temp 20.0
 setstate widgetControlUserAttr 2025-11-30 11:42:42 humidity 56
 setstate widgetControlUserAttr 2025-11-30 11:42:48 measured-temp 19
 setstate widgetControlUserAttr 2025-11-30 11:51:21 state heating

Mit DOIF diverse Widgets in einem Table zusammenfassen

 defmod di_widget DOIF ##
 attr di_widget room Test
 attr di_widget uiTable {package ui_Table;;\
 $_param='controlminidash,measured-temp,desired-temp,measured-temp,humidity,desired-temp,state,sani_heating_manual@controlMode.manual,rc_MINUS@temp-5,sani_heating_boost@boost,sani_heating_automatic@controlMode.automatic,rc_PLUS@temp+5,sani_heating_mode@night_day';;\
 $_set="set desired-temp";;\
 }\
 widget([TH_DG_HM:desired-temp],$_param,$_set)|\
 widget([TH_Kz_w_HM:desired-temp],$_param,$_set)\
 widget([TH_Kz_o_HM:desired-temp],$_param,$_set)|\
 widget([TH_Kueche_HM:desired-temp],$_param,$_set)\
 widget([TH_Keller_HM:desired-temp],$_param,$_set)|\
 widget([TH_Bad_HM:desired-temp],$_param,$_set)