I noticed my rule isn´t wokring anymore since I upgraded to openhab 2.2. Maybe you can check it if there are any issues, but what I can say is that it worked until I upgraded…
var Timer timerKatzenklo = null
rule "Warnung Katzenklo"
Item Katzenklo received update
// Erstellen eines Timers für 1440 Minuten und anschließenden Versenden einer Telegram Nachricht
timerKatzenklo = createTimer
if (Katzenklo.state == CLOSED)
sendNotification("xxxx", "Katzenklo muss mal wieder sauber gemacht werden...!") //Nachricht wird hiermit abgesendet
You should not import anything from org.openhab nor org.joda. All of those classes have moved and are imported for you automatically.
You are missing the | in your timer lambda
Wouldn’t you want to set the timer to null whether or not you sendNodification?
OH 2 is much more strict on syntax checking compared to OH 1, but you should also have seen errors in openhab.log with the line and column number of your Rule file that has the error. Also note, unlike in OH 1 where it will load as much of the file as it can and stop when it hits an error, OH 2 will reject the whole .rules file.
I highly recommend using VSCode with the openHAB extension which has full syntax checking.
unfortunately I don´t understand what you are pointing at
The log gives an error on importing wildcard libs, but using it anyway. So it does not say where the error in this rule is or why it is not running.
I opened the rule wiht VSCode but there seems to be no error as well.
the settings are standard, but preview works so I think it´s all correct. Yes I am running 2.2 release
// Specifies the URL or IP address for the openHAB preview. (Use 'localhost' when developing locally)
// Directly log into openHAB Karaf console. Note that this option is available only if you exposed Karaf console.
"openhab.karafCommand": "ssh openhab@%openhabhost% -p 8101",
// Enables communication with Language Server Protocol - installed in openHAB as 'misc-lsp' add-on
// Specifies the port where openHAB is running its Language Server.
// (optional) Makes 'Show in Paper UI' option open a target URL in external browser
// (optional) If you're using openHAB2 build from before 9th Jan 2017, change this parameter to 'ui'
// (optional) Specifies the Basic Auth password for accessing the openHAB preview/REST API
// Specifies the port for the openHAB preview.
// Takes completions from Language Server instead of REST API
// (optional) Choose between `basicui` and `classicui` for the sitemap preview panel
// Connects to openHAB REST API if set to true. If not, Items tree view and code completions are disabled.
// (optional) Specifies the Basic Auth username for accessing the openHAB preview/REST API
As you can see, it says “Internal error, please look at the server’s logs.”.
Did you check openhab.log? Is there anything informative?
Either way, it’s an issue from Language Server, which belongs to Eclipse SmartHome.
Please +1 or report an issue in the repository I’ve linked above.