Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to use Trigger-Channels?
https://www.eclipse.org/forums/index.php/mv/msg/1085353/1758762/#msg_1758762
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?
]]>2017-04-02T11:53:26-00:00Re: How to use Trigger-Channels?
https://www.eclipse.org/forums/index.php/mv/msg/1085353/1759254/#msg_1759254
https://github.com/eclipse/smarthome/pull/2537 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: https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.amazondashbutton
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.]]>Kai Kreuzer2017-04-08T20:17:59-00:00