Page 1 of 1

is it possible to suppress MQTT messages?

Posted: Wednesday 29 April 2020 22:09
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?

Re: is it possible to suppress MQTT messages?

Posted: Sunday 10 May 2020 9:43
by manjh
Anyone?

Re: is it possible to suppress MQTT messages?

Posted: Sunday 10 May 2020 10:04
by Varazir
Example ?

Re: is it possible to suppress MQTT messages?

Posted: Sunday 10 May 2020 16:58
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.

Re: is it possible to suppress MQTT messages?

Posted: Friday 15 May 2020 0:05
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?

Re: is it possible to suppress MQTT messages?

Posted: Tuesday 19 May 2020 23:06
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.