openHAB - PTC 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 PTC Bricklet. General information and technical specifications for the PTC Bricklet are summarized in its hardware description.

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

Thing

UID:
  • tinkerforge:brickletptc:[UID]
Required firmware version:
  • 2.0.2
Firmware update supported:
  • yes
Channels:
Actions:
Parameters:
  • Wire Mode – Type: Choice, Default: 2-wire
  • The wire mode of the sensor. Possible values are 2, 3 and 4 which correspond to 2-, 3- and 4-wire sensors. The value has to match the jumper configuration on the Bricklet.
  • Options: 2-wire, 3-wire, 4-wire

  • Noise Rejection Filter Frequency – Type: Choice, Default: 50Hz
  • Sets the noise rejection filter to either 50 Hz or 60 Hz. Noise from 50 Hz or 60 Hz power sources (including harmonics of the AC power’s fundamental frequency) is attenuated by 82dB
  • Options: 50Hz, 60Hz

  • Sensor Type – Type: Choice, Default: Pt100
  • The type of the sensor. The value has to match the jumper configuration on the Bricklet or else the calculated resistance will not be correct.
  • Options: Pt100, Pt1000

Channels

Temperature

Temperature of the connected sensor

Type:
  • Number:Temperature
UID:
  • tinkerforge:brickletptc:[UID]:BrickletPTCTemperature
Read only:
  • Yes
Unit:
  • Celsius
Range:
  • -246 Celsius to 849 Celsius (Step 0.01 Celsius)
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.
Resistance

The value as measured by the MAX31865 precision delta-sigma ADC. Configure the thing to Pt 100 or Pt 1000, to make sure the conversion is correct.

Type:
  • Number:ElectricResistance
UID:
  • tinkerforge:brickletptc:[UID]:BrickletPTCResistance
Read only:
  • Yes
Unit:
  • Ohm
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.
Sensor Connected

Indicates if the sensor is connected correctly. If this is disabled, there is either no Pt100 or Pt1000 sensor connected, the sensor is connected incorrectly or the sensor itself is faulty.

Type:
  • Contact
UID:
  • tinkerforge:brickletptc:[UID]:BrickletPTCSensorConnected
Read only:
  • No

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

Basic Actions

brickletPTCGetTemperature()
Return Map:
  • temperature – Type: int, Unit: 1/100 °C, Range: [-24600 to 84900]

Returns the temperature of connected sensor.

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

brickletPTCIsSensorConnected()
Return Map:
  • connected – Type: boolean

Returns true if the sensor is connected correctly.

If this function returns false, there is either no Pt100 or Pt1000 sensor connected, the sensor is connected incorrectly or the sensor itself is faulty.

brickletPTCGetWireMode()
Return Map:
  • mode – Type: short, Range: See constants, Default: 2

Returns the wire mode as set by the thing configuration

The following constants are available for this function:

For mode:

  • val WIRE_MODE_2 = 2
  • val WIRE_MODE_3 = 3
  • val WIRE_MODE_4 = 4

Advanced Actions

brickletPTCGetResistance()
Return Map:
  • resistance – Type: int, Unit: ? Ω, Range: [-231 to 231 - 1]

Returns the value as measured by the MAX31865 precision delta-sigma ADC.

The value can be converted with the following formulas:

  • Pt100: resistance = (value * 390) / 32768
  • Pt1000: resistance = (value * 3900) / 32768

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

brickletPTCGetNoiseRejectionFilter()
Return Map:
  • filter – Type: short, Range: See constants, Default: 0

Returns the noise rejection filter option as set by the thing configuration

The following constants are available for this function:

For filter:

  • val FILTER_OPTION_50HZ = 0
  • val FILTER_OPTION_60HZ = 1
brickletPTCGetIdentity()
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