I changed my code a bit to round the value for PWM and to see what’s happening in LogViewer. But it still doesn’t work
rule "LED1 dimmer"
when
Item LED1 received command
then
var DimmerPercent=LED1.state as DecimalType //Input Level
logInfo("demo.rules", "Percent from dimmer " + DimmerPercent)
var PWMValue=((((DimmerPercent.intValue)*255).intValue)/100).intValue //Calculating Value for PWM
logInfo("demo.rules", "Value for PWM " + PWMValue)
executeCommandLine("pigs p 21 {}",PWMValue)
logInfo("demo.rules", "Command executed")
end
execCommandLine isn’t shown as executed in LogViewer.