openHAB - Barometer Bricklet

Bemerkung

Die openHAB-Dokumentation ist nur auf Englisch verfügbar.

Warnung

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

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

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

Thing

UID:
  • tinkerforge:brickletbarometer:[UID]
Required firmware version:
  • 2.0.3
Firmware update supported:
  • yes
Channels:
Actions:
Parameters:
  • Reference Air Pressure – Type: decimal, Default: 1013.25, Min: 10, Max: 1200
  • The reference air pressure in hPa for the altitude calculation. Valid values are between 10 and 1200. Setting the reference to the current air pressure results in a calculated altitude of 0 cm.

  • Pressure Moving Average Length – Type: integer, Default: 25, Min: 0, Max: 25
  • The length of the moving average for the air pressure. The moving average is calculated over the normal averages.

  • Pressure Average Length – Type: integer, Default: 10, Min: 0, Max: 10
  • The number of samples to average over for the air pressure.

  • Temperature Average Length – Type: integer, Default: 10, Min: 0, Max: 255
  • The number of samples to average over for the temperature.

  • I2C Mode – Type: Choice, Default: Fast
  • Possible modes are:
    • 0: Fast (400kHz)
    • 1: Slow (100kHz)
    • If you have problems with obvious outliers in the Barometer Bricklet measurements, they may be caused by EMI issues. In this case it may be helpful to lower the I2C speed. It is however not recommended to lower the I2C speed in applications where a high throughput needs to be achieved.
    • Options: Fast, Slow

Channels

Air Pressure

The measured air pressure

Type:
  • Number:Pressure
UID:
  • tinkerforge:brickletbarometer:[UID]:BrickletBarometerAirPressure
Read only:
  • Yes
Unit:
  • Bar
Range:
  • 0.01 Bar to 1.2 Bar (Step 1e-06 Bar)
Parameters:
  • Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval in milliseconds. A value of 0 disables automatic updates.
Altitude

The relative altitude. The value is calculated based on the difference between the current air pressure and the reference air pressure.

Type:
  • Number:Length
UID:
  • tinkerforge:brickletbarometer:[UID]:BrickletBarometerAltitude
Read only:
  • Yes
Unit:
  • Meter
Parameters:
  • Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
  • Specifies the update interval in milliseconds. A value of 0 disables automatic updates.

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:brickletbarometer:[UID]")
val hwVersion = actions.brickletBarometerGetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))

Basic Actions

brickletBarometerGetAirPressure()
Return Map:
  • airPressure – Type: int, Unit: 1/1000 hPa, Range: [10000 to 1200000]

Returns the air pressure of the air pressure sensor.

If you want to get the air pressure periodically, it is recommended to use the Air Pressure channel and set the period with the configuration of Air Pressure.

brickletBarometerGetAltitude()
Return Map:
  • altitude – Type: int, Unit: 1 cm, Range: [-231 to 231 - 1]

Returns the relative altitude of the air pressure sensor. The value is calculated based on the difference between the current air pressure and the reference air pressure that can be set with the thing configuration.

If you want to get the altitude periodically, it is recommended to use the Altitude channel and set the period with the configuration of Altitude.

brickletBarometerGetReferenceAirPressure()
Return Map:
  • airPressure – Type: int, Unit: 1/1000 hPa, Range: [10000 to 1200000], Default: 1013250

Returns the reference air pressure as set by the thing configuration.

Advanced Actions

brickletBarometerGetAveraging()
Return Map:
  • movingAveragePressure – Type: short, Range: [0 to 25], Default: 25
  • averagePressure – Type: short, Range: [0 to 10], Default: 10
  • averageTemperature – Type: short, Range: [0 to 255], Default: 10

Returns the averaging configuration as set by the thing configuration.

Neu in Version 2.0.1 (Plugin).

brickletBarometerGetIdentity()
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