[SOLVED] Hello i m working on home automation using openhab

Stil my problem is not resolved… pls any body can help to resolve the problem

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

Andreas

I m able to trigger hardware using my mqtt apps broker is raspberry pi and client esp12 and i able to trigger hardware without any problem…

Services / mqtt.cfg contain following …

/etc/ openhab2/services/ mqtt.cfg

broker.url=tcp://192.168.0.201:1883

Similarly

/var/lib/openhab2/config/org/openhab/ mqtt.cfg

broker.url=“tcp://192.168.0.201:1883”
service.pid=“org.openhab.mqtt”

How do i use mqtt-spy to check as per your suggestion i m using win 10 laptop pls help

Regards,

Thale

I did download the mqtt-spy .jar file, dobleclicked on the file and it started (on Windows 10).

In mqtt-spy connect to your broker with your credential and subscribe to Messages ("#" for all topics).

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).

Server url ------------------- IP address of raspberry broker :1883

What is Client ID just below the server url ???

Adove that connection name ???

Configuration mode ???

Pls help

Regards,

Thale

Server url ------------------- IP address of raspberry broker :1883

What is Client ID just below the server url ???

Adove that connection name ???

Configuration mode ???

Pls help

Regards,

Thale

Mqtt-spy ----------------- Server URL as given IP address of Raspberry pi i m able to trigger the hardware …

Thanks but can u help why it is not working with opnehab2

Regards,

Thale

Mqtt-spy ----------------- Server URL as given IP address of Raspberry pi i m able to trigger the hardware …

Thanks but can u help why it is not working with opnehab2

Regards,

Thale

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)

Yes i am able to trigger hardware …

But not able to trigger thru OH2

Any clue / procedure to check the OH2 button click can be view on any window to know that what command send to broker raspberry pi when we click…

You should use mqtt-spy to RECEIVE Messages, you are Publishing!!
Activate the lower section of the window named “Subscriptions and received Messages”, when clicking on the “All” tab you will see all Messages, or you can create a new tab and subscribe to a specific Topic (or all with “#”)

In your screenshot you have as recent messages (Topic=“HAS1”, payload=“R1OFF”) and (Topic=“HAS1”, payload=“R1ON”). In the Data-Field it is “R1_OFF”.
Please verify if the correct payload is “R1_ON” / “R1_OFF” or “R1ON” / “R1OFF”.

The second point is the topic is “HAS1”.
In your first post the topic is “/HAS1”. The leading slash is a big difference for MQTT…

If you do as @Opus said (receive all messages of the broker) you will see a difference between openhab messages and your published Messages…

1 Like

Yes u r right problem resolved … During testing I got my mistake which was corrected and now I m able to trigger hardware thru openhab2 …

Any idea to implement fan speed control … items , sitmap and rule file if u have example code pls share to implement the same …

Regards,

Thale

Concerning the fan speed, did it come to your mind to use the search function in this forum?

Yes but I didn’t got properly soln… If any code items, sitemap and rule example file pls share … Thanks for your kind support to resolved my mqtt trigger problem also need help in controlling speed ( Dimmer ) .

Regards,

Thale

@spthale:
As you can see here:

or here:

you wouldn’t get an answer to your liking… (and this is just a quick use of the search function of the forum as @Opus recommended)

The community is helping if you have a problem and you get stucked with your actual “solution”.
I don’t want to be rude, but if you just yell out “Share your items, rules and sitemap” you won’t get a helpful answer, not only because you didn’t told us anything about your fan and what to do with it…

Besides: it would be nice to create a new thread with a speaking title (e.g. something with “Fan”), where people can see what subject is talked about with one view…

Andreas

1 Like

How do i create own icons and configure the same in openhab2 display on screen. Pls help to create icons and configure in openhab2. Want to also display main menu current date and time i had refered example sitemaps file but it is not displayed current date and time.
Pls help me resolve above to two problems.

Thale