@ -2,13 +2,14 @@ rule "Abruf Dienste"
|
||||
when
|
||||
// Time cron "0 * * ? * *" or
|
||||
Time cron "0 0 19 ? * MON-FRI" or
|
||||
Time cron "0 16 14 ? * MON-FRI" or
|
||||
Time cron "0 0 7 ? * SAT,SUN"
|
||||
then
|
||||
logInfo("HTTPGET", "Abfrage Erfolgt")
|
||||
NotificationPatrickPushover.sendCommand("Abfrage Erfolgt")
|
||||
var String jsonString = sendHttpGetRequest("https://fms.ffhstm.de/dienste_lesen_json.php")
|
||||
postUpdate(FFDienstZVD,transform("JSONPATH", "$.DIENSTE.C", jsonString))
|
||||
postUpdate(FFDienstIUK2,transform("JSONPATH", "$.DIENSTE.D1", jsonString))
|
||||
postUpdate(FFDienstIUK2,transform("JSONPATH", "$.DIENSTE.D", jsonString))
|
||||
postUpdate(FFDienstIUK3,transform("JSONPATH", "$.DIENSTE.E", jsonString))
|
||||
var String IUKN = transform("JSONPATH", "$.DIENSTE.F", jsonString)
|
||||
if (!IUKN.contains("DIENSTE")) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import java.util.concurrent.locks.ReentrantLock
|
||||
var ReentrantLock lockState = new ReentrantLock()
|
||||
var Timer FFAlarmTimer = null
|
||||
var Timer FFAlarmSoundTimer = null
|
||||
|
||||
rule "Auswertung Alarm JSON"
|
||||
when
|
||||
@ -47,8 +48,22 @@ then
|
||||
postUpdate(FHZPush,"ON")
|
||||
REMWEBIO001_Ausgang5.sendCommand(ON)
|
||||
REMWEBIO001_Ausgang6.sendCommand(ON)
|
||||
sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile=q96_feuer2&speakerlevel=30")
|
||||
sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile=q96_feuer2&speakerlevel=30")
|
||||
sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile=FirehouseAlarmGongEinsatz&speakerlevel=30")
|
||||
sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile=FirehouseAlarmGongEinsatz&speakerlevel=30")
|
||||
FFAlarmSound.sendCommand(ON)
|
||||
FFAlarmSoundTimer = createTimer(now.plusSeconds(30)) [|
|
||||
sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile=FirehouseAlarmGongEinsatz&speakerlevel=30")
|
||||
sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile=FirehouseAlarmGongEinsatz&speakerlevel=30")
|
||||
if (FFAlarmSound.state = ON) {
|
||||
logInfo("FFRAlarm.rules", "Rescheduling timer")
|
||||
FFAlarmSoundTimer.reschedule(now.plusSeconds(30))
|
||||
} else {
|
||||
logInfo("FFRAlarm.rules", "All done")
|
||||
FFAlarmSoundTimer.cancel()
|
||||
FFAlarmSoundTimer = null
|
||||
}
|
||||
|
||||
]
|
||||
FFAlarmTimer = createTimer(now.plusMinutes(60)) [|
|
||||
postUpdate(FFAlarmTrigger,"OFF")
|
||||
postUpdate(FHZPush,"OFF")
|
||||
|
Reference in New Issue
Block a user