Open marc107 opened 5 months ago
Hi Marc,
I'm using the Mosquitto MQTT-Brooker. That's fine, there is one topic wbec
and one OpenWB
published by the wbec. No different names here.
Does your wbec use a fixed IP in your network?
Regards, Andre.
Hi Andre,
thanks for your reply! Yes, IP of wbec is fixed. I have to explore the mqtt tomorrow, currently i don't know the newest topic generated @fhem. There are a lot... ;-)
I did some searching and found out that the mqtt-server included in fhem creates a new device with every reconnect if no clientid is defined in the mqtt device (here the wbec).
Excerpt from the fhem help: Most MQTT-capable devices contain options for assigning a unique ClientID (see the example of the zigbee2mqtt service above). If no ClientID is assigned, some clients use new IDs for each connection. It is recommended to make use of these setting options if possible.
Unfortunately I could not find the option, is it not included in wbec or does it have a different name?
I have found a solution within fhem: If you edit the readings list so that it looks like this afterwards, no new mqtt devices are created:
However, the question about the mqqt ClientID in wbec might still be interesting in general.
Hello, sorry, but I don't have further information about the MQTT client id.
Hello, sorry, but I don't have further information about the MQTT client id.
Die Arduino-Library unterstützt eine ClientID: https://github.com/knolleary/pubsubclient Dokumentiert in der API: https://pubsubclient.knolleary.net/api#connect
Danke für den Hinweis. Das hier dürfte es erklären: https://github.com/steff393/wbec/blob/07a5855341ea20f6cb23f749aa104cddcff0aeff/src/mqtt.cpp#L160-L162
https://github.com/steff393/wbec/blob/07a5855341ea20f6cb23f749aa104cddcff0aeff/src/mqtt.cpp#L169
Ich lasse den Issue mal offen und baue künftig eine parametrierbare Client-ID ein: cfgMqttClientId Wenn der Parameter 0 ist, dann wäre das Verhalten wie bisher (=random(255)). Ansonsten der eingestellte Wert.
Hello everyone,
i have been using wbec in combination with mqtt and fhem for some time now and I noticed that several (over 100) mqtt devices have been created for wbec in fhem - see the following screenshot. Of course, the device with the highest consecutive number is always used, but deleting the more than 100 devices is not really fun. Does anyone have an idea why new devices are always being created in autocreate? Apparently wbec always reports to the mqtt broker with a different name!
Greetings & thanks
Marc