Subscribe to Insteon key presses to do IO

Was just reading the Insteon Binding page on the following link and have some general questions:

The use case for me is to run openHAB on a Raspberry and use it to control a relay upon depressing one of the buttons on a KeypadLink Dimmer 8-Button switch. For example when button G is switched on it’d supply power to the relay and when button G is switched off it’d cut power to the relay.

The following delcares a subscription to a KeypadLink Dimmer 8-Button (identified by F00.00.16), with a unique address AA.BB.CC (printed on the label on the switch), named as MyKeypad via the Insteon Model 2413U (/dev/tty/USB0).

Dimmer keypadDimmer           "MyKeypad"                          { channel="insteon:device:home:MyKeypad:loadDimmer" }

Bridge insteon:network:home [port="/dev/ttyUSB0"] {
  Thing device MyKeypad [address="AA.BB.CC", productKey="F00.00.16"] {
    Channels:
      Type switch : keypadButtonA [ group="0xf3" ]
      Type switch : keypadButtonB [ group="0xf4" ]
      Type switch : keypadButtonC [ group="0xf5" ]
      Type switch : keypadButtonD [ group="0xf6" ]
      Type switch : keypadButtonE [ group="0xf7" ]
      Type switch : keypadButtonF [ group="0xf8" ]
      Type switch : keypadButtonG [ group="0xf9" ]
  }
}

Frame label="MyKeypad" {
          Switch item=keypadSwitch label="MyKeypad"
          Switch item=keypadButtonA label="button A"
          Switch item=keypadButtonB label="button B"
          Switch item=keypadButtonC label="button C"
          Switch item=keypadButtonD label="button D"
          Switch item=keypadButtonE label="button E"
          Switch item=keypadButtonF label="button F"
          Switch item=keypadButtonG label="button G"
    }
  1. Is this all I need in order to listen to the buttons being pressed on this dimmer?

  2. With the above setup do I still have to link the 2413U to anything? Or it’d just passively sit on the network and hand over any messages going on the network to openHab for it to process?

  3. The following is shown as an example on the page if the Insteon Hub is used. Does this mean with the Hub it needs to be polled (here 1000 seconds) in order to get status of the keypad I am interested in, whereas with the 2413U it’d be notified right away when a button on the keypad is pressed?

/hub2/my_user_name:my_password@192.168.1.100:25105,poll_time=1000
  1. How can I set it such that once it has detected a button is pressed it can do an IO operation such as turning one of the GPIO pins to on? It appears there is no content on the IO Service page on the following URL.
    https://www.openhab.org/docs/developer/ioservices/

I can’t speak to the Insteon setup, but for step 4 there is a GPIO binding. Alternatively if you are having trouble with the GPIO binding or if you want to control pins on a remote Pi you could use something like my MQTTany software.

Please refer to to https://www.openhab.org/addons/bindings/insteon/#keypads. It should hopefully answer your questions about keypad buttons. Once you have an item receiving events from the device, you should be able to create a rule to handle the request however you want.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.