Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » How to use Trigger-Channels?
How to use Trigger-Channels? [message #1758762] Sun, 02 April 2017 11:53 Go to next message
Zocker 1996 is currently offline Zocker 1996Friend
Messages: 2
Registered: April 2017
Junior Member

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.

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?

Re: How to use Trigger-Channels? [message #1759254 is a reply to message #1758762] Sat, 08 April 2017 20:17 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 641
Registered: December 2011
Senior Member
Did you check whether could be of any help for you?
If not, then the Amazon Dash button binding is probably the best example of how to create a trigger channel:

Wrt the bonus question: No, you cannot create your own item types - the problem is indeed that no UI would be able to deal with it, so only the existing types should be used.
Previous Topic:Add Options to String Channel Dynamically
Next Topic:Is it ok to use Thread.sleep() in binding
Goto Forum:

Current Time: Mon Mar 19 01:07:06 GMT 2018

Powered by FUDForum. Page generated in 0.02636 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software