Mqtt-spy doesn't pick any signal from openhab on raspberry pi 2

i installed mosquitto and openhab on my raspberry , and i did a test to switch a led from raspberry to esp8266 to switch a led through mqtt and it worked

but when i installed openhab and try to publish any thing from openhab , mqtt-spy doesn’t recive any message ,
i left my configuration as default for now , i open the webserver from it’s IP addres as in the figures attached

here is my item code

Switch relay {mqtt=">[mosquitto:/house/garage/gdoPi/doorRelay:command:ON:1],>[mosquitto:/house/garage/gdoPi/doorRelay:command:OFF:0]"}

and my sitemap code

sitemap nest label="My House"
  Frame label="Garage Door Opener" {
	Switch item=relay label="Open/Close Garage Door" 

i also added another items and configuration to try to publish and recieve from mqtt-spy , but nothing happens

As you can see in your events.log, openHAB is receiving your messages properly.
So your items definition is fine and your broker and your mqtt binding is working.
If you want to know why mqtt-spy does not receive this messages, you may post that question in the mqtt-spy forum …
I’m using MQTT.fx to check my mqtt messages, if I want to see “everything”, I subscribe to the topic # (without any trailing or leading slashes). I suggest you try doing that too, maybe it helps …

The message in event log is came when i change the state of the switch manually from the webserver of openhab ,
i tried to subscribe in all topic by # and with mqtt.fx . but same result

thanks any way , i will publish it in mqtt-spy forum , but i am sure that the fault in openhab binding with mqtt

The MQTT persistence service is not the same things as the MQTT binding. Are you sure you have the correct binding jar file installed and have your MQTT configuration in the right section of openhab.cfg?

thanks for your replay
you are right , i had a problem with mqtt configuration files
i changed the broker name to MQTTSVR in openhab.cfg , the item files , and the hostname of raspberry pi too
Thanks :slight_smile: