Frends.MQTT.Send / 2.0.0
Summary
Connects to a broker, publishes one message to a topic at a chosen quality of service, then disconnects.
Typical use — sending commands or state to devices and services subscribed to a topic
Input class for MQTT message publishing.
| Name | Type | Default | Example | Description |
|---|---|---|---|---|
| Host | String |
– | broker_host |
The address of the MQTT broker. |
| BrokerPort | Int32 |
– | 1883 |
The port of the MQTT broker. |
| Topic | String |
– | your_topic |
The topic to publish the message to. |
| Message | String |
– | your_message |
The message to be published. |
| UseTls12 | Boolean |
– | false |
Whether to use TLS authentication |
| QoS | QoS |
– | QoS.AtMostOnce |
The Quality of Service (QoS) level for the MQTT session. Possible values:
|
| Username | String |
– | testuser |
Username for authentication. |
| PasswordSecret | String |
– | Password123 |
Password for authentication. |
| AllowInvalidCertificate | Boolean |
False |
true |
When true, allows connections even if the server's TLS certificate is invalid (e.g., self-signed, expired, or hostname mismatch). WARNING: This reduces security and should only be used in development/testing environments or when connecting to internal servers with self-signed certificates. |