Alarm bei Temperatur unter bestimmtem Wert

Begonnen von linuxq, 06 November 2014, 11:32:58

Vorheriges Thema - Nächstes Thema

linuxq

Hallo,

ich lese die Temperatur in unserem Wohnzimmer von unserem Thermometer des tado (www.tado.com) per Web-Call aus und stelle das in FHEM dar.


################### Tado ###########################
# define tado_temp HTTPMOD http://localhost:90/tadodata/tadocs.json  900
define tado_temp HTTPMOD https://my.tado.com/mobile/1.3/getCurrentState?username=701_ffritz&password=sdfdsfsd 600
attr tado_temp readingsName1 tempist
attr tado_temp readingsName2 tempsoll
attr tado_temp readingsName3 operation
attr tado_temp readingsName4 controlPhase
attr tado_temp readingsRegex1 insideTemp":([\d\.]+)
attr tado_temp readingsRegex2 setPointTemp":([\d\.]+)
attr tado_temp readingsRegex3 operation":"([\w\.]+)
attr tado_temp readingsRegex4 controlPhase":"([\w\.]+)
attr tado_temp requestHeader1 Content-Type: application/json
attr tado_temp requestHeader2 Accept: */*

define FileLog_Tado FileLog ./log/Tado-%Y.log tado_temp
attr FileLog_Tado logtype temptado4:Plot,text
attr FileLog_Tado nrarchive 1

define tado_tempchart SVG FileLog_Tado:temptado4:CURRENT
attr tado_tempchart group tado_graph
attr tado_tempchart label "Temperatur Wohnzimmer: Min: $data{min1}°C, Max: $data{max1}°C, Aktuell: $data{currval1}°C"
attr tado_tempchart room Heizung

define tado_status readingsGroup tado_temp:tempist, tado_temp:operation, tado_temp:controlPhase, tado_temp:tempsoll, Wetter:temperature
attr tado_status alias Status der Heizung (tado°)
attr tado_status group tado
attr tado_status mapping {"operation" => "Modus", "controlPhase" => "Status", "tempist" => "aktuelle Temperatur", "tempsoll" => "Solltemperatur", "temperature" => "Außentemperatur"}
attr tado_status nostate 1
attr tado_status notime 1
attr tado_status room Heizung


Wie kann ich nun den Wert "tado_temp:tempist" überwachen und bei Unter-/Überschreitung eine Aktion auslösen?

Danke für jede Hilfe zu dieser dummen Frage!

Gruß

LinuxQ

maxritti


linuxq

Super, danke! Das geht :)


define di_tado_tempalarm DOIF ([tado_temp:tempist] < 17) (set pushbullet_mm message Tado hat unter 17 Grad | FHEM) DOELSEIF ([tado_temp:tempist] < 15) (set pushbullet_mm message Tado hat unter 15 Grad | FHEM) DOELSEIF ([tado_temp:tempist] < 10) (set pushbullet_mm message Tado ACHTUNG unter 10 Grad | FHEM)

Doggiebert

SW: FHEM 5.5, Raspian, XBMC, Testinstallation auf Win7
HW: Raspi B, 32GB SD, enocean Pi, RFXTRX433E, BSC - MwC-32, Onkyo TX-NR709, Samsung UE55F8090, Jung LS-Eno, permundo SmartPlug, KDG-FB 6490cable (ohne FHEM)

Damian

Zitat von: linuxq am 06 November 2014, 14:32:05
Super, danke! Das geht :)


define di_tado_tempalarm DOIF ([tado_temp:tempist] < 17) (set pushbullet_mm message Tado hat unter 17 Grad | FHEM) DOELSEIF ([tado_temp:tempist] < 15) (set pushbullet_mm message Tado hat unter 15 Grad | FHEM) DOELSEIF ([tado_temp:tempist] < 10) (set pushbullet_mm message Tado ACHTUNG unter 10 Grad | FHEM)


Diese Abfrage wird so nicht gut funktionieren. Temperatur kleiner 10 ist gleichzeitig kleiner als 17, damit werden deine DOELSEIF-Fälle nie zum Zuge kommen. Lösung: Du musst  mit < 10 anfangen, dann < 15  und als letztes <17.

Gruß

Damian
Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF