Insteon AutoOff Timer triggered by switch

Hoping someone can tell me what I am doing wrong here. I have an Insteon dimmer 2477D switch, OH 1.8.3 and InsteonPLM with 1.9.0 SNAPSHOT binding.

Looking to have a rule that if someone physically taps switch once it leaves light on for 10 minutes and if they tap the switch twice it leaves the light on for 2 hours. For testing purposes I have the single tap set to 10 seconds…

My rule seems to work, but only if I turn it on through the OH app. Once turned on through app, I see rule kick in and turn it off 10 seconds later. However, if I physically goto the switch and single tap it, it never turns off. This is exactly the opposite of what I am wanting. I am wanting it to trigger when physically changed at the switch.

    import org.openhab.core.library.types.*
    import org.openhab.model.script.actions.*
    import java.lang.Math
    import java.util.Calendar
    import java.util.Date
    import java.util.TimeZone
    import java.text.SimpleDateFormat

var Timer ClickTimer = null
var Timer LightTimer = null

rule "Garage Light Auto Off"
    Item garagelight received command ON
    if (ClickTimer == null) {
        ClickTimer = createTimer(now.plusMillis(500), [|
            if(LightTimer != null) LightTimer.cancel
            LightTimer = createTimer(now.plusSeconds(10), [|
                LightTimer = null
        if(ClickTimer != null) ClickTimer.cancel
        ClickTimer = null
        if(LightTimer != null) LightTimer.cancel
        LightTimer = createTimer(now.plusHours(2), [|
            LightTimer = null

My logs show this when tapping the switch.

2016-07-27 23:49:18.685 [INFO ] [.o.b.i.i.device.MessageHandler] - LightOnDimmerHandler: device 30.B7.45 was turned on REGULAR. Sending poll request to get actual level
2016-07-27 23:49:20.364 [INFO ] [.o.b.i.i.device.MessageHandler] - DimmerRequestReplyHandler: set device 30.B7.45 to level 100
2016-07-27 23:53:26.153 [INFO ] [.o.b.i.i.device.MessageHandler] - DimmerRequestReplyHandler: set device 30.B7.45 to level 100

Anyone have any ideas where I am going wrong? I am so close…

Is the rule triggering? Add a logInfo as the first line in the rule to see if it is being triggered at all and failing or not triggering at all.

Second, it is very likely that when you tap the physical switch it results in an update, not a command, so you may need to change your trigger to received update.

From distant memory I remember that some Insteon devices supported a double-press, and would send out a group broadcast to a certain group in such cases. Almost sure your 2477D supports this. Would get you around the issues involved with timers.

From the insteonplm wiki:

Switch keypadSwitchFastOnOff "main fast on/off {insteonplm="xx.xx.xx:F00.00.14#loadswitchfastonoff,related=xx.xx.xx"}

You should get an openhab event now whenever you double-tap your switch. I think the “related” keyword is needed here such that it polls itself right away to detect if the light has gone off.

Feel free to improve the wiki documentation so it actually explains what the fastonoff feature is useful for.