Chromecast binding - wiki rule language?

Hi,
with openhabian 3.2.0.M4, I’m following the rule creation example reported here:

I’ve created a Ecma script with:


val castActions = getActions("chromecast","chromecast:chromecast:1")
val success  = castActions.playURL("http://192.168.1.160:81/mjpg/front1/video.mjpg")

but got the error that getAction is not defined.

This one play fine:

var  PlayUri = "http://192.168.1.160:81/mjpg/front1/video.mjpg";
var status = itemRegistry.getItem("Chromecast_PlayURI").getState();
var success = events.sendCommand("Chromecast_PlayURI", PlayUri)

My question is what is the language for the rules used in the example in the wiki?

Thanks, BR

that looks like rules DSL, the historically long term language of OH seen in most documentation.

Sorry I’m pretty new to OH started from v.3.1.0.

Right now what is the recommended language for rules, i know a little of python and javascirpt, can write them with ECMA script or better switch to DSL?

Thanks, BR

You have a free choice, I’m not making a recommendation. There are many such discussions on this forum -
https://community.openhab.org/search?q=rule%20language%20recommendation