Das geht nicht:
IF ([wz_temp_1_Climate:desired-temp] eq "off") (set wz_temp_1_Climate desired-temp 21)
Das geht, ist aber hässlich bzw. führt zu Log Einträgen...
IF ((fhem "get wz_temp_1_Climate param desired-temp") eq "29.0") (set wz_temp_1_Climate desired-temp 30)
Jemand ne Idee?
Und für was soll das genau sein?
Gib mal bitte ein list vom Device wo dieser Code vor kommt.
...und die Log-Einträge würden mich auch interessieren.
Gruß,
Thorsten
Im Log vom Device steht nicht viel drin.. , das ist das list vom Channel des Device:
Internals:
CHANGED
DEF 31C18802
NAME wz_temp_1_Climate
NOTIFYDEV global
NR 89
STATE Ist-Temp:22.5
TYPE CUL_HM
chanNo 02
device wz_temp_1
READINGS:
2017-10-04 19:55:51 CommandAccepted yes
2016-11-14 21:46:19 R-dayTemp 22 C
2016-11-14 21:46:19 R-daylightSaveTime on
2016-11-14 21:46:19 R-heatCool heating
2016-11-14 21:46:19 R-modePrioManu all
2016-11-14 21:46:19 R-modePrioParty all
2016-11-14 21:46:19 R-nightTemp 17 C
2016-11-14 21:46:19 R-noMinMax4Manu off
2016-11-14 21:46:19 R-sendWeatherData on
2016-11-14 21:46:19 R-showHumidity temp
2016-11-14 21:46:19 R-showInfo time
2016-11-14 21:46:19 R-showSetTemp actTemp
2016-07-26 18:02:14 R-sign off
2016-11-14 21:46:19 R-tempOffset 0.0K
2016-11-14 21:46:19 R-weekPrgSel prog1
2016-11-14 21:46:19 R-winOpnBoost off
2016-11-14 21:48:16 R_P1_0_tempListSat 04:30 17.0 22:00 22.0 24:00 17.0
2016-11-14 21:48:16 R_P1_1_tempListSun 04:30 17.0 22:00 22.0 24:00 17.0
2016-11-14 21:48:16 R_P1_2_tempListMon 04:30 17.0 08:00 21.0 15:00 17.0 22:00 22.0 24:00 17.0
2016-11-14 21:48:16 R_P1_3_tempListTue 04:30 17.0 08:00 21.0 15:00 17.0 22:00 21.0 24:00 17.0
2016-11-14 21:48:16 R_P1_4_tempListWed 04:30 17.0 08:00 21.0 15:00 17.0 22:00 21.0 24:00 17.0
2016-11-14 21:48:16 R_P1_5_tempListThu 04:30 17.0 08:00 21.0 15:00 17.0 22:00 22.0 24:00 17.0
2016-11-14 21:48:16 R_P1_6_tempListFri 04:30 17.0 08:00 21.0 15:00 17.0 22:00 21.0 24:00 17.0
2016-11-14 21:48:16 R_P1_tempList_State verified
2016-11-14 21:48:19 R_P2_0_tempListSat 24:00 17.0
2016-11-14 21:48:19 R_P2_1_tempListSun 24:00 17.0
2016-11-14 21:48:19 R_P2_2_tempListMon 24:00 17.0
2016-11-14 21:48:19 R_P2_3_tempListTue 24:00 17.0
2016-11-14 21:48:19 R_P2_4_tempListWed 24:00 17.0
2016-11-14 21:48:19 R_P2_5_tempListThu 24:00 17.0
2016-11-14 21:48:19 R_P2_6_tempListFri 24:00 17.0
2016-11-14 21:48:19 R_P2_tempList_State verified
2016-11-14 21:48:23 R_P3_0_tempListSat 24:00 17.0
2016-11-14 21:48:23 R_P3_1_tempListSun 24:00 17.0
2016-11-14 21:48:23 R_P3_2_tempListMon 24:00 17.0
2016-11-14 21:48:23 R_P3_3_tempListTue 24:00 17.0
2016-11-14 21:48:23 R_P3_4_tempListWed 24:00 17.0
2016-11-14 21:48:23 R_P3_5_tempListThu 24:00 17.0
2016-11-14 21:48:23 R_P3_6_tempListFri 24:00 17.0
2016-11-14 21:48:23 R_P3_tempList_State verified
2016-11-14 21:48:12 RegL_01. 08:00 00:00
2016-11-14 21:48:15 RegL_07. 01:2C 02:22 03:09 04:3D 05:00 06:00 07:00 08:00 09:87 0A:30 0B:00 0C:00 0D:00 0E:01 0F:04 10:00 11:00 12:09 13:00 14:44 15:36 16:59 17:08 18:45 19:20 1A:45 1B:20 1C:45 1D:20 1E:45 1F:20 20:45 21:20 22:45 23:20 24:45 25:20 26:45 27:20 28:45 29:20 2A:45 2B:20 2C:45 2D:20 2E:44 2F:36 30:59 31:08 32:45 33:20 34:45 35:20 36:45 37:20 38:45 39:20 3A:45 3B:20 3C:45 3D:20 3E:45 3F:20 40:45 41:20 42:45 43:20 44:45 45:20 46:45 47:20 48:44 49:36 4A:54 4B:60 4C:44 4D:B4 4E:59 4F:08 50:45 51:20 52:45 53:20 54:45 55:20 56:45 57:20 58:45 59:20 5A:45 5B:20 5C:45 5D:20 5E:45 5F:20 60:45 61:20 62:44 63:36 64:54 65:60 66:44 67:B4 68:55 69:08 6A:45 6B:20 6C:45 6D:20 6E:45 6F:20 70:45 71:20 72:45 73:20 74:45 75:20 76:45 77:20 78:45 79:20 7A:45 7B:20 7C:44 7D:36 7E:54 7F:60 80:44 81:B4 82:55 83:08 84:45 85:20 86:45 87:20 88:45 89:20 8A:45 8B:20 8C:45 8D:20 8E:45 8F:20 90:45 91:20 92:45 93:20 94:45 95:20 96:44 97:36 98:54 99:60 9A:44 9B:B4 9C:59 9D:08 9E:45 9F:20 A0:45 A1:20 A2:45 A3:20 A4:45 A5:20 A6:45 A7:20 A8:45 A9:20 AA:45 AB:20 AC:45 AD:20 AE:45 AF:20 B0:44 B1:36 B2:54 B3:60 B4:44 B5:B4 B6:55 B7:08 B8:45 B9:20 BA:45 BB:20 BC:45 BD:20 BE:45 BF:20 C0:45 C1:20 C2:45 C3:20 C4:45 C5:20 C6:45 C7:20 C8:45 C9:20 CA:00 CB:00 CC:00 CD:00 CE:00 CF:00 00:00
2016-11-14 21:48:19 RegL_08. 01:00 02:00 03:00 04:00 05:00 06:00 07:00 08:00 09:00 0A:00 0B:00 0C:00 0D:00 0E:00 0F:00 10:00 11:00 12:00 13:00 14:45 15:20 16:45 17:20 18:45 19:20 1A:45 1B:20 1C:45 1D:20 1E:45 1F:20 20:45 21:20 22:45 23:20 24:45 25:20 26:45 27:20 28:45 29:20 2A:45 2B:20 2C:45 2D:20 2E:45 2F:20 30:45 31:20 32:45 33:20 34:45 35:20 36:45 37:20 38:45 39:20 3A:45 3B:20 3C:45 3D:20 3E:45 3F:20 40:45 41:20 42:45 43:20 44:45 45:20 46:45 47:20 48:45 49:20 4A:45 4B:20 4C:45 4D:20 4E:45 4F:20 50:45 51:20 52:45 53:20 54:45 55:20 56:45 57:20 58:45 59:20 5A:45 5B:20 5C:45 5D:20 5E:45 5F:20 60:45 61:20 62:45 63:20 64:45 65:20 66:45 67:20 68:45 69:20 6A:45 6B:20 6C:45 6D:20 6E:45 6F:20 70:45 71:20 72:45 73:20 74:45 75:20 76:45 77:20 78:45 79:20 7A:45 7B:20 7C:45 7D:20 7E:45 7F:20 80:45 81:20 82:45 83:20 84:45 85:20 86:45 87:20 88:45 89:20 8A:45 8B:20 8C:45 8D:20 8E:45 8F:20 90:45 91:20 92:45 93:20 94:45 95:20 96:45 97:20 98:45 99:20 9A:45 9B:20 9C:45 9D:20 9E:45 9F:20 A0:45 A1:20 A2:45 A3:20 A4:45 A5:20 A6:45 A7:20 A8:45 A9:20 AA:45 AB:20 AC:45 AD:20 AE:45 AF:20 B0:45 B1:20 B2:45 B3:20 B4:45 B5:20 B6:45 B7:20 B8:45 B9:20 BA:45 BB:20 BC:45 BD:20 BE:45 BF:20 C0:45 C1:20 C2:45 C3:20 C4:45 C5:20 C6:45 C7:20 C8:45 C9:20 CA:00 CB:00 CC:00 CD:00 CE:00 CF:00 00:00
2016-11-14 21:48:23 RegL_09. 01:00 02:00 03:00 04:00 05:00 06:00 07:00 08:00 09:00 0A:00 0B:00 0C:00 0D:00 0E:00 0F:00 10:00 11:00 12:00 13:00 14:45 15:20 16:45 17:20 18:45 19:20 1A:45 1B:20 1C:45 1D:20 1E:45 1F:20 20:45 21:20 22:45 23:20 24:45 25:20 26:45 27:20 28:45 29:20 2A:45 2B:20 2C:45 2D:20 2E:45 2F:20 30:45 31:20 32:45 33:20 34:45 35:20 36:45 37:20 38:45 39:20 3A:45 3B:20 3C:45 3D:20 3E:45 3F:20 40:45 41:20 42:45 43:20 44:45 45:20 46:45 47:20 48:45 49:20 4A:45 4B:20 4C:45 4D:20 4E:45 4F:20 50:45 51:20 52:45 53:20 54:45 55:20 56:45 57:20 58:45 59:20 5A:45 5B:20 5C:45 5D:20 5E:45 5F:20 60:45 61:20 62:45 63:20 64:45 65:20 66:45 67:20 68:45 69:20 6A:45 6B:20 6C:45 6D:20 6E:45 6F:20 70:45 71:20 72:45 73:20 74:45 75:20 76:45 77:20 78:45 79:20 7A:45 7B:20 7C:45 7D:20 7E:45 7F:20 80:45 81:20 82:45 83:20 84:45 85:20 86:45 87:20 88:45 89:20 8A:45 8B:20 8C:45 8D:20 8E:45 8F:20 90:45 91:20 92:45 93:20 94:45 95:20 96:45 97:20 98:45 99:20 9A:45 9B:20 9C:45 9D:20 9E:45 9F:20 A0:45 A1:20 A2:45 A3:20 A4:45 A5:20 A6:45 A7:20 A8:45 A9:20 AA:45 AB:20 AC:45 AD:20 AE:45 AF:20 B0:45 B1:20 B2:45 B3:20 B4:45 B5:20 B6:45 B7:20 B8:45 B9:20 BA:45 BB:20 BC:45 BD:20 BE:45 BF:20 C0:45 C1:20 C2:45 C3:20 C4:45 C5:20 C6:45 C7:20 C8:45 C9:20 CA:00 CB:00 CC:00 CD:00 CE:00 CF:00 00:00
2017-10-04 20:58:43 boostTime -
2017-10-04 20:58:43 commReporting off
2017-10-04 20:58:43 controlMode manual
2017-10-04 21:08:45 desired-temp 30.0
2017-10-04 21:08:45 humidity 55
2017-10-04 21:08:45 measured-temp 22.5
2017-10-04 19:55:51 recentStateType ack
2017-10-04 21:08:45 state T: 22.5 desired: 30.0
2017-10-04 20:58:43 winOpenReporting off
helper:
expert:
def 1
det 0
raw 1
tpl 0
role:
chn 1
shRegR:
07 00
Attributes:
alias Wandthermostat
event-on-change-reading desired-temp,controlMode
group Temperatur
icon max_wandthermostat
model HM-TC-IT-WM-W-EU
peerIDs 00000000,
room Wohnzimmer
stateFormat Ist-Temp:measured-temp
webCmd desired-temp
Ich dache ich hätte nur ein Fehler im Syntax....
Und wo willst Du da jetzt Deine IF Abfragen einbauen???
Versuch es bitte noch einmal richtig. So kann man Dir ja nicht helfen. Wir brauchen ein list vom DOIF oder notify oder wo du das auch immer einbauen willst.
Vielen Dank für die Mühen....
Also ich einen funktionierenden Watchdog der die Heizung aus macht wenn die Tür länger als 10 minuten auf ist
Internals:
CMD set wz_temp_1_Climate desired-temp off; trigger wd_Kueche_BT_opened .
DEF HM_563F9B:open.* 00:10:00 HM_563F9B:closed.* set wz_temp_1_Climate desired-temp off; trigger wd_Kueche_BT_opened .
NAME wd_Kueche_BT_opened
NOTIFYDEV wd_Kueche_BT_opened,HM_563F9B
NR 165
NTFY_ORDER 50-wd_Kueche_BT_opened
RE1 HM_563F9B:open.*
RE2 HM_563F9B:closed.*
STATE defined
TO 600
TYPE watchdog
READINGS:
2017-10-04 17:45:09 Activated activated
2017-10-04 17:55:09 Triggered triggered
Attributes:
room Watchdog
Jetzt will ich, dass die Heizung wieder angeht, wenn die Tür wieder geschlossen ist (Aber nur wenn der vorherige Watchdog die Heizung auf "off" gesetzt hat):
Internals:
CMD IF ([wz_temp_1_Climate:desired-temp] eq "off") (set wz_temp_1_Climate desired-temp 21); trigger wd_Kueche_BT_closed .
DEF HM_563F9B:closed.* 00:10:00 HM_563F9B:open.* IF ([wz_temp_1_Climate:desired-temp] eq "off") (set wz_temp_1_Climate desired-temp 21); trigger wd_Kueche_BT_closed .
NAME wd_Kueche_BT_closed
NOTIFYDEV wd_Kueche_BT_closed,HM_563F9B
NR 168
NTFY_ORDER 50-wd_Kueche_BT_closed
RE1 HM_563F9B:closed.*
RE2 HM_563F9B:open.*
STATE defined
TO 600
TYPE watchdog
READINGS:
2017-09-14 22:01:08 Activated activated
2017-09-14 22:11:08 Triggered triggered
Attributes:
room Watchdog
Nach ein wenig ausprobieren, kam ich auf die Idee das die IF Abfrage nicht richtig funktioniert. Ich hab folgenden Befehl einfach in Fhem in der Befehlszeile abgesetzt:
IF ([wz_temp_1_Climate:desired-temp] eq "off") (set wz_temp_1_Climate desired-temp 21)
und es passiert nix.
Folgender Befehl funktioniert, ist aber hässlich:
IF ((fhem "get wz_temp_1_Climate param desired-temp") eq "off") (set wz_temp_1_Climate desired-temp 21)
Ich denke, dass hier der Fehler ist: IF ([wz_temp_1_Climate:desired-temp] eq "off")
Oben ist das böse Wort ja schon gefallen - ich würde das mit einem DOIF mit DOELSE und Wait-Attribut lösen. Das DOELSE wird nur nach Ausführung des DOIF oder Initialisierung des Devices ausgeführt. Allerdings gilt das auch anders herum. Es wird also auch nicht 2x die Temperatur abgesenkt, ohne dass sie zwischenzeitlich wieder vom DOIF erhöht wurde. Grob skizziertdefine di_Heizungsabsenkung ([Tuerkontakt:state] eq "open") (set Heizung 5) DOELSE (set Heizung 22)
attr di_Heizungsabsenkung wait 600:600
alternative Grüße
Niels
HM_563F9B:closed.* 00:10:00 HM_563F9B:open.* { fhem("set wz_temp_1_Climate desired-temp 21") if( ReadingsVal('wz_temp_1_Climate','desired-temp','21'] eq 'off' );
fhem("trigger wd_Kueche_BT_closed .");
}