Domoticz/out on mqtt plugin

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
jarmoboy
Posts: 33
Joined: Wednesday 12 February 2020 6:39
Target OS: Linux
Domoticz version: v2022.2
Location: Czech
Contact:

Domoticz/out on mqtt plugin

Post 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
DOCKERED v14824,NODE-RED,Tasmotized Sonoffs,Tasmoadmin,zigbee2mqtt,EWPE,REST980,WLED
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Post 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
Screenshot_MQTT loop.png (29.8 KiB) Viewed 1655 times

Regards
jarmoboy
Posts: 33
Joined: Wednesday 12 February 2020 6:39
Target OS: Linux
Domoticz version: v2022.2
Location: Czech
Contact:

Re: Domoticz/out on mqtt plugin

Post 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
DOCKERED v14824,NODE-RED,Tasmotized Sonoffs,Tasmoadmin,zigbee2mqtt,EWPE,REST980,WLED
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz/out on mqtt plugin

Post 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 ;)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Domoticz/out on mqtt plugin

Post 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
Screenshot_MQTT_structure.png (93.7 KiB) Viewed 1616 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
jarmoboy
Posts: 33
Joined: Wednesday 12 February 2020 6:39
Target OS: Linux
Domoticz version: v2022.2
Location: Czech
Contact:

Re: Domoticz/out on mqtt plugin

Post 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.
DOCKERED v14824,NODE-RED,Tasmotized Sonoffs,Tasmoadmin,zigbee2mqtt,EWPE,REST980,WLED
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz/out on mqtt plugin

Post by waltervl »

Mqtt wiki page is modified.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz/out on mqtt plugin

Post 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

Image

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
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz/out on mqtt plugin

Post by waltervl »

It is important that you clear your browser cache after updates. Especially when you have user interface issues.
Did you do that?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
007Steve
Posts: 1
Joined: Sunday 21 August 2022 10:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 14456
Location: DE

Re: Domoticz/out on mqtt plugin

Post 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.
BR, Steve

Version: 2022.1 / 14456
Plattform: RPi 3B Rev. 1.2
Linux: Debian 10.11 / RasPi-Domoticz 5.10.63-v7+ #1496 SMP Wed Dec 1 15:58:11 GMT 2021 armv7l GNU/Linux
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz/out on mqtt plugin

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Domoticz/out on mqtt plugin

Post by FireWizard »

I can confirm as well.

Github issue has been created.
See: https://github.com/domoticz/domoticz/issues/5308
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Domoticz/out on mqtt plugin

Post 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
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Domoticz/out on mqtt plugin

Post 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
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests