%2$s will be replaced with the contents of the Item linked to the Input channel. Sending a command to the Item linked to the Input channel will cause the script to execute.
2018-03-30 02:17:37.223 [ERROR] [hab.binding.exec.handler.ExecHandler] - An exception occurred while formatting the command line with the current time and input values : ‘Format specifier ‘%2$s’’
In the meantime I’ve left exec binding for OH2 and I’ve used a simple rule:
(example for Black ink)
rule MG8150toner
when
Time cron “* 0/15 * * * ?” // this one cycles every 15 minutes.
then
val black = executeCommandLine(“sh /etc/openhab2/myscripts/CanonMG8150_SupplyLev_Black.sh”, 5000)
CanonMG8150_SupplyLev_Black.postUpdate(black)
end
and just one item (Number!!!)
Number CanonMG8150_SupplyLev_Black “Black Level [%d %%]” (gFF_Library, gMaintenance)