Page 1 of 1
Domoticz/out on mqtt plugin
Posted: Thursday 23 September 2021 19:18
by jarmoboy
Hello,
I have find out that when my device gets command from tasmota device, it changes state in domoticz, but there is no info about it on domoticz/out. It has to wait till tasmota reports state in set interval to refer it on domoticz/out. Is it feature or bug? I had on mind that when whatever changes its state is automatically reported on domoticz/out.
Thanks for info
Posted: Thursday 23 September 2021 21:20
by FireWizard
Hello, @jarmoboy,
You wrote:
I have find out that when my device gets command from tasmota device, it changes state in domoticz, but there is no info about it on domoticz/out.
Is it feature or bug?
It is a feature.
Your Tasmota device sends its command to domoticz/in by MQTT.
By default the setting for "Prevent Loop" is "true" (See your MQTT configuration in Domoticz hardware)
This means that received MQTT messages are not re-transmitted to MQTT.
You can change that by changing the setting "Prevent Loop" to "false".

- Screenshot_MQTT loop.png (29.8 KiB) Viewed 1885 times
Regards
Re: Domoticz/out on mqtt plugin
Posted: Friday 24 September 2021 8:31
by jarmoboy
Hello @FireWizard,
Thanks for reply. Thats exactly what i wanted. Its not good that this options for plugin arent described in such manual or i havent found it.
I am also wondering about of what kind of " LOOP" it can make. (just to avoid it)
Thanks
Jarmo
Re: Domoticz/out on mqtt plugin
Posted: Friday 24 September 2021 9:30
by waltervl
jarmoboy wrote: ↑Friday 24 September 2021 8:31
Hello @FireWizard,
Thanks for reply. Thats exactly what i wanted. Its not good that this options for plugin arent described in such manual or i havent found it.
I am also wondering about of what kind of " LOOP" it can make. (just to avoid it)
Thanks
Jarmo
This is why:
viewtopic.php?t=12632
viewtopic.php?t=17193
I will update the wiki as the help text at the screenshot is not helping enough

Re: Domoticz/out on mqtt plugin
Posted: Friday 24 September 2021 11:23
by FireWizard
Hello @ jarmoboy
MQTT is a publish/subscribe structure.
In this case a client publishes a particular value, under a specific topic name, to a server (broker). Another client can, at the time it wishes, subscribe to that topic and as a result it receives the value.
See below (credits to
https://mqtt.org/)

- Screenshot_MQTT_structure.png (93.7 KiB) Viewed 1846 times
If the receiving client (Orange at the right side) also republish that value, it may lead to undesirable results.
You do not want to know, how often I had to use the "Filter" node (previous called RBE node) in Node Red in order to block the unwanted messages.
I was very happy, when this option was introduced.
The principle of MQTT is, that one party publish the data en that other (multiple) parties subscribe to that data.
I hope this explains briefly your question:
I am also wondering about of what kind of " LOOP" it can make. (just to avoid it)
Regards
Re: Domoticz/out on mqtt plugin
Posted: Friday 24 September 2021 14:11
by jarmoboy
I agree. The text, that this is a bad scenario and should be avoided doesnt say any explanation or help how to understand it. Maybe to explained, that echoed back means: Domoticz/IN MQTT messages will be responsivly reported on Domoticz/OUT as reaction.
Re: Domoticz/out on mqtt plugin
Posted: Friday 24 September 2021 20:24
by waltervl
Mqtt wiki page is modified.
Re: Domoticz/out on mqtt plugin
Posted: Thursday 23 June 2022 20:59
by Vomera
Hi all!
In the hardware tab > Mqtt i want to set , prevent loop to false, but it doesnt save the setting. If i refresh the mqtt settings its back to TRUE
I removed the MQTT settings and added the plugin again, but after set it to false, it doesnt save the setting.
If i change other settings, it will save it.
Running on 2022.1 build 14352 even with a previous version (cant remember) it doesnt work.
any idea's ?
edit: need to set this setting, so i can send the doorbel a trigger to homebridge over mqtt
Re: Domoticz/out on mqtt plugin
Posted: Saturday 25 June 2022 0:25
by waltervl
It is important that you clear your browser cache after updates. Especially when you have user interface issues.
Did you do that?
Re: Domoticz/out on mqtt plugin
Posted: Sunday 21 August 2022 11:29
by 007Steve
waltervl wrote: ↑Saturday 25 June 2022 0:25
It is important that you clear your browser cache after updates. Especially when you have user interface issues.
Did you do that?
Hi all!
also after clearing the browser cache it is not possible to change the field "prevent loop" from "true" to false" ... after updating the settings and remarking the MQTT plugin it still shows "true" ...
Tried to do this change in the browsers EDGE, FireFox and Safari ... clearing the browser cache before ... no chance to get the change saved.
What's wrong here?
Bad situation at the moment for my smart home setup together with NodeRed, because echoing / looping back of mqtt messages does not work and essential scenarions does not work therefore.
Re: Domoticz/out on mqtt plugin
Posted: Sunday 21 August 2022 13:10
by waltervl
I can confirm that on current 2022.1 stable and beta the prevent loop attribute cannot be set to false on MQTT hardware LAN gateway. As I have no MQTT server it is just a small test.
I would advise to make a Github issue
https://github.com/domoticz/domoticz with a reference to this topic.
Re: Domoticz/out on mqtt plugin
Posted: Sunday 21 August 2022 14:40
by FireWizard
I can confirm as well.
Github issue has been created.
See:
https://github.com/domoticz/domoticz/issues/5308
Re: Domoticz/out on mqtt plugin
Posted: Sunday 21 August 2022 18:49
by FireWizard
Hello @gizmocuz,
I tested it with version 14463, just now, and I'm sorry to say that nothing has changed. The setting is not stored.
If I change "Prevent Loop" from "True" to "False" and then press "Update", it shows as "False", but if I refresh the browser screen (F5) it shows "True" again.
So the issue has not been solved yet.
Thanks for picking up this issue so quickly.
Regards
Re: Domoticz/out on mqtt plugin
Posted: Monday 22 August 2022 11:30
by FireWizard
Hi, @007Steve, @Vomera, @waltervl
Issue has been solved in version 14464, published today.
For details see:
https://github.com/domoticz/domoticz/issues/5308
I tested it and I consider this issue as solved.
Regards