Hallo zusammen,
bei folgendem Script bekomme ich in den Fehler:
Warum? Welche Deklaration fehlt noch?
bei folgendem Script bekomme ich in den Fehler:
couldn't resolve reference to JvmIdentifiableElement 'CreateTimer'
Code:
import org.joda.time.DateTime import org.openhab.model.script.actions.Timer var Timer timerStopVorne = null var Timer timerStopSeite = null var Timer timerStartGarten = null var Timer timerStopGarten = null rule "Sprinkler kurz" when Item itmSprinklerProgKurz received command ON then // Alle eventuell bestehenden zurücksetzen if (timerStopVorne != null){ timerStopVorne.cancel timerStopVorne=null } if (timerStopSeite != null){ timerStopSeite.cancel timerStopSeite=null } if (timerStartGarten != null){ timerStartGarten.cancel timerStartGarten=null } if (timerStopGarten != null){ timerStopGarten.cancel timerStopGarten=null } // Sprinkler vorne und an der Seite starten itmSprinklerFront.sendCommand(ON) itmSprinklerSeite.sendCommand(ON) // Sprinkler vorne nach ein paar Minuten stoppen und den hinteren starten timerStopVorne = CreateTimer(now.plusMinutes(5)) [| itmSprinklerFront.sendCommand(OFF) ] timerStartGarten = CreateTimer(now.plusMinutes(5)) [| itmSprinklerFront.sendCommand(ON) ] // Sprinkler hinten und an der Seite stoppen timerStopGarten = CreateTimer(now.plusMinutes(10)) [| itmSprinklerFront.sendCommand(OFF) ] timerStopSeite = CreateTimer(now.plusMinutes(10)) [| itmSprinklerFront.sendCommand(OFF) ] end
Kommentar