# How to use Trigger-Channels in openHAB2?

**URL:** <https://community.openhab.org/t/how-to-use-trigger-channels-in-openhab2/26002>\
**Category:** Bindings\
**Tags:** openhab2, development\
**Created:** [April 2, 2017, 11:23am UTC](https://community.openhab.org/t/how-to-use-trigger-channels-in-openhab2/26002 "2017-04-02T11:23:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zocker1996](https://community.openhab.org/user_avatar/community.openhab.org/zocker1996/32/39206_2.png) [@Zocker1996](https://community.openhab.org/u/Zocker1996)\
**Post date:** [April 2, 2017, 11:23am UTC](https://community.openhab.org/t/how-to-use-trigger-channels-in-openhab2/26002/1 "2017-04-02T11:23:22Z")

</div>

Hi!

tl;dr:  
I need to model buttons for a thing and according to the documentation the best way to do this is trigger channels. I cant find any good examples for triggers, so could someone provide some code and xml as sample? I already added some xml and in the Thing description the channel is shown but I cant link anything to it nor is it rendered in the control section in paper ui.

Background:  
I’m developing a binding for my personal use: I recently build myselfe a home entertainment system with many devices. I use lirc and a raspi to control them via ir commands. I could use the lirc server and connect it to openhab via a http binding, but that doesnt fit all my needs, same goes for the exec binding: I want to model each of this devices as things. The usual items like SwitchItems and StringItems fit for most porpuses, but I also need to be able to use something just like buttons, which I can directly map to the ir remote command.  
Therefor I want to use trigger channels. Bonus question: Can I create my own Items by extending GenericItem and using a own ItemFactory? Would these items be rendered correctly in paper ui out of the box?

---

<div class="post-metadata">

**Author:** ![kabili207](https://community.openhab.org/user_avatar/community.openhab.org/kabili207/32/23135_2.png) [@kabili207](https://community.openhab.org/u/kabili207)\
**Post date:** [July 7, 2017, 5:37pm UTC](https://community.openhab.org/t/how-to-use-trigger-channels-in-openhab2/26002/2 "2017-07-07T17:37:27Z")

</div>

Since you’ve mentioned LIRC, you may be interesting in trying my LIRC binding.

JAR of the current version is here: [https://drive.google.com/file/d/0By8uaRmIJMCFeUZWWXJIQ2tiZ3M/view?usp=sharing21](https://drive.google.com/file/d/0By8uaRmIJMCFeUZWWXJIQ2tiZ3M/view?usp=sharing21)

Just drop it in the addons folder and it should work.

Instructions on how to use it are available on github: [https://github.com/kabili207/smarthome/blob/lirc/extensions/binding/org.eclipse.smarthome.binding.lirc/README.md29](https://github.com/kabili207/smarthome/blob/lirc/extensions/binding/org.eclipse.smarthome.binding.lirc/README.md29)
