This is the description of the MQTT API bindings for the Analog Out Bricklet. General information and technical specifications for the Analog Out Bricklet are summarized in its hardware description.
An installation guide for the MQTT API bindings is part of their general description.
The example code below is Public Domain (CC0 1.0).
1 2 3 4 5 | # Change XYZ to the UID of your Analog Out Bricklet
setup:
# Set output voltage to 3.3V
publish '{"voltage": 3300}' to tinkerforge/request/analog_out_bricklet/XYZ/set_voltage
|
All published payloads to and from the MQTT bindings are in JSON format.
If an error occures, the bindings publish a JSON object containing the error message as member _ERROR
.
It is published on the corresponding response topic: .../response/...
for .../request/...
and .../callback/...
for .../register/...
.
request/
analog_out_bricklet/
<UID>/
set_voltage
¶Request: |
|
---|---|
Response: |
|
Sets the voltage. Calling this function will set
the mode to 0 (see request/analog_out_bricklet/<UID>/set_mode
).
request/
analog_out_bricklet/
<UID>/
get_voltage
¶Request: |
|
---|---|
Response: |
|
Returns the voltage as set by request/analog_out_bricklet/<UID>/set_voltage
.
request/
analog_out_bricklet/
<UID>/
set_mode
¶Request: |
|
---|---|
Response: |
|
Sets the mode of the analog value. Possible modes:
request/analog_out_bricklet/<UID>/set_voltage
is applied)Setting the mode to 0 will result in an output voltage of 0 V. You can jump
to a higher output voltage directly by calling request/analog_out_bricklet/<UID>/set_voltage
.
The following symbols are available for this function:
For mode:
request/
analog_out_bricklet/
<UID>/
get_mode
¶Request: |
|
---|---|
Response: |
|
Returns the mode as set by request/analog_out_bricklet/<UID>/set_mode
.
The following symbols are available for this function:
For mode:
request/
analog_out_bricklet/
<UID>/
get_identity
¶Request: |
|
---|---|
Response: |
|
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. If symbolic output is not disabled, the device identifier is mapped to the corresponding name in the format used in topics.
The display name contains the Analog Out's name in a human readable form.