OH2 exec item works manually but not from rule

So I have an item defined with the exec binding:

String Script_Trotter_Family_Right_Holiday_Lights  <light> (gHolidayIndoorPower, gIndoor) { channel="exec:command:trotter_modlet_switch:input"}

which runs a command on a server to trigger a modlet switch to turn some lights on/off.
I have the item defined in my sitemap, and it works well through BasicUI:

Switch item=Script_Trotter_Family_Right_Holiday_Lights label="Stair Lights"

So, as usual. my next step was to use this item in a rule:

rule "indoorHolidayLightsOn"
Time cron "0 43 04  ? * * *" 

I used to have other items in the rule too, but I removed them to try to figure out what’s going on here. I have enabled debug for the exec binding

One point I discovered while trying this today:

the event log updates in both cases (baseui and rule):
2017-12-09 04:43:00.097 [ItemCommandEvent ] - Item 'Script_Trotter_Family_Right_Holiday_Lights' received command ON

BUT the openhab.log only shows the exec debug when I trigger it from BasicUI…

PS I am using the smarthome designer so I have ruled out typos in my config, etc

Thanks in advance!

Extraneous or ?

Yes, I actually fixed that before running the test but forgot to update my post. I have corrected it in the above post now

Please tryout .postUpdate(ON) as in my understanding, :input is meant as an state input.

Tried replacing sendCommand(ON) with postUpdate(ON) but it didn’t work.
I don’t see anything in the event log or the exec debug output when the rule triggers.

Have you used a logInfo in order the check wether the rule triggers in the first place?

Good idea. I added some logging to the rule and I see the log statements. The exec command still isn’t working from the rule though.

rule "indoorHolidayLightsOn"
Time cron "0 04 13 ? * * *"
logError(“holidaylight.rules”, “indoorHolidayLightsOn starting”)
logError(“holidaylight.rules”, “indoorHolidayLightsOn complete”)

Submitted PR with the fix for this

Please note that channels have a type in openHAB 2 so its not supposed to be both an channel accepting OnOffTypes and String types. See also a previous PR:

Rather help by testing the rewrite of the exec binding: