FHEM Forum

FHEM - Hausautomations-Systeme => MQTT => Thema gestartet von: bend94 am 09 April 2020, 08:44:41

Titel: fhem mqtt_bridge
Beitrag von: bend94 am 09 April 2020, 08:44:41
Hi all,

I am using fhem with mqtt.
All my devices have a mqtt_bridge.

i would like to know is it possible to disable mqtt publish from fhem by cli for a while and then be able to reactivate it?
Thanks
Titel: Antw:fhem mqtt_bridge
Beitrag von: jbraeu am 09 April 2020, 08:46:58
mqtt server eintrag in fhem.cfg auskommentieren?
Titel: Antw:fhem mqtt_bridge
Beitrag von: bend94 am 09 April 2020, 09:02:52
Hi
sorry i don't speak Dutch ! can you reply in English please ?
i don't understand your reply

thx
Titel: Antw:fhem mqtt_bridge
Beitrag von: bend94 am 09 April 2020, 09:04:39
please find my fhem.cfg

best regards
Titel: Antw:fhem mqtt_bridge
Beitrag von: bend94 am 09 April 2020, 09:09:46
in fact, my issue is :

each time when my python script publish a message to fhem.
I don't know why but fhem each time it receives mqtt message , it re-publish another mqtt message

how can i avoid to re-publish from fhem ?

thanks in advance
Titel: Antw:fhem mqtt_bridge
Beitrag von: ToKa am 09 April 2020, 09:23:25
Hi Bend,

you have to set the attribute "mqttForward" in every device to "none". In that case the received message isn't forwarded (re-published).

Kind regards
Torsten
Titel: Antw:fhem mqtt_bridge
Beitrag von: rudolfkoenig am 09 April 2020, 09:27:13
Zitatsorry i don't speak Dutch ! can you reply in English please ?
I like your humor.

Note: the MQTT module is not as actively supported as the MQTT2* ones, the same is true for MQTT_GENERIC_BRIDGE vs. MQTT_BRIDGE.
As far as I see neither MQTT nor MQTT_BRIDGE have any disable capabilities, as opposed to MQTT2* and MQTT_GENERIC_BRIDGE.
I recommend upgrading to these modules.

@ToKa: I found the mqttForward attribute only in MQTT_GENERIC_BRIDGE, whereas bend94 is using MQTT_BRIDGE.
Am I missing something?
Titel: Antw:fhem mqtt_bridge
Beitrag von: ToKa am 09 April 2020, 09:44:57
Hi Rudi,

no you are right. I didn't realized the missing "generic"  :-[

Regards
Torsten
Titel: Antw:fhem mqtt_bridge
Beitrag von: bend94 am 15 April 2020, 20:54:02
hi

i am not sure to really understand.
In my config i create for each object a MQTT_BRIDGE like this:
define mqtt_pirsalon MQTT_BRIDGE pirsalon

so you want me to used instead that :

define mqtt_salon MQTT2_BRIDGE pirsalon
or
define mqtt_salon MQTT_GENERIC_BRIDGE pirsalon

it is correct ?
thanks
Titel: Antw:fhem mqtt_bridge
Beitrag von: ToKa am 15 April 2020, 21:41:12
Hi,

you should use MQTT_GENERIC_BRIDGE instead of MQTT_BRIDGE.

Regards
Torsten