Rule Script not working

I have a simple script in an rule built by PaperUI, that is not working and throwing an error in the log.

Script in PaperUI rule:(Javascript)
say(“Die Temperatur im Garten ist 20 Grad”,“voicerss:deDE”,“sonos:PLAY1:RINCON_5CAAFD45A16201400”);

Error in log:
[ERROR] [internal.handler.ScriptActionHandler] - Script execution failed: ReferenceError: “say” is not defined in <eval> at line number 1

I am using OH2 2.0.0-1 on RPI

Help needed.

This sounds like you are using the experimental rules engine. Unfortunately, given it is experimental, to quote from the docs:

Note: If you use it, this is at your own risk. Especially, you should not expect any documentation besides what is available on the Eclipse SmartHome website.

I don’t know if there is a significant population of users on this forum that are using this yet. If no one can help you might try the old default rules engine or when it becomes available, the JSR233 binding which lets you write rules in Jython, JavaScript, or Groovy.

Hey Rich, thx for your reply and the explanation. Yes, it is experimental and therefore I thought that someone could help and find the bug (or my mistake). I want to bring this a step forward.

In parallel I will start building a .rules file

I am really a newbe ragarding OH2 and want to learn and take challenges :slight_smile:

In the ‘backend’ am working with a Homematic system that is running fine.

OH is really hard. I wouldn’t take on the challenge of the barely documented rules engine that almost no one uses until you have everything else down pat. There are challenges enough with the defaults.

1 Like