is it possible to suppress MQTT messages?

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
manjh
Posts: 859
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

is it possible to suppress MQTT messages?

Post by manjh »

Not sure which forum part this belongs in, so here goes.
A while ago I discovered how easy it is to use MQTT to bring values from one point to the other. I have used "remote device" in Domoticz before, but ran into trouble transferring text device values. With MQTT this is not a problem.
Once I implemented this for a series of text devices, it was very easy to build on that an add all devices that I want synchronized. I dropped the use of a remote slave Domoticz.

The down side of this is the fact that MQTT will display an elaborate log message for each MQTT command coming in. Useful for a new synch, but after that I don't need the log lines any more.
Is it possible to suppress the log lines from the MQTT interface?
Hans
manjh
Posts: 859
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: is it possible to suppress MQTT messages?

Post by manjh »

Anyone?
Hans
User avatar
Varazir
Posts: 487
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: is it possible to suppress MQTT messages?

Post by Varazir »

Example ?
Raspberry PI 4 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
manjh
Posts: 859
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: is it possible to suppress MQTT messages?

Post by manjh »

Varazir wrote: Sunday 10 May 2020 10:04Example ?
Sure. Here's a snipping from the log:

Code: Select all

2020-05-10 16:52:17.912 MQTT: Topic: domoticz/in, Message: {"command":"udevice","idx":3786,"nvalue":0,"svalue":"16.5;55;1"}
2020-05-10 16:52:26.924 MQTT: Topic: domoticz/in, Message: {"command":"udevice","idx":3713,"nvalue":0,"svalue":"472565;428577;0;0;179;0"}
2020-05-10 16:52:27.034 MQTT: Topic: domoticz/in, Message: {"command":"udevice","idx":3712,"nvalue":0,"svalue":"312572"}
For each and every MQTT message coming in, it displays one line. Since I synchronize many I get a lot of log entries that are actually not necessary. Only during setup it is handy, so the very best solution is a button on the HW line of MQTT in Domoticz, to allow or suppress log lines.

Before you ask: I used to have two Domoticz systems set up with remote device sharing, this way the synch happens behind the scenes without any logging. But this does not work for all devices, specifically text devices are a problem. So once I set up the MQTT link for those, I decided to keep all synchronization in the same system and moved everything to MQTT.
Hans
manjh
Posts: 859
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: is it possible to suppress MQTT messages?

Post by manjh »

Does that help?
I've looked at the source code, but it's not easy to find the right spot. Perhaps the author of the MQTT stuff could add a button to this effect?
Hans
manjh
Posts: 859
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: is it possible to suppress MQTT messages?

Post by manjh »

Starkes wrote: Tuesday 19 May 2020 10:49 Normally if a publisher publishes a message to a topic, and no one is subscribed to that topic the message is simply discarded by the broker.
I understand. That is the basic principle of MQ.
I was referring to the lines in the Domoticz log.
Hans
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest