Insteon KeyPad issues with rules

I have a system with Insteon Dimmer KeyPads and the USB PLM. I’m trying to set things up so that the various Insteon devices are minimally connected together - just major functions communicated directly. My Openhabian based OpenHab system then uses rules to add more functionality to the system. I have a few weirdnesses in my setup, currently focused on the dining room dimmer keypad.

  1. First, keypadButtons G and H trigger exactly as expected. I’m including their code here just for a reference point.
rule "DiningRoomGButton"
when
        Item diningroomG received update
then
        logInfo( "rules", "diningroomG rule received. diningroomG State: [{}] ", diningroomG.state );
end

rule "DiningRoomHButton"
when
        Item diningroomH received update
then
        logInfo( "rules", "diningroomH rule received. diningroomH State: [{}] ", diningroomH.state );
end
  1. keypadButtonB never triggers rules. This button is configured to directly control a switchlinc, and that works fine. But the rule never actually triggers as evidenced by the lack of a log entry.
// turn on the front porch light whenever the hall light is turned on
rule "DiningRoomBButton"
when
        Item diningroomB received update
then
        logInfo( "rules", "diningroomB rule received. diningroomB State: [{}]", diningroomB.state );
        if (diningroomB.state == ON) {
                        frontporch.sendCommand(100);
        } else {
                        frontporch.sendCommand(0);
        }
end
  1. keypadButtonE actually does work. But strangely, whenever it does trigger, G & H (above) also trigger. Other than that, keypadButtonE works exactly as expected.
rule "DiningRoomEButton"
when
        Item diningroomE received update
then
        logInfo( "rules", "diningroomE rule received. diningroomE State: [{}] ", diningroomE.state );
        if (diningroomE.state == ON) {
                        ChristmasTree.sendCommand(ON);
                        ChristmasWindow.sendCommand(ON);
//                      ChristmasOutside.sendCommand(ON);
        } else if (diningroomE.state == OFF) {
                        ChristmasTree.sendCommand(OFF);
                        ChristmasWindow.sendCommand(OFF);
//                      ChristmasOutside.sendCommand(OFF);
        }

end

Here are the item definitions of each of these items:

Switch diningroomB "Front Porch Light Switch" (Lights) [ "Lighting" ] {channel="insteon:device:home:2a9abd:keypadButtonB", homekit="Lighting.OnState"}
Switch diningroomC "Living Room Light Switch" (Lights) [ "Lighting" ] {channel="insteon:device:home:2a9abd:keypadButtonC", homekit="Lighting.OnState"}
Switch diningroomD "Office Light Switch" (Lights) [ "Lighting" ] {channel="insteon:device:home:2b9abd:keypadButtonD", homekit="Lighting.OnState"}
Switch diningroomF "Kids Room Switch" (Lights) [ "Lighting" ] {channel="insteon:device:home:2b9abd:keypadButtonF", homekit="Lighting.OnState"}

// E G & H aren't connected by switch to anything and are free for openhab scripting. they also won't do anything if openhab is down
Switch diningroomE "Christmas Light Switch" (Lights) [ "Lighting" ] {channel="insteon:device:home:2b9abd:keypadButtonE", homekit="Lighting.OnState"}
Switch diningroomG "Music Play" (Lights) [ "Lighting" ] {channel="insteon:device:home:2b9abd:keypadButtonG", homekit="Lighting.OnState"}
Switch diningroomH "Playlist" (Lights) [ "Lighting" ] {channel="insteon:device:home:2b9abd:keypadButtonH", homekit="Lighting.OnState"}

And here is the things definition for the keypad:

  Thing device 2b9b8c [address="2b.9b.8c", productKey="F00.00.16"] {
    Channels:
      Type loadDimmer : loadDimmer [ group="0xf1" ]
      Type keypadButtonB : keypadButtonB [ group="0xf2" ]
      Type keypadButtonC : keypadButtonC [ group="0xf3" ]
      Type keypadButtonD : keypadButtonD [ group="0xf4" ]
      Type keypadButtonE : keypadButtonE [ group="0xf5" ]
      Type keypadButtonF : keypadButtonF [ group="0xf6" ]
      Type keypadButtonG : keypadButtonG [ group="0xf7" ]
      Type keypadButtonH : keypadButtonH [ group="0xf8" ]
  }

I think those group numbers are supposed to be unique to any particular switch… they are not right now… I assume I would have to use InsteonTerminal to program the group (in the responder for each button?) on each of the keypadlinc units. (I have four total.)

I threw the logger into Debug mode for insteon through the CLI and have that below, but it’s like drinking from a firehose and I have no idea really what I’m looking for. The message editor was not pleased with the 200kb of output even a few seconds of debug output created, but let me know if I should get to you in some other way.

I did use InsteonTerminal to confirm that the database has different group numbers for each of the buttons.

InsteonTerminal database output:

>>> drk.getdb()
getting db, be patient!
sent db query msg, incoming records:  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68dbbuilder.done() is called
0fff USB modem                      3D.99.97  RESP  10101010 group: 00 ON LVL: 254 RMPRT:  28 BUTTON:   1
0ff7 USB modem                      3D.99.97  RESP  10100010 group: f2 ON LVL: 255 RMPRT:  31 BUTTON:   2
0fef USB modem                      3D.99.97  RESP  10100010 group: f3 ON LVL: 255 RMPRT:  31 BUTTON:   3
0fe7 USB modem                      3D.99.97  RESP  10100010 group: f4 ON LVL: 255 RMPRT:  31 BUTTON:   4
0fdf USB modem                      3D.99.97  RESP  10100010 group: f5 ON LVL: 255 RMPRT:  31 BUTTON:   5
0fd7 USB modem                      3D.99.97  RESP  10100010 group: f6 ON LVL: 255 RMPRT:  31 BUTTON:   6
0fcf USB modem                      3D.99.97  RESP  10100010 group: f7 ON LVL: 255 RMPRT:  31 BUTTON:   7
0fc7 USB modem                      3D.99.97  RESP  10100010 group: f8 ON LVL: 255 RMPRT:  31 BUTTON:   8
0fbf 2B.9A.21                       2B.9A.21  RESP  10101010 group: 02 ON LVL: 254 RMPRT:  28 BUTTON:   1
0fb7 2B.9A.21                       2B.9A.21  CTRL  11100010 group: 01 ON LVL:   3 RMPRT:  28 BUTTON:   1
0faf Kids Room Light                20.76.82  RESP  10100010 group: f6 ON LVL:   0 RMPRT:   0 BUTTON: 246
0fa7 Kids Room Light                20.76.82  CTRL  11100010 group: f6 ON LVL:   0 RMPRT:   0 BUTTON: 246
0f9f Kids Room Light                20.76.82  RESP  10101010 group: 01 ON LVL: 255 RMPRT:  28 BUTTON:   6
0f97 Kids Room Light                20.76.82  CTRL  11100010 group: 06 ON LVL:   3 RMPRT:  28 BUTTON:   6
0f8f 20.DC.C9                       20.DC.C9 (CTRL) 01100010 group: 07 ON LVL:   3 RMPRT:  31 BUTTON:   7
0f87 20.DC.C9                       20.DC.C9 (CTRL) 01100010 group: 02 ON LVL:   3 RMPRT:  31 BUTTON:   2
0f7f 20.DC.C9                       20.DC.C9 (RESP) 00100010 group: 11 ON LVL: 255 RMPRT:  31 BUTTON:   4
0f77 20.DC.C9                       20.DC.C9 (RESP) 00100010 group: 13 ON LVL: 255 RMPRT:  31 BUTTON:   6
0f6f 20.DC.C9                       20.DC.C9 (RESP) 00100010 group: 15 ON LVL: 255 RMPRT:  31 BUTTON:   5
0f67 20.DC.C9                       20.DC.C9 (RESP) 00100010 group: 19 ON LVL: 255 RMPRT:  31 BUTTON:   2
0f5f Office Light                   1F.EE.1B (CTRL) 01100010 group: 04 ON LVL:   3 RMPRT:  31 BUTTON:   4
0f57 Front Porch Keypad             2B.9B.8C (CTRL) 01100010 group: 07 ON LVL:   3 RMPRT:  31 BUTTON:   7
0f4f Kids Room Light                20.76.82  RESP  10100010 group: 06 ON LVL:   0 RMPRT:   0 BUTTON:   6
0f47 Dining Room Light              1F.ED.6F  CTRL  11100010 group: 04 ON LVL:   0 RMPRT:   0 BUTTON:   4
0f3f Front Hall Light               1F.EE.37 (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   2
0f37 Living Room Top Light          1F.EE.31 (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   3
0f2f Front Porch Keypad             2B.9B.8C (RESP) 00100010 group: 03 ON LVL: 255 RMPRT:  31 BUTTON:   1
0f27 Front Porch Keypad             2B.9B.8C (RESP) 00100010 group: 04 ON LVL: 255 RMPRT:  31 BUTTON:   3
0f1f Front Porch Keypad             2B.9B.8C (CTRL) 01100010 group: 01 ON LVL:   3 RMPRT:   0 BUTTON:   1
0f17 Front Porch Keypad             2B.9B.8C (CTRL) 01100010 group: 03 ON LVL:   3 RMPRT:   0 BUTTON:   3
0f0f 17.6E.68                       17.6E.68 (RESP) 00101010 group: 01 ON LVL: 255 RMPRT:  28 BUTTON:   1
0f07 Dining Room Light              1F.ED.6F (CTRL) 01100010 group: 01 ON LVL:   3 RMPRT:  31 BUTTON:   1
0eff 34.17.49                       34.17.49 (CTRL) 01100010 group: 01 ON LVL:   3 RMPRT:  28 BUTTON:   1
0ef7 Front Porch Keypad             2B.9B.8C  CTRL  11100010 group: 02 ON LVL:   3 RMPRT:  28 BUTTON:   2
0eef Front Porch Keypad             2B.9B.8C  RESP  10100010 group: 02 ON LVL:   3 RMPRT:  28 BUTTON:   2
0ee7 Back Hall Light                20.88.FC (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   8
0edf Office Light                   1F.EE.1B (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   4
0ed7 Front Porch Keypad             2B.9B.8C (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   7
0ecf Front Porch Keypad             2B.9B.8C (RESP) 00100010 group: 05 ON LVL: 255 RMPRT:  31 BUTTON:   4
0ec7 Front Porch Keypad             2B.9B.8C (RESP) 00100010 group: 07 ON LVL: 255 RMPRT:  31 BUTTON:   1
0ebf Front Porch Keypad             2B.9B.8C (CTRL) 01100010 group: 04 ON LVL:   3 RMPRT:   0 BUTTON:   4
0eb7 Front Porch Keypad             2B.9B.8C (CTRL) 01100010 group: 07 ON LVL:   3 RMPRT:   0 BUTTON:   7
0eaf Back Hall Light                20.88.FC (CTRL) 01101010 group: 08 ON LVL:   3 RMPRT:   0 BUTTON:   8
0ea7 34.17.49                       34.17.49 (RESP) 00101010 group: 00 ON LVL:   0 RMPRT:  28 BUTTON:   3
0e9f Living Room Top Light          1F.EE.31 (CTRL) 01100010 group: 03 ON LVL:   3 RMPRT:  31 BUTTON:   3
0e97 Front Hall Light               1F.EE.37 (CTRL) 01100010 group: 02 ON LVL:   3 RMPRT:  31 BUTTON:   2
0e8f Front Hall Light               1F.EE.37 (CTRL) 01100010 group: 08 ON LVL:   3 RMPRT:   0 BUTTON:   8
0e87 Back Hall Light                20.88.FC (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   6
0e7f Dining Room Light              1F.ED.6F (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   4
0e77 Front Hall Light               1F.EE.37 (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   8
0e6f Office Light                   1F.EE.1B (RESP) 00100010 group: 01 ON LVL: 255 RMPRT:  31 BUTTON:   5
0e67 Front Porch Keypad             2B.9B.8C (RESP) 00100010 group: 02 ON LVL: 255 RMPRT:  31 BUTTON:   8
0e5f Front Porch Keypad             2B.9B.8C (RESP) 00100010 group: 03 ON LVL: 255 RMPRT:  31 BUTTON:   4
0e57 Front Porch Keypad             2B.9B.8C (RESP) 00100010 group: 05 ON LVL: 255 RMPRT:  31 BUTTON:   5
0e4f Dining Room Light              1F.ED.6F  RESP  10100010 group: 04 ON LVL:   0 RMPRT:   0 BUTTON:   4
0e47 Office Light                   1F.EE.1B (CTRL) 01100010 group: 05 ON LVL:   3 RMPRT:   0 BUTTON:   5
0e3f Front Porch Keypad             2B.9B.8C (CTRL) 01100010 group: 05 ON LVL:   3 RMPRT:   0 BUTTON:   5
0e37 Back Hall Light                20.88.FC (CTRL) 01100010 group: 06 ON LVL:   3 RMPRT:   0 BUTTON:   6
0e2f Front Porch Keypad             2B.9B.8C (CTRL) 01100010 group: 08 ON LVL:   3 RMPRT:   0 BUTTON:   8
0e27 USB modem                      3D.99.97  CTRL  11101010 group: 07 ON LVL:   3 RMPRT:  31 BUTTON:   7
0e1f USB modem                      3D.99.97  CTRL  11100010 group: 06 ON LVL:   3 RMPRT:  31 BUTTON:   6
0e17 USB modem                      3D.99.97  CTRL  11101010 group: 05 ON LVL:   3 RMPRT:  31 BUTTON:   5
0e0f USB modem                      3D.99.97  CTRL  11100010 group: 04 ON LVL:   3 RMPRT:  31 BUTTON:   4
0e07 USB modem                      3D.99.97  CTRL  11100010 group: 03 ON LVL:   3 RMPRT:  31 BUTTON:   3
0dff USB modem                      3D.99.97  CTRL  11101010 group: 02 ON LVL:   3 RMPRT:  31 BUTTON:   2
0df7 USB modem                      3D.99.97  CTRL  11101010 group: 01 ON LVL:   3 RMPRT:  31 BUTTON:   1
0def USB modem                      3D.99.97  CTRL  11100010 group: 08 ON LVL:   3 RMPRT:  31 BUTTON:   8
0de7 00.00.00                       00.00.00 (STOP) 00000000 group: 00 ON LVL:   0 RMPRT:   0 BUTTON:   0

Thank you for looking at this!!

Rudy

  • Platform information:
    • Hardware: Raspberry Pi 4
    • OS: openhabian
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: 3.0.1

Okay, partial answer: tl;dr: typo in .items file. but D/G/H weirdness persists. and admin control of button doesn’t work as expected.

I just went into the Insteon Device for the dining room in the admin web page. Interestingly, under Channels, it’s saying only D through H are linked. “Keypad Button B” is listed as being ‘unlinked.’ (as well as A and C.)

I looked very closely at the items file and realized I had a typo in the keypadlinc’s address… a “2b” in the working Switch’s address was “2a” in the non-working address.

When I changed it, that rule now basically works.

Still doesn’t solve why D triggers G and H though… but not the reverse.

Also, why does triggering the Channel from the Settings->Things->(device)->Channels->Keypad Button B->dingingroomB->ON trigger the switch to turn its light on, the rule to run, but NOT the actual link inside the keypadlinc? The light that is actually controlled by that switch doesn’t turn on.

If I do it from the keypadlinc itself, it works as expected.

  1. You already sort of did this, verify that the button’s Channel is linked to an Item. If not then the link between the Channels and Items are not correct.

  2. Verify that the button’s Channel is linked to the Item you expect it to be linked to. If not then the links between the Channels and Items are not correct.

  3. Watch events.log and verify whether or not the Items are receiving commands or changes. Alternatively bring up the Developer Sidebar and start the event stream and watch for commands, changes, and updates to the Items.

If 1 and 2 are verified but you don’t see events in 3, the problem lies in the binding or your Items. If you do see the events the problem lies in the rules.

1 Like

Try using the console commands, specifically openhab:insteon display_local_database and openhab:insteon display_channels to make sure things are configured as expected.

This is how the Insteon devices work. if you want to turn on the light you’ll need to send a command to it.