Blocks for communication with the fischertechnik Cloud.
These blocks are used for "Sensorstation IoT" and "Training Factory Industry 4.0".
MQTT stands for "Message Queuing Telemetry Transport" protocol and is often used in IoT (Internet of Things) applications.
Creates an MQTT client with which messages can be received and sent. It is recommended to write the output of the block into a variable in order to be able to use the client several times later in other blocks.
Connects an MQTT client to an MQTT broker with the specified settings. Client can be the block "MQTT client create" or its output in a variable. Host specifies the address of the MQTT broker. To use the local MQTT broker, localhost or 127.0.0.1 is entered as the value. To use external MQTT brokers, their IP address or host name must be used. Port specifies the port on which the MQTT Broker is available. The default is 1883 for MQTT Broker (fischertechnik Cloud) or 2883 (GUI application). If external MQTT brokers are used, their port must be entered. Username and password are empty by default; for external servers, their login information must be entered here.
MQTT client can be the block "MQTT client create" or its output in a variable. Returns "true" if the specified MQTT client is connected to an MQTT broker. If the MQTT client is not connected, "false" is returned.
MQTT client can be the block "MQTT client create" or its output in a variable. Disconnects the specified MQTT client from the MQTT broker.
MQTT client can be the block "MQTT client create" or its output in a variable. Publishes a message "payload" with the specified MQTT client in a specified channel "topic". In addition, "qos" and "retain" can be specified, i.e. whether newly connected clients should receive the message after sending and with which security level the message should be sent.
MQTT client can be the block "MQTT client create" or its output in a variable. Publishes a message "payload" with the specified MQTT client in a specified channel "topic". In addition, "qos" and "retain" can be specified, i.e. whether newly connected clients should receive the message after sending and with which security level the message should be sent. If the message is sent successfully, "true" is returned, otherwise "false".
MQTT client can be the block "MQTT client create" or its output in a variable. Sets the message "payload", which is to be sent after disconnecting the MQTT client in a specified channel "topic", and with which security level the message is to be sent.
Subscribes to a channel with an MQTT client. The function to be executed when receiving a message is specified in the callback argument. "Qos" specifies the security level with which the message is to be sent.
Defines a function that is to be executed by receiving a message. Message contains the received message.