NEWBIE MQTT Config Help Needed

I still have no clue and it’s getting late for me.
Could you establish a sitemap that shows the switch and string item, that way the tests will be easier.

will continue tomorrow

Could you establish a sitemap that shows the switch and string item, that way the tests will be easier.

Will do! Thanks for the effort!

Wild idea: should I do a fresh install of openHabian and re-flash the Sonoff so we start from the very beginning?

Fresh installl: I don’t think so. You can send the command to switch, that means the connection is there. We only need to find why the stateTopics are wrong.
At last you had setup topics that were checked with MQTTfx. So the message is sent ( at least to MQTTfx) . Why doesn’t it show in openHAB?
We are going to check the logs if anything is received at all. Raising the low-level is needed for that. Are you able to open the Karaf console?

Yes…I’ve never used it, but a quick search got me in.

Before we continue, I made another “change” that led to me getting a different response. After doing the sitemap, I modified the String as shown below and got a textual response as part of the same entry on BasicUI.

New String

BasicUI

But still no change in OH (Paper nor Basic UI) when I toggle the switch via SonoffWebUI.

I also think I understand a bit more why the messages aren’t showing up in OH. But I’m not sure if the syntax should follow the {channel="mqtt:topic:embedded...} format, or the {mqtt=">[broker:Lights/TVLights/...] format.

Having done some more reading, the full topic I’ve set may be our issue. I’m wondering if to change it back to default and then redo the codes accordingly.

The change done reflected only thr String Item but you are showing the Switch Item. Starting with the String Item, the Syntax used is valid for the Version 1 MQTT binding only! Where do you get a “textual response”?
Additionally I don’t understand the posted screenshot, it shows a switch with the label “TV Lights”, did you modify the Label for the sitemap?

I hesitated to ask exactly that. How many sonoffs do you have?

Yes…my mistake. I will adjust the label for the sitemap.

Where do you get a “textual response”?

Before making the change on the string, I only had a toggle on the Basic UI. After changing to the V1 MQTT format the OFF/ON text on the left side of the toggle is also available.

Here’s the entire BasicUI:

And the .sitemap file (which I’d expect needs some adjustment):

How many sonoffs do you have?

Four.

You don’t hjave to change the sitemap, I do understand now to which item it reflects!

Changing the sonoff Setting would make it easier for me to help you. As said before I have no entry in the Full Topic (that way it shows the default “%prefix%/%topic%/”), only the Topic is set, no change needed for you.

I’m willing to make the change so it’ll be easier for you to help, and easier for me to reproduce on the others. So…I’m going to put the full topic back to default and change the topic to sonoff1, and increment the numbers as the topics on the others, so it will just be a matter of copying the code and changing the number to get the same response from the others.

Will of course change the labels according to the different zones, but that’s minor housekeeping to be done once everything works as it should.

I think you can leave the full topic empty, that way the default will be wriitten there in Grey.
Do whatever suits you with the labels

Done!

Labels will be adjusted when the others are set up. Hopefully we can figure out this issue.

I’m a bit limited in time now, but you could use your MQQTfx and listen to all Messages. Doing that you should recieve mesages sent regulary by the sonoff. Subscribe to them ("tele/…) and try to get ist content into a string item.
I’ll be back!

If you have Setup the sonoffs as above you can look at the following post and copy the Setup:
SetUp of Sonoffs for MQTT2.4

I’m not sure what worked, but I’ve gotten things up and running. I think the issue was with the changing of the topic/prefix in the sonoff. Once I reset that I was getting a lot more info in MQTTfx including tele/ content. I still have not set up a string in the items file, but I am getting a response in BasicUI when I toggle the switch manually and via the Sonoff WebUI

Good, everything else will come!
For a start use the stateTopic of the switch for a string channel and link an item to it. You should see the ON and OFF. After that play around with the contents of the tele message and try to get specific parts of its contents by using a transformationPattern.

[Edit] If your problem is solved, please mark the thread as resolved!