[SOLVED] Suddenly outgoing MQTT stops in and outgoing MQTT operations

I ran into a sudden problem with my outgoing MQTT messages.
I define the MQTT messages in my items file as:
{mqtt="<[mosquitto:home/buiten/spot:state:default], >[mosquitto:home/buiten/spot/state:command:*:default]"}
That worked well. If I would send an MQTT command with MQTT spy, The status onOpenhab would react and if I would flip a switch on Openhab, I would see that reflected on MQTT spy.

Suddenly however, neither of those worked anymore, nor the outgoing, nor the ingoing messages
I had been installing some addons, whom I all uninstalled again, but no success.
after some trying I discovered it is the outgoing MQTT message that causes the problem. So:
{mqtt="<[mosquitto:home/buiten/spot:state:default], >[mosquitto:home/buiten/spot/state:command:*:default]"} does not react to either incoming or outgoing messages, but if I use:
The switch normally reacts to incoming MQTT messages again

Ofcourse I checked my mqtt.cfg and that is correct.
A back up items/sitemap file had the same problem so somewhere I must have screwed up something in my openhab cfg.
One of the Addons that I installed was MQTT Action. Had never used that before, but wanted to try that out, but as said, that is uninstalled again. Ofcourse I do have the MQTT Binding installed and as said, my cfg file seems ok. Everything was working fine before.
Any hints of where to look for a solution are appreciated

There was a known problem that may still be a problem where installing the MQTT Action causes the problem described. But removing the action fixed things for me. And I don’t know if it is still a problem.

Have you rebooted OH recently?

Thank you Rich
yes, I rebooted everything, cleared caches etc, but to no avail :frowning:

Just some further info: I tried backup items and sitemap files: same problem. As soon as I had an ingoing and outgoing mqtt message, the Mqtt was not working at all, whereas before it was working.
deleted and reinstalled my MQTT binding, same results.
But right before I considered doing a completely new Openhabian install, I setup a simple new sitemap with a simple items file, just 2 commands.
Low and behold… that worked, outgoing MQTT appears in MQTT spy again.
Could it be that somehow an error slipt into my sitemap or items file?
has it become too complicated?
At least now I know that the problem is not in my Openhab installation.
Maybe I best just start my sitemap and items from skratch again. I just wish I knew what was wrong with the current files

Update: The plot thickens even more:
if in my small new test items file, I copy a line from my problematic items file, it will not work.
if I just type it new, it will work. I get the impression that maybe somehow, stray characters may have ended up in my ‘problematic’ file. It is all UTF-8, but I have used different editors (Wordpad, leafpad, Bluefish)

_Solved: _
I am EXTREMELY stupid.
Somehow one of my newer outgoing MQTT message had picked up a wrong structure and apparently I started copying that allover.
only when I set up a new file with new mqtt commands and then compared the non functional line character by character, i immediately saw where the problem was.

Just proves that you can check a command a 100 times, you still can be blind for errors.
mea culpa, mea maxima culpa. I can just club myself over the head.

it also proves my earlier ‘word for beginners’: don’t despair, openhab DOES work, just keep trying
I presume the coincidence with installing the MQTT action was because I then started trying some things.

If I had a nickel for every time I’ve gone through this same exercise only to discover a stupid mistake like that I could retire.

Glad you found the problem.

Now is a good time to mention that this is where using a source control server like git, mercurial, svn, etc can be a life saver. When everything stops working you can go back to a previous version, compare your changes to past versions of the files, etc. It does require you to be disciplined about checking in your changes as you go but it can be a life saver.

Personally, I use Gogs running in Docker, but there are lots of simpler approaches. Or you can check your stuff into a third party service like Bitbucket or Github.

Thanks, yes, not my first time. But after initial shame and a facepalm at least one has the feeling that at least one can solve it as long as you just work very systematically. Truthfully… I was about to reinstall openhab as I thought that was where the problem was. Glad I tried some other things first.

I had a previous copy but as that was recent, it had the same mistake. Also, i found that if one has several item or sitemap files with the same devices in it, they tend to disturb eachother. Thats why I started emptying everything from my config and just rebuild a new test file. once I did that, the problem was easily found.
i must say I was a bit too embarrassed even to admit it here, but then again… everyone has been there… Triple facepalm!!!
I will give your server suggestion a thought. I am on Github, maybe I will start to use that a bit more