[MQTTv1] How to receive mqtt messages

Dear all,

I am able to pubblish successfully a message with the command

mosquitto_pub -t "mentorage/device/alert" -m "ON"
because mosquitto_sub -t "mentorage/device/alert" receives the message properly

but with the item
Switch MQTT_Test "Testing..." { mqtt="<[broker:mentorage/device/alert:state:default], >[broker:mentorage/device/alert:command:*:default]" }

nothing seems to happen
The broker is broker=<broker>.url=tcp://localhost:1883

In the log I receive

2018-11-29 18:06:55.666 [ERROR] [ng.mqtt.internal.MqttEventBusBinding] - Could not create event bus command subscriber: Configuration 'broker=<broker>.url=tcp://localhost:1883:mentorage/device/alert/fall:command:default' is not a valid inbound configuration: Configuration requires 4 or 5 parameters separated by ':' but I commented out the line commandSubscribeTopic in mqtt-eventbus.cfg

I receive
2018-11-29 18:06:55.635 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.

2018-11-29 18:06:55.639 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘’
as well

Someone can help me?
Thank you
Dev

Remove the <>around the broker in the mqtt.cfg

Thanks you saved my day

Dev

by the way, it seems (due to the syntax and the logs) that your are also using $OPENHAB_CONF/services/mqtt-eventbus.cfg file
In this file you only need to put the alias of the MQTT Broker, not the full definition of the alias.

You define the alias in the $OPENHAB_CONF/services/mqtt.cfg file

mqtt.cfg:

broker.url=tcp://localhost:1883
^^^^^^
alias

mqtt-eventbus.cfg

broker=broker
       ^^^^^^
       alias
...

It seems that placing directly in mqtt-eventbus.cfg the following: broker=broker.url=tcp://localhost:1883 works also… interesting :slight_smile: