openHAB - Multi Touch Bricklet 2.0

Warning

The openHAB bindings are still in beta, but the development was stopped.

This is the description of the openHAB API bindings for the Multi Touch Bricklet 2.0. General information and technical specifications for the Multi Touch Bricklet 2.0 are summarized in its hardware description.

An installation guide for the openHAB API bindings is part of their general description.

Thing

UID:
  • tinkerforge:brickletmultitouchv2:[UID]
Required firmware version:
  • 2.0.0
Firmware update supported:
  • yes
Channels:
Actions:
Parameters:
  • Sensitivity – Type: integer, Default: 181, Min: 5, Max: 201
  • The sensitivity of the electrodes. An electrode with a high sensitivity will register a touch earlier then an electrode with a low sensitivity. If you build a big electrode you might need to decrease the sensitivity, since the area that can be charged will get bigger. If you want to be able to activate an electrode from further away you need to increase the sensitivity.

  • Proximity Detection – Type: boolean, Default: true
  • It is recommended that you disable the proximity feature if not needed. This will reduce the amount of traffic that is produced.

  • Touch LED – Type: Choice, Default: Show Touch
  • Configures the touch LED to be either turned off, turned on, blink in heartbeat mode or show the touch state (electrode touched = LED on).
  • Options: Off, On, Show Heartbeat, Show Touch

  • Electrode Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval for the electrode and proximity state in milliseconds. A value of 0 disables automatic updates.

  • Electrode 0 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 1 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 2 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 3 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 4 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 5 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 6 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 7 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 8 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 9 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 10 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Electrode 11 Enabled – Type: boolean, Default: true
  • A disabled electrode will always return false as its state. If you don't need all electrodes you can disable the electrodes that are not needed. Disabling electrodes will also reduce power consumption.

  • Status LED Configuration – Type: Choice, Default: Show Status
  • The status LED configuration. By default the LED shows communication traffic between Brick and Bricklet, it flickers once for every 10 received data packets. You can also turn the LED permanently on/off or show a heartbeat. If the Bricklet is in bootloader mode, the LED is will show heartbeat by default.
  • Options: Off, On, Show Heartbeat, Show Status

Channels

Electrode 0

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode0
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 0 Enabled is enabled.
Electrode 1

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode1
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 1 Enabled is enabled.
Electrode 2

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode2
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 2 Enabled is enabled.
Electrode 3

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode3
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 3 Enabled is enabled.
Electrode 4

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode4
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 4 Enabled is enabled.
Electrode 5

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode5
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 5 Enabled is enabled.
Electrode 6

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode6
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 6 Enabled is enabled.
Electrode 7

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode7
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 7 Enabled is enabled.
Electrode 8

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode8
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 8 Enabled is enabled.
Electrode 9

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode9
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 9 Enabled is enabled.
Electrode 10

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode10
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 10 Enabled is enabled.
Electrode 11

The current touch state. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Electrode11
Read only:
  • No
Predicate:
  • This channel will only be available if Electrode 11 Enabled is enabled.
Proximity

If a hand or similar is in proximity to the electrodes, this channel is toggled. The proximity is activated with a distance of 1-2cm. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

Type:
  • Contact
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Proximity
Read only:
  • No
Predicate:
  • This channel will only be available if Proximity Detection is enabled.
Recalibrate Electrodes

Recalibrates the electrodes. Trigger this channel whenever you changed or moved you electrodes.

Type:
  • Commands (String)
UID:
  • tinkerforge:brickletmultitouchv2:[UID]:BrickletMultiTouchV2Recalibrate
Read only:
  • No
Commands:
  • Accepts any string

Actions

Actions can be used in rules by creating an action object. All actions return a Map<String, Object>. Returned values can be accessed by name, sometimes the type deduction needs some hints, as shown below:

val actions = getActions("tinkerforge", "tinkerforge:brickletmultitouchv2:[UID]")
val hwVersion = actions.brickletMultiTouchV2GetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))

Basic Actions

brickletMultiTouchV2GetTouchState()
Return Map:
  • state – Type: boolean[], Length: 13

Returns the current touch state. The state is given as a array of bools.

Element 0 to 11 represent the 12 electrodes and element 12 represents the proximity.

If an electrode is touched, the corresponding element is true. If a hand or similar is in proximity to the electrodes, element 12 is true.

The proximity is activated with a distance of 1-2cm. An electrode is already counted as touched if a finger is nearly touching the electrode. This means that you can put a piece of paper or foil or similar on top of a electrode to build a touch panel with a professional look.

If you want to get the value periodically, it is recommended to use the Electrode 0 channel. You can set the channel configuration with the thing configuration.

brickletMultiTouchV2Recalibrate()

Recalibrates the electrodes. Call this function whenever you changed or moved you electrodes.

brickletMultiTouchV2GetElectrodeConfig()
Return Map:
  • enabledElectrodes – Type: boolean[], Length: 13, Default: {true, true, true, true, true, true, true, true, true, true, true, true, true}

Returns the electrode configuration, as set by the thing configuration.

brickletMultiTouchV2GetElectrodeSensitivity()
Return Map:
  • sensitivity – Type: int, Range: [5 to 201], Default: 181

Returns the current sensitivity, as set by the thing configuration.

brickletMultiTouchV2GetTouchLEDConfig()
Return Map:
  • config – Type: int, Range: See constants, Default: 3

Returns the LED configuration as set by the thing configuration

The following constants are available for this function:

For config:

  • val TOUCH_LED_CONFIG_OFF = 0
  • val TOUCH_LED_CONFIG_ON = 1
  • val TOUCH_LED_CONFIG_SHOW_HEARTBEAT = 2
  • val TOUCH_LED_CONFIG_SHOW_TOUCH = 3

Advanced Actions

brickletMultiTouchV2GetChipTemperature()
Return Map:
  • temperature – Type: int, Unit: 1 °C, Range: [-215 to 215 - 1]

Returns the temperature as measured inside the microcontroller. The value returned is not the ambient temperature!

The temperature is only proportional to the real temperature and it has bad accuracy. Practically it is only useful as an indicator for temperature changes.

brickletMultiTouchV2GetStatusLEDConfig()
Return Map:
  • config – Type: int, Range: See constants, Default: 3

Returns the configuration as set by the thing configuration

The following constants are available for this function:

For config:

  • val STATUS_LED_CONFIG_OFF = 0
  • val STATUS_LED_CONFIG_ON = 1
  • val STATUS_LED_CONFIG_SHOW_HEARTBEAT = 2
  • val STATUS_LED_CONFIG_SHOW_STATUS = 3
brickletMultiTouchV2GetSPITFPErrorCount()
Return Map:
  • errorCountAckChecksum – Type: long, Range: [0 to 232 - 1]
  • errorCountMessageChecksum – Type: long, Range: [0 to 232 - 1]
  • errorCountFrame – Type: long, Range: [0 to 232 - 1]
  • errorCountOverflow – Type: long, Range: [0 to 232 - 1]

Returns the error count for the communication between Brick and Bricklet.

The errors are divided into

  • ACK checksum errors,
  • message checksum errors,
  • framing errors and
  • overflow errors.

The errors counts are for errors that occur on the Bricklet side. All Bricks have a similar function that returns the errors on the Brick side.

brickletMultiTouchV2Reset()

Calling this function will reset the Bricklet. All configurations will be lost.

After a reset you have to create new device objects, calling functions on the existing ones will result in undefined behavior!

brickletMultiTouchV2GetIdentity()
Return Map:
  • uid – Type: String, Length: up to 8
  • connectedUid – Type: String, Length: up to 8
  • position – Type: char, Range: ['a' to 'h', 'z']
  • hardwareVersion – Type: short[], Length: 3
    • 0: major – Type: short, Range: [0 to 255]
    • 1: minor – Type: short, Range: [0 to 255]
    • 2: revision – Type: short, Range: [0 to 255]
  • firmwareVersion – Type: short[], Length: 3
    • 0: major – Type: short, Range: [0 to 255]
    • 1: minor – Type: short, Range: [0 to 255]
    • 2: revision – Type: short, Range: [0 to 255]
  • deviceIdentifier – Type: int, Range: [0 to 216 - 1]

Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.

The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port). A Bricklet connected to an Isolator Bricklet is always at position 'z'.

The device identifier numbers can be found here

Internal Actions

brickletMultiTouchV2ReadUID()
Return Map:
  • uid – Type: long, Range: [0 to 232 - 1]

Returns the current UID as an integer. Encode as Base58 to get the usual string version.