defmod SmartGrid_doif DOIF (([[$SELF:P_my1begin,"00:00"]-[$SELF:P_my1end,"00:01"]|[$SELF:P_my1tag,0]] \
or [[$SELF:P_my2begin,"00:00"]-[$SELF:P_my2end,"00:01"]|[$SELF:P_my2tag,0]])\
and [?$SELF:P_button] eq "Auto"\
and [?Anwesendheit_doif] eq "present"\
and [?DimplexWPManager:dimhp_temperature_dhw:d] < 48\
or [$SELF:P_button] eq "Auto")\
(set DimplexWPManager dimhp_temperature_dhwset 48)\
(set DimplexWPManager dimhp_input_sgready_green on) \
(set DimplexSmartGrid_green on,set Turbo_MODE off)\
DOELSEIF\
(([[$SELF:P_my3begin,"00:00"]-[$SELF:P_my3end,"00:01"]|[$SELF:P_my3tag,0]]\
and [?Anwesendheit_doif] eq "present"\
and [?$SELF:P_button] eq "Auto")\
or ([AktuelleLeistungJSON:state:d] > 2600 )\
and [?$SELF:P_button] eq "Auto")\
(set DimplexWPManager dimhp_temperature_dhwset 60)\
(set DimplexWPManager dimhp_input_sgready_green on)\
(set DimplexSmartGrid_green on)\
DOELSEIF \
(([00:01]-[23:59]|0123456) and [$SELF:P_button] eq "Turbo_MODE")\
(set DimplexWPManager dimhp_temperature_dhwset 60)\
(set DimplexWPManager dimhp_input_sgready_green on,set DimplexSmartGrid_green on,set Turbo_MODE on)\
(set SmartGrid_doif P_button Auto,set Turbo_MODE off)\
DOELSEIF \
([$SELF:P_button] eq "Aus") \
(set DimplexWPManager dimhp_temperature_dhwset 48)\
(set DimplexWPManager dimhp_input_sgready_green off)\
(set DimplexSmartGrid_green off)\
DOELSE\
(set DimplexWPManager dimhp_input_sgready_green off)\
(set DimplexSmartGrid_green off)
attr SmartGrid_doif comment cmdstate Automatik,Automatik,Automatik,Automatik|Manuell An,Manuell An,Manuell An,Manuell An|Manuell Aus,Manuell Aus,Manuell Aus,Manuell Aus|Aus,Aus,Aus,Aus\
\
DOELSE\
(set DimplexWPManager dimhp_input_sgready_green off)\
(set DimplexSmartGrid_green off)
attr SmartGrid_doif devStateIcon cmd_1:general_auto_an@green cmd_2:general_auto_an@green cmd_3.2|cmd_3.1:general_an@yellow cmd_4|initialized:general_aus@red cmd_5:general_auto_aus@green
attr SmartGrid_doif do always
attr SmartGrid_doif group Smardgrid
attr SmartGrid_doif icon helper_doif
attr SmartGrid_doif readingList P_button P_my1begin P_my1end P_my1tag P_my2begin P_my2end P_my2tag P_my3begin P_my3end P_my3tag P_Timer1
attr SmartGrid_doif room Technik--Dimplex
attr SmartGrid_doif setList P_my1tag:12345,0123456,06 \
P_my2tag:12345,0123456,06\
P_my3tag:12345,0123456,06\
P_my1begin:time \
P_my1end:time \
P_my2begin:time \
P_my2end:time\
P_my3begin:time \
P_my3end:time\
P_button:uzsuSelectRadio,Auto,Turbo_MODE,Aus\
P_Timer1:slider,9,600,18000,1
attr SmartGrid_doif wait 0:0:0,0,[$SELF:P_Timer1]:0:600
attr SmartGrid_doif webCmd P_button:Manuelle Timer in Sek:P_Timer1
setstate SmartGrid_doif cmd_1
setstate SmartGrid_doif 2026-01-11 18:43:37 Device AktuelleLeistungJSON
setstate SmartGrid_doif 2026-01-11 18:58:51 P_Timer1 17409
setstate SmartGrid_doif 2026-01-11 18:44:44 P_button Auto
setstate SmartGrid_doif 2025-04-14 19:07:13 P_my1begin 05:00
setstate SmartGrid_doif 2025-04-14 19:26:15 P_my1end 16:45
setstate SmartGrid_doif 2025-04-14 19:26:25 P_my1tag 12345
setstate SmartGrid_doif 2025-04-14 19:26:44 P_my2begin 07:00
setstate SmartGrid_doif 2025-04-14 19:27:00 P_my2end 16:45
setstate SmartGrid_doif 2025-04-14 19:26:34 P_my2tag 06ZitatDemnach sind einfache Anführungszeichen zu benutzenMit einfachen Anfuehrungszeichen findet keine Ersetzung von perl Variablen (wie $x) statt, mit doppelten Anfuehrungszeichen schon.
ZitatUnrecognized character \xE2; marked by <-- HERE after n_GetFile(<-- HERE near column 15 at (eval 27) line 1.
defmod forum_test DOIF ([{sunset("HORIZON=-2.2",0,"16:00","23:59")}-24:00]\
and [Wetterstation:luminosity] == 0\
and [Wetterstation:UVR:d1] <= 2.1\
and [Bewohner:state] ne "home")\
(set Wohnzimmerlicht on)\
\
DOELSEIF ([23:00]\
and [Bewohner:state] ne "home")\
(set Wohnzimmerlicht off)ZitatInternals:
CFGFN
DEF ([{sunset("HORIZON=-2.2",0,"16:00","23:59")}-24:00]
and [Wetterstation:luminosity] == 0
and [Wetterstation:UVR:d1] <= 2.1
and [Bewohner:state] ne "home")
(set Wohnzimmerlicht on)
DOELSEIF ([23:00]
and [Bewohner:state] ne "home")
(set Wohnzimmerlicht off)
FUUID 69650da1-f33f-30f6-fa9d-615d9beb30b85f33
MODEL FHEM
NAME forum_test
NOTIFYDEV Wetterstation,global,Bewohner
NR 343818
NTFY_ORDER 50-forum_test
STATE initialized
TYPE DOIF
VERSION 30659 2025-12-25 12:37:16
eventCount 1
READINGS:
2026-01-12 16:05:05 cmd 0
2026-01-12 16:05:05 mode enabled
2026-01-12 16:05:05 state initialized
2026-01-12 16:05:05 timer_01_c01 12.01.2026 17:02:36
2026-01-12 16:05:05 timer_02_c01 13.01.2026 00:00:00
2026-01-12 16:05:05 timer_03_c02 12.01.2026 23:00:00
ZitatEinzelne Dateien aus dem SVN holen
Manchmal wird im Forum die Empfehlung gegeben Die Fehler-bereinigte Datei bitte direkt aus dem SVN holen. Dies kann mit der Perlfunktion { Svn_GetFile('from SVN Path', 'to local Path') } direkt in der FHEM Kommandozeile erfolgen, hier ein paar Beispiele:
{ Svn_GetFile('FHEM/DevIo.pm', 'FHEM/DevIo.pm') }
{ Svn_GetFile('contrib/86_FS10.pm', 'FHEM/86_FS10.pm') }
{ Svn_GetFile('fhem.cfg', 'minimal.cfg') }
Wie man sieht, kann man sich damit auch aktuelle Dateien aus dem SVN contrib Pfad in den lokalen FHEM Pfad holen.
Zitat von: DS_Starter am 12 Januar 2026, 15:33:46Den VorschlagDanke, hab' ich mal gesetzt und neu gestartet.
Steilheit auf 1.2 erhöhen → WP‑Peaks werden durchgelassen