Camel Kura GPIO component

Camel Kura GPIO component provides a wrapper around a GPIO service feature into Kura Platform. Under the hood, the component uses Device I/O library. Camel Kura GPIO component can be used to read and write state of the GPIO pins.

Maven dependency

In order to take advantage of this component, Maven users should add the following dependency to their POM file:


Available since rhiot.version >= 0.1.3

URI format for GPIO


Where gpioId is a number of the pin. For example to work with the PIN number 9, use the following URI:


Optional URI Parameters

Parameter Default value Description
state false Initial state of the PIN.
direction OUTPUT To configure GPIO pin direction, check Kura GPIO library for more details KuraGPIODirection
trigger BOTH_EDGES To configure GPIO pin trigger, check Kura GPIO library for more details KuraGPIOTrigger
mode OUTPUT_PUSH_PULL To configure GPIO pin mode, check Kura GPIO library for more details KuraGPIOMode
action Default : use Body if Action for output Pin (TOGGLE, BUZZ, HIGH, LOW for digital only)
shutdownState false To configure the pin state value before camel context shutdown
delay 0 To configure BLINK delay
duration 50 To configure BLINK duration


from("kura-gpio://13?mode=INPUT_PULL_DOWN &state=false")



When using producer you can also set or override action using message header with a key of KuraConstants.CAMEL_KURA_GPIO_ACTION


Example: Simple button with LED mode

Plug an button on GPIO 1, and LED on GPIO 2 (with Resistor) and code a route like this