MQTT Mapper conflicting with Tasmota switches
Moderators: leecollings, remb0
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
Use the following template when posting here:
Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....
If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly
If you are replying, please do not quote images/code from the first post
Please mark your topic as Solved when the problem is solved.
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.
Use the following template when posting here:
Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....
If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly
If you are replying, please do not quote images/code from the first post
Please mark your topic as Solved when the problem is solved.
-
- Posts: 369
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
MQTT Mapper conflicting with Tasmota switches
Hi,
I have a couple of Tasmota switches that turn my lights on/off in domoticz.
All worked well UNTIL I enabled the MQTT Mapper plugin to read the data of my Marstek Battery ...
It seem that the domoticz/in and domoticz/out commands somehow conflict with MQTT Mapper ...
The switches don't respond the commands from domoticz, or with some huge delay, sometimes HOURS
Did anyone else see this kind of issues ?
where should I start fixing this ?
I have a couple of Tasmota switches that turn my lights on/off in domoticz.
All worked well UNTIL I enabled the MQTT Mapper plugin to read the data of my Marstek Battery ...
It seem that the domoticz/in and domoticz/out commands somehow conflict with MQTT Mapper ...
The switches don't respond the commands from domoticz, or with some huge delay, sometimes HOURS
Did anyone else see this kind of issues ?
where should I start fixing this ?
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- waltervl
- Posts: 5996
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
Seems some issue with the connection to your MQTT broker.
How do you switch your tasmota lights with mqtt?
Do you have a topic of Domoticz in or out in the MQTT mapper config?
How do you switch your tasmota lights with mqtt?
Do you have a topic of Domoticz in or out in the MQTT mapper config?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 369
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
Broker is on localhost ...
yes, the default "tasmota" setup where in the device the idx of the domoticz is defined.
so publishing to domoticz/out with a payload for a tasmota devices causes the device to switch.
from MQTT Explorer
Code: Select all
2025-08-09 10:04:53
{
"Battery" : 255,
"LastUpdate" : "2025-08-09 10:01:21",
"RSSI" : 12,
"description" : "",
"dtype" : "Light/Switch",
"hwid" : "3",
"id" : "0001411B",
"idx" : 203,
"name" : "R01S2 licht woonkamer voor",
"nvalue" : 0,
"org_hwid" : "3",
"stype" : "Switch",
"svalue1" : "0",
"switchType" : "On/Off",
"unit" : 1
}
So YES, domoticz pushes a command to MQTT for this tasmota device.
IF I disable MQTT Mapper that command is pushed within a second ...
NO, there are no domoticz/in or out definitions in the MQTT mapper config just the in other topic discussed Marstek.json
Code: Select all
cat Marstek.json
{
"MPWR": {
"topic": "Marstek",
"key":"MPWR",
"type": "243", "subtype": "29", "switchtype": "0",
"mapping": {"item": "params/r_data/2/value;~0", "multiplier": -1, "digits": 1}
},
"MSOC": {
"topic": "Marstek",
"key":"MSOC",
"type": "243", "subtype": "6", "switchtype": "0",
"mapping": {"item": "params/r_data/1/value", "multiplier": 1, "digits": 1}
},
"MTCE": {
"topic": "Marstek",
"key":"MTCE",
"type": "113", "subtype": "0", "switchtype": "3",
"mapping": {"item": "params/r_data/3/value", "multiplier": 0.01, "digits": 2}
},
"MTDE": {
"topic": "Marstek",
"key":"MTDE",
"type": "113", "subtype": "0", "switchtype": "3",
"mapping": {"item": "params/r_data/4/value", "multiplier": 0.01, "digits": 2}
},
"MIT": {
"topic": "Marstek",
"key":"MIT",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "params/r_data/5/value", "multiplier": 0.1, "digits": 1}
},
"Battery": {
"topic": "Marstek",
"key":"Battery",
"type": "250", "subtype": "1", "switchtype": "0",
"mapping": {"item" : "params/r_data/3/value;~0;params/r_data/4/value;~0;~0;~0", "multiplier": 10, "digits": 2}
}
}
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- jvdz
- Posts: 2351
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
Check with mqtt Explorer whats coming in & out as it might be you created a floodding of messages with retained looping messages maybe?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 50
- Joined: Sunday 05 August 2018 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2025.1
- Location: Eindhoven area
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
Did you already set the sending time from the DR134 to a slower rate ?
I have 1 second, but with a slower Mqtt broker choose a longer time?
I have 1 second, but with a slower Mqtt broker choose a longer time?
Domoticz on Docker on Raspberry PI 5 with 500 Gb NVMe|Milight|KaKu + RFXCOM|Goodwe|Smartstuff P1 meter|Buienradar|Afval kalender|Tuya-wifi|Zigbee + deCONZ Conbee II|Marstek Homebattery 5,12Kwh via Modbus on Pusr-dr134|MQTTMapper|Quatt v2|
-
- Posts: 369
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
A couple of hours ago I set the DR134 to 5 sec .
no improvement ...
no improvement ...
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
-
- Posts: 50
- Joined: Sunday 05 August 2018 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2025.1
- Location: Eindhoven area
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
And what @jvdz mentioned?
Maybe port 1883 conflict?
How long is keep-alive on mqttmapper and your tasmota?
Ai answer :
Port 1883, the default port for unencrypted MQTT communication, remains occupied for as long as the MQTT client and server maintain an active connection. The duration of this connection, and therefore the occupation of the port, depends on the Keep Alive interval set by the client and the server's configuration for session expiry.
Factors influencing the duration of port 1883 occupation:
Keep Alive Interval:
Clients send MQTT control packets (like PINGREQ) within a specified interval (Keep Alive) to indicate they are still connected. If no packets are received within 1.5 times the Keep Alive interval, the broker might assume the client is disconnected.
Session Expiry:
MQTT allows for persistent sessions. When a client connects, it can request a session expiry interval. If the client disconnects, the session can persist for the specified duration or indefinitely, depending on the broker's configuration.
Server-side Configuration:
The broker can also enforce a maximum session expiry interval. For example, in RabbitMQ, this parameter is configurable, and setting it to 0 will force all sessions to end as soon as the network connection ends.
Maybe port 1883 conflict?
How long is keep-alive on mqttmapper and your tasmota?
Ai answer :
Port 1883, the default port for unencrypted MQTT communication, remains occupied for as long as the MQTT client and server maintain an active connection. The duration of this connection, and therefore the occupation of the port, depends on the Keep Alive interval set by the client and the server's configuration for session expiry.
Factors influencing the duration of port 1883 occupation:
Keep Alive Interval:
Clients send MQTT control packets (like PINGREQ) within a specified interval (Keep Alive) to indicate they are still connected. If no packets are received within 1.5 times the Keep Alive interval, the broker might assume the client is disconnected.
Session Expiry:
MQTT allows for persistent sessions. When a client connects, it can request a session expiry interval. If the client disconnects, the session can persist for the specified duration or indefinitely, depending on the broker's configuration.
Server-side Configuration:
The broker can also enforce a maximum session expiry interval. For example, in RabbitMQ, this parameter is configurable, and setting it to 0 will force all sessions to end as soon as the network connection ends.
Domoticz on Docker on Raspberry PI 5 with 500 Gb NVMe|Milight|KaKu + RFXCOM|Goodwe|Smartstuff P1 meter|Buienradar|Afval kalender|Tuya-wifi|Zigbee + deCONZ Conbee II|Marstek Homebattery 5,12Kwh via Modbus on Pusr-dr134|MQTTMapper|Quatt v2|
-
- Posts: 369
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
Ok, I hope I solved this issue ...
it is in MQTT Client Gateway with LAN interface (which handles domoticz/out)
before using the Marstek thru MQTT Mapper I never had any (noticable) issues.
domoticz/out was indeed flooded by outgoing messages.
Before I did not use the "Setup" of MQTT Client Gateway with LAN interface so by default all is sent to domoticz/out
Now I limited it by selecting only the devices that actually NEED domoticz/out (and that excludes all MQTTAD and MQTT mapper devices)
I hope this helps others with this kind of issues ...
question : the logging of MQTT Client Gateway with LAN interface does not provide much help, I could not find any logging of domoticz/out. Is it possible to improve this ?
it is in MQTT Client Gateway with LAN interface (which handles domoticz/out)
before using the Marstek thru MQTT Mapper I never had any (noticable) issues.
domoticz/out was indeed flooded by outgoing messages.
Before I did not use the "Setup" of MQTT Client Gateway with LAN interface so by default all is sent to domoticz/out
Now I limited it by selecting only the devices that actually NEED domoticz/out (and that excludes all MQTTAD and MQTT mapper devices)
I hope this helps others with this kind of issues ...
question : the logging of MQTT Client Gateway with LAN interface does not provide much help, I could not find any logging of domoticz/out. Is it possible to improve this ?
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- gizmocuz
- Posts: 2593
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
You can use MQTT Explorer to see the MQTT traffic.
Aldo with debug info it logs more in Domoticz, it is not desired to log that much traffic
Aldo with debug info it logs more in Domoticz, it is not desired to log that much traffic
Quality outlives Quantity!
-
- Posts: 369
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
besides in MQTT explorer I could nog find any place to see domoticz/out
the problem is that MQTT Client Gateway with LAN interface is flooded BEFORE the msg was send to domoticz/out ...
it is not visible in MQTT exporer, it just gets there with the delay
No warning, nothing, just a huge delay in processing ...
domoticz queues this msg for MQTT Client Gateway with LAN interface and there somewhere is the delay ...
the problem is that MQTT Client Gateway with LAN interface is flooded BEFORE the msg was send to domoticz/out ...
it is not visible in MQTT exporer, it just gets there with the delay
No warning, nothing, just a huge delay in processing ...
domoticz queues this msg for MQTT Client Gateway with LAN interface and there somewhere is the delay ...
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- jvdz
- Posts: 2351
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: MQTT Mapper conflicting with Tasmota switches
Not really, domoticz simply reads all incoming messages from mosquito, like MQTT Explorer does, so you will see exactly what needs to be read by domoticz when you open mosquito with MQTT Explorer!
The reason the system slows down is that it needs to process the events triggered by the read messages and when the messages are added faster to mosquito than domoticz can process you will see the slowdown.
The reason the system slows down is that it needs to process the events triggered by the read messages and when the messages are added faster to mosquito than domoticz can process you will see the slowdown.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Who is online
Users browsing this forum: No registered users and 1 guest