Warning
The openHAB bindings are still in beta, but the development was stopped.
This is the description of the openHAB API bindings for the Piezo Buzzer Bricklet. General information and technical specifications for the Piezo Buzzer Bricklet are summarized in its hardware description.
An installation guide for the openHAB API bindings is part of their general description.
UID:
- tinkerforge:brickletpiezobuzzer:[UID]
Required firmware version:
- 2.0.0
Firmware update supported:
- yes
Channels: Actions:
Beep
¶Beeps with the duration in s.
Type:
- Number:Time
UID:
- tinkerforge:brickletpiezobuzzer:[UID]:BrickletPiezoBuzzerBeep
Read only:
- No
Unit:
- Second
Morse Code
¶Morse code that will be played by the piezo buzzer. The morse code is given as a string consisting of '.' (dot), '-' (minus) and ' ' (space) for dits, dahs and pauses. Every other character is ignored. For example: If you set the string '...---...', the piezo buzzer will beep nine times with the durations 'short short short long long long short short short'. The maximum string size is 60.
Type:
- String
UID:
- tinkerforge:brickletpiezobuzzer:[UID]:BrickletPiezoBuzzerMorseCode
Read only:
- No
Beep Finished
¶This channel is triggered if a beep set by the beep action is finished.
Type:
- Trigger (system.trigger)
UID:
- tinkerforge:brickletpiezobuzzer:[UID]:BrickletPiezoBuzzerBeepFinished
Read only:
- No
Morse Code Finished
¶This channel is triggered if the playback of the morse code set by the morseCode action is finished.
Type:
- Trigger (system.trigger)
UID:
- tinkerforge:brickletpiezobuzzer:[UID]:BrickletPiezoBuzzerMorseCodeFinished
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:brickletpiezobuzzer:[UID]")
val hwVersion = actions.brickletPiezoBuzzerGetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))
brickletPiezoBuzzerBeep
(long duration)¶Parameters: |
|
---|
Beeps for the given duration.
brickletPiezoBuzzerMorseCode
(String morse)¶Parameters: |
|
---|
Sets morse code that will be played by the piezo buzzer. The morse code is given as a string consisting of "." (dot), "-" (minus) and " " (space) for dits, dahs and pauses. Every other character is ignored.
For example: If you set the string "...---...", the piezo buzzer will beep nine times with the durations "short short short long long long short short short".
brickletPiezoBuzzerGetIdentity
()¶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.