I could trigger hardware using my mqtt apps but not able to trigger thru openhab2.
Demo.items file as below
Group All
Group E1 (All)
//Entrance topic is /HAS1 group is E1
Switch Light1_E1 “Light1” (E1,Lights) {mqtt=">[broker:/HAS1:command:on:R1_ON],>[broker:/HAS1:command:off:R1_OFF]"}
Demo.sitemap
sitemap demo label=" Home Automation HAS1"
{
Frame {
Group item=E1 label=“Entrance” icon=“Living Room”
{
Switch item=Light1_E1 label=“Light1”
Video item=IP_Camera url=“http://192.168.0.103:7778/videostream.cgi?user=xxxx&pwd=xxxx@” encoding=“mjpeg”
}
}
}
It shows as uninstall that means it is installed because reset of the binding shows as Install
As it is install the MQTT binding thats way it shows MQTT binding ------------ uninstall
Did you try to use mqtt-spy or any other software to show MQTT Messages from/to your Broker? (as mentioned from @Opus)
Check the logs at start-up of openhab if the MQTT Broker is connected (you did not specify a client-ID nor user/Password (optional) in services/mqtt.cfg)
Check if there are any errors loading your demo.items file
Check with mqtt-spy the name of the topic (the leading slash is worrying me: normally not necessary)
Check with mqtt-spy what is sent from openhab when switching Light1_E1
Could you explain what and where broker ( raspberry pi details to be filed ) and also other relevant…details so i can check pls explain me with the help of example pls thanks
I’m not at my system now, so I can only give hints oui of my memory.
You are using mqtt-spy to connect to your broker from another system, in order to connect you need the IP of the system where the broker runs and the credentials (username and Password, the same you have in your mqtt.cfg). Using those inputs mqtt-spy should be able to make the Connection (shown with a green tab).
Please answer only once (it seems you are replying to the email and posting the same text directly into the Forum).
Did you get mqtt-spy to connect to your mqrtt-broker?? If so, please try to sent a mqtt via OH and post what you are receiving in mqtt-spy.
Additionally, please post the message you are receiving in mqtt-spy (using that, we could verify the Syntax used in your .tems file)