How to send commands by mosquitto_pub?

Hello there,

I’m not a programmer neither a Linux guy.
I setup an ESP32 with OpenMQTT BLE Gateway. My MQTT broker is a RasPi4 where ioBroker is running and a MQTT adapter, configured as Broker.
I get all the BLE data to my Pi.
So far so good.
But how can I send this mosquitto_pub commands?
I think I have to install Mosquitto on my Pi?
At a regular command like
“mosquitto_pub -t “home/OpenMQTTGateway/commands/MQTTtoSYS/config” -m ‘{“cmd”:“restart”}’”
is not IP address or port, so how can it communicate?

Hi @hg6806

You do not have to install Mosquitto, but with the latest version 1.6.0. of OpenMQTTGateway you can use the WebUI’s Console functionality to enter the command topic part and command into the entry field and just hit return.

Or use an application like MQTT Explorer to also be able to publish MQTT commands easily with a UI.

Hope this helps.

OK, thx
MQTT Explorer works, I see my devices.
To update to 1.6.0, how can I do it by MQTT Explorer?
Command is

mosquitto_pub -t "home/OpenMQTTGateway_ESP32_BLE/commands/MQTTtoSYS/firmware_update" -m '{
  "version": "latest"

I think I have to send the command by the field “topic” under Publish

That’s correct, just use the command topic and the command itself with the MQTT Explorer Pusblish section.

Sure, but when I put
home/OpenMQTTGateway_ESP32_BLE/commands/MQTTtoSYS/firmware_update" -m '{
“version”: "latest
into, nothing happen

Part of the topic should already be filled out automatically with the gateway name of your gateway, so the topic is just


no -m anywhere, and


as the Payload, in JSON format. Then hit Publish

OK, I think I updated to 1.6.0

But when I want to use the WebUI nothing appears when I put the IP address into a browser

What does your “version” in SYStoMQTT say? And which version did you have previously on your gateway?

And which IP address are you trying to connect to?

I had 1.5.1 previously.
Version says 1.6.0

Sometimes it takes a while to get a WebUILogin, but I get it now.

Now I have the problem that I don’t knwo the OTA password. Was ist set by me? I can’t remember.

Best to read the whole WebUI section.

And the default ota_password is OTAPASSWORD

… which we should probably also mention in the docs somewhere :wink:

OK, It’s working now.
More or less.
I have a strange behaviour.
I can just access the WebUI when I stop the MQTT broker on the other maschine.
When MQTT is running, sometimes I get just a Login screen but no WebUI.
Is the traffic such high?