Methods of custom class unknown in rules, but works from JSR223


I’ve implemented a binding that contains an action class with static methods. They return a custom builder to create a configuration and apply it.

Now I’m facing problems when I try to use it from rules. The static method is called and returns the builder (verified in debugger), but I can’t call any method of the builder in the rule.

import org.openhab.binding.tado.TadoActions
import org.openhab.binding.tado.internal.TadoHvacChange

rule "Back to schedule"
        Item BackToScheduleRule received command ON

fails with error message

Rule 'Back to schedule': An error occurred during the script execution: The name '<XMemberFeatureCallImplCustom>.followSchedule()' cannot be resolved to an item or type.

But everything is working fine in JSR223 with a Javascript rule

'use strict';


var tadoActions = Java.type("org.openhab.binding.tado.TadoActions");

var sRule = new SimpleRule() {
    execute: function( module, input) {
        events.postUpdate("BackToScheduleJS", "OFF");

        new Trigger(
            new Configuration({
                "itemName": "BackToScheduleJS",
                "command": "ON"


It looks like the rule knows the action class, but not the returned class org.openhab.binding.tado.internal.TadoHvacChange.

Can you please help me resolving the issue?
I’d be fine with using JSR223, but it’s a public binding, so both ways should work.

Thanks you very much!

1 Like

I’ve just answered you on

Note that the rule action definition is planned to be reworked at ESH to make the solution available in the old and new rule engine likewise - so I won’t go into the analysis of your specific problem as this anyhow will become deprecated.