gBridge icon indicating copy to clipboard operation
gBridge copied to clipboard

Disable "Could not match topic ${topicuserpart} for user ${userid}"

Open ivanovlk opened this issue 6 years ago • 5 comments

Question:

Is it possible to disable somehow the log of "Could not match topic ${topicuserpart} for user ${userid}" in index.js line 313. If i comment the line inside docker container, will it work ??

The reason is: I have few ( 7 to be precise) Sonoff devices which post telemetry and status messages in MQTT and my redis-worker Log is filled with "Could not match" messages :(

This makes it really hard to see if a real problem exists :)

BR,

ivanovlk avatar Mar 19 '19 07:03 ivanovlk

Why, if I may ask, are your Sonoff devices publishing to the gBridge topic? The redis worker only listens to messages on the gBridge topic, so it makes sense that you would get that error if other non-gbridge related messages get published

giejay avatar Apr 10 '19 06:04 giejay

Hi,

Yes. Tasmota devices post to /gbridge/u1/prefix/device_name/sufix

where prefix is (CMND, STAT, TELE and so on) and suffix is (POWER.... and so on)

CMDN and STAT ae handled by gBridge because they are maintained in status and power topic.

But TELE prefixes are not, and i was not able to disable them in Tasmota completely (even re-compiling tasmota with different settings).

BTW tele prefixes contain data such as (uptime, voltage levels and so on). Which i don't need at all :)

ivanovlk avatar Apr 10 '19 06:04 ivanovlk

Ah ok, makes sense. Maybe we should log it at a certain level (info?) and make the loglevel (warn) configurable by config...

giejay avatar Apr 10 '19 08:04 giejay

Thumbs up :)

Currently i just commented the line in index.js and the log is clean :)

ivanovlk avatar Apr 10 '19 08:04 ivanovlk

This log feature was meant to help users to find problems where they are just sending data to wrong MQTT topics (because of spelling mistakes or alike).

I'll dump this line completely. It is even commented out on the production servers.

I've done that at some point, when this line was causing the log file on my server to grow at around 10GB/ minute... ;)

peterkappelt avatar Apr 10 '19 08:04 peterkappelt