You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default username and password of the broker is `admin` and `public`.
102
+
103
+
> Alternatively, use [Mosquitto's public MQTT broker](https://test.mosquitto.org/) without authentication by setting the broker hostname to `test.mosquitto.org`.
104
+
77
105
## Dev Loop [Build and Install from Source]
78
106
107
+
For this simple dev loop, make sure you have access to an MQTT broker. The following steps assume you followed the section to [run an MQTT broker locally](#running-an-mqtt-broker).
108
+
79
109
* Open the repo in Dev Container or in pre-configured GitHub [Codespace](https://codespaces.new/spinkube/spin-trigger-mqtt)
80
110
* Run ```make``` to build and install the plugin locally.
81
111
* Update ```examples/mqtt-app/spin.toml``` to reflect your MQTT server details and ensure it's accessible on the network.
82
112
* Run ```spin build --up --from examples/mqtt-app/spin.toml``` to run the example Spin app.
83
-
* Run ```mqttx pub -t 'messages-in01' -h '<mqtt server ip>' -p 1883 -u <user> -P <password> -m 'Hello to MQTT Spin Component!'``` with the hostname and credentials for your server, to publish the message which is then received by Spin app.
113
+
* Run ```mqttx pub -t 'messages-in01' -h 'localhost' -p 1883 -u 'admin' -P 'public' -m 'Hello to MQTT Spin Component!'``` with the hostname and credentials for your server, to publish the message which is then received by Spin app.
84
114
* Optionally, run ```make clean``` to clean up and rebuild and install the plugin locally.
0 commit comments