Warning
The openHAB bindings are still in beta, but the development was stopped.
This is the description of the openHAB API bindings for the Industrial Digital In 4 Bricklet. General information and technical specifications for the Industrial Digital In 4 Bricklet are summarized in its hardware description.
An installation guide for the openHAB API bindings is part of their general description.
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]
Required firmware version:
- 2.0.1
Firmware update supported:
- yes
Channels: Actions:
Input Value 0
¶The logic level that is currently measured on the channel.
Type:
- Contact
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]:BrickletIndustrialDigitalIn4Input0
Read only:
- No
Input Value 1
¶The logic level that is currently measured on the channel.
Type:
- Contact
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]:BrickletIndustrialDigitalIn4Input1
Read only:
- No
Input Value 2
¶The logic level that is currently measured on the channel.
Type:
- Contact
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]:BrickletIndustrialDigitalIn4Input2
Read only:
- No
Input Value 3
¶The logic level that is currently measured on the channel.
Type:
- Contact
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]:BrickletIndustrialDigitalIn4Input3
Read only:
- No
Edge Count 0
¶The current value of the edge counter of the channel.
This channel will only update after the configured update interval, not on changed values.
Type:
- Number:Dimensionless
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]:BrickletIndustrialDigitalIn4EdgeCount0
Read only:
- Yes
Parameters:
- Edge Type – Type: Choice, Default: Rising
- Configures if rising edges, falling edges or both are counted.
- Options: Rising, Falling, Both
- Debounce Time – Type: integer, Default: 100, Min: 0, Max: 255
- The debounce time is the minimum time between two count increments.
- Reset Edge Counter On Update – Type: boolean, Default: false
- Enabling this will reset the edge counter after openHAB reads its value. Use this if you want relative counts per update.
- Update Interval – Type: integer, Default: 1000, Unit: ms
- Specifies the update interval in milliseconds. A value of 0 disables automatic updates.
Edge Count 1
¶The current value of the edge counter of the channel.
This channel will only update after the configured update interval, not on changed values.
Type:
- Number:Dimensionless
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]:BrickletIndustrialDigitalIn4EdgeCount1
Read only:
- Yes
Parameters:
- Edge Type – Type: Choice, Default: Rising
- Configures if rising edges, falling edges or both are counted.
- Options: Rising, Falling, Both
- Debounce Time – Type: integer, Default: 100, Min: 0, Max: 255
- The debounce time is the minimum time between two count increments.
- Reset Edge Counter On Update – Type: boolean, Default: false
- Enabling this will reset the edge counter after openHAB reads its value. Use this if you want relative counts per update.
- Update Interval – Type: integer, Default: 1000, Unit: ms
- Specifies the update interval in milliseconds. A value of 0 disables automatic updates.
Edge Count 2
¶The current value of the edge counter of the channel.
This channel will only update after the configured update interval, not on changed values.
Type:
- Number:Dimensionless
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]:BrickletIndustrialDigitalIn4EdgeCount2
Read only:
- Yes
Parameters:
- Edge Type – Type: Choice, Default: Rising
- Configures if rising edges, falling edges or both are counted.
- Options: Rising, Falling, Both
- Debounce Time – Type: integer, Default: 100, Min: 0, Max: 255
- The debounce time is the minimum time between two count increments.
- Reset Edge Counter On Update – Type: boolean, Default: false
- Enabling this will reset the edge counter after openHAB reads its value. Use this if you want relative counts per update.
- Update Interval – Type: integer, Default: 1000, Unit: ms
- Specifies the update interval in milliseconds. A value of 0 disables automatic updates.
Edge Count 3
¶The current value of the edge counter of the channel.
This channel will only update after the configured update interval, not on changed values.
Type:
- Number:Dimensionless
UID:
- tinkerforge:brickletindustrialdigitalin4:[UID]:BrickletIndustrialDigitalIn4EdgeCount3
Read only:
- Yes
Parameters:
- Edge Type – Type: Choice, Default: Rising
- Configures if rising edges, falling edges or both are counted.
- Options: Rising, Falling, Both
- Debounce Time – Type: integer, Default: 100, Min: 0, Max: 255
- The debounce time is the minimum time between two count increments.
- Reset Edge Counter On Update – Type: boolean, Default: false
- Enabling this will reset the edge counter after openHAB reads its value. Use this if you want relative counts per update.
- Update Interval – Type: integer, Default: 1000, Unit: ms
- Specifies the update interval in milliseconds. A value of 0 disables automatic updates.
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:brickletindustrialdigitalin4:[UID]")
val hwVersion = actions.brickletIndustrialDigitalIn4GetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))
brickletIndustrialDigitalIn4GetValue
()¶Return Map: |
|
---|
Returns the input value with a bitmask. The bitmask is 16bit long, true refers to high and false refers to low.
For example: The value 3 or 0b0011 means that pins 0-1 are high and the other pins are low.
brickletIndustrialDigitalIn4GetEdgeCount
(short pin, boolean resetCounter)¶Parameters: |
|
---|---|
Return Map: |
|
Returns the current value of the edge counter for the selected pin. You can
configure the edges that are counted with the configuration of Edge Count 0
.
If you set the reset counter to true, the count is set back to 0 directly after it is read.
New in version 2.0.1 (Plugin).
brickletIndustrialDigitalIn4GetEdgeCountConfig
(short pin)¶Parameters: |
|
---|---|
Return Map: |
|
Returns the edge type and debounce time for the selected pin as set by
the configuration of Edge Count 0
.
The following constants are available for this function:
For edgeType:
New in version 2.0.1 (Plugin).
brickletIndustrialDigitalIn4GetIdentity
()¶Return Map: |
|
---|
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.