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 Segment Display 4x7 Bricklet 2.0. General information and technical specifications for the Segment Display 4x7 Bricklet 2.0 are summarized in its hardware description.
An installation guide for the openHAB API bindings is part of their general description.
UID:
- tinkerforge:brickletsegmentdisplay4x7v2:[UID]
Required firmware version:
- 2.0.0
Firmware update supported:
- yes
Channels: Actions: Parameters:
- 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
Brightness
¶The brightness can be set between 0 (dark) and 7 (bright).
Type:
- Choice
UID:
- tinkerforge:brickletsegmentdisplay4x7v2:[UID]:BrickletSegmentDisplay4x7V2Brightness
Read only:
- No
Options:
- 0, 1, 2, 3, 4, 5, 6, 7
Range:
- 0 to 7 (Step 1)
Show Upper Colon Dot
¶Turns the colon of the display on or off.
Type:
- Switch
UID:
- tinkerforge:brickletsegmentdisplay4x7v2:[UID]:BrickletSegmentDisplay4x7V2ColonUpper
Read only:
- No
Show Lower Colon Dot
¶Turns the colon of the display on or off.
Type:
- Switch
UID:
- tinkerforge:brickletsegmentdisplay4x7v2:[UID]:BrickletSegmentDisplay4x7V2ColonLower
Read only:
- No
Show Tick
¶Turns the colon of the display on or off.
Type:
- Switch
UID:
- tinkerforge:brickletsegmentdisplay4x7v2:[UID]:BrickletSegmentDisplay4x7V2Tick
Read only:
- No
Segments
¶The seven segment display can be set with bitmaps. Every bit controls one segment as shown here.. The channel accepts an integer, that is split into 4 bytes, controlling one segment each. For example 1717263183, which is 0x665b5b4f in hex will be split into 0x66 for the first segment, 0x5b for the second, 0x5b for the third and 0x4f for the fourth.
Type:
- Number
UID:
- tinkerforge:brickletsegmentdisplay4x7v2:[UID]:BrickletSegmentDisplay4x7V2Segments
Read only:
- No
Text
¶Text to display on the seven segment display. Supported are A-Z, a-z, 0-9, ", (, ), +, -, =, [, ], ^, _ and |. An unsupported character will show as empty. A colon (:) anywhere in the text will light on the display's colon. Alternatively, you can enable only the upper colon dot with a backtick (`) or the lower one with a comma (,). An apostrophe (') anywhere will light up the tick after the third digit. A dot (.) after another character will light the corresponding digit's dot. For example H.i,T.'F will show HiTF on the display and activate the first and third dot, lower colon dot and the tick.
Type:
- String
UID:
- tinkerforge:brickletsegmentdisplay4x7v2:[UID]:BrickletSegmentDisplay4x7V2Text
Read only:
- No
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:brickletsegmentdisplay4x7v2:[UID]")
val hwVersion = actions.brickletSegmentDisplay4x7V2GetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))
brickletSegmentDisplay4x7V2SetSegments
(boolean[] digit0, boolean[] digit1, boolean[] digit2, boolean[] digit3, boolean[] colon, boolean tick)¶Parameters: |
|
---|
Sets the segments of the Segment Display 4x7 Bricklet 2.0 segment-by-segment.
The data is split into the four digits, two colon dots and the tick mark.
The indices of the segments in the digit and colon parameters are as follows:
brickletSegmentDisplay4x7V2GetSegments
()¶Return Map: |
|
---|
Returns the segment data as set by Segments
.
brickletSegmentDisplay4x7V2SetSelectedSegment
(int segment, boolean value)¶Parameters: |
|
---|
Turns one specified segment on or off.
The indices of the segments are as follows:
brickletSegmentDisplay4x7V2GetSelectedSegment
(int segment)¶Parameters: |
|
---|---|
Return Map: |
|
Returns the value of a single segment.
brickletSegmentDisplay4x7V2SetBrightness
(int brightness)¶Parameters: |
|
---|
The brightness can be set between 0 (dark) and 7 (bright).
brickletSegmentDisplay4x7V2GetBrightness
()¶Return Map: |
|
---|
Returns the brightness as set by Brightness
.
brickletSegmentDisplay4x7V2SetNumericValue
(int[] value)¶Parameters: |
|
---|
Sets a numeric value for each of the digits. They represent:
Example: A call with [-2, -1, 4, 2] will result in a display of "- 42".
brickletSegmentDisplay4x7V2StartCounter
(int valueFrom, int valueTo, int increment, long length)¶Parameters: |
|
---|
Starts a counter with the from value that counts to the to value with the each step incremented by increment. length is the pause between each increment.
Example: If you set from to 0, to to 100, increment to 1 and length to 1000, a counter that goes from 0 to 100 with one second pause between each increment will be started.
Using a negative increment allows to count backwards.
You can stop the counter at every time by calling Segments
or SetNumericValue()
.
brickletSegmentDisplay4x7V2GetCounterValue
()¶Return Map: |
|
---|
Returns the counter value that is currently shown on the display.
If there is no counter running a 0 will be returned.
brickletSegmentDisplay4x7V2GetChipTemperature
()¶Return Map: |
|
---|
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.
brickletSegmentDisplay4x7V2GetStatusLEDConfig
()¶Return Map: |
|
---|
Returns the configuration as set by the thing configuration
The following constants are available for this function:
For config:
brickletSegmentDisplay4x7V2GetSPITFPErrorCount
()¶Return Map: |
|
---|
Returns the error count for the communication between Brick and Bricklet.
The errors are divided into
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.
brickletSegmentDisplay4x7V2Reset
()¶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!
brickletSegmentDisplay4x7V2GetIdentity
()¶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.