arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.97k stars 4.77k forks source link

MiElHVAC - sometimes toggling power via mqtt toggles twice via SRC Switch #15870

Closed logon84 closed 2 years ago

logon84 commented 2 years ago

PROBLEM DESCRIPTION

Sometimes while switch power of MiElHVAC module via MQTT (I only use mqtt) a SRC:SWITCH power state appears in log, switching again the power state. This results in no power state change at all, since power toggles twice.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
23:46:44.208 CMD: Grp 0, Cmd 'RULE', Idx 1, Len 0, Pld -99, Data ''
23:46:44.217 MQT: stat/heatpump/RESULT = {"Rule1":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":63,"Free":448,"Rules":"ON switch?#state==2 DO publish cmnd/heatpump/Power toggle ENDON"}}
23:46:44.225 MiElHVAC: sending FC42013010 02000000000000000000000000000000 7b
23:46:44.374 WIF: Probando conexión...
23:46:44.377 MiElHVAC: sending FC42013010 06000000000000000000000000000000 77
23:46:44.480 MiElHVAC: response data 020000010308030500000CAE00000000
23:46:44.482 SRC: Backlog
23:46:44.485 CMD: Grp 0, Cmd 'RULE', Idx 2, Len 0, Pld -99, Data ''
23:46:44.494 MQT: stat/heatpump/RESULT = {"Rule2":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
23:46:44.633 MiElHVAC: sending FC42013010 02000000000000000000000000000000 7b
23:46:44.735 SRC: Backlog
23:46:44.738 CMD: Grp 0, Cmd 'RULE', Idx 3, Len 0, Pld -99, Data ''
23:46:44.745 MQT: stat/heatpump/RESULT = {"Rule3":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
NOTE: I tried solving this with rule1, but I get same behaviour. Without rules the same happens too
NOTE: SwitchMode was 0 0 0 0 0 0 0 0 nd the issue happened. Tried to set it to 15 to solve the problem, but no luck.
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
14:17:56.203 MiElHVAC: response data 060000000000199DD400000000000000
14:17:56.258 MiElHVAC: sending FC42013010 02000000000000000000000000000000 7b
14:17:56.361 SRC: MQTT
14:17:56.364 CMD: Grp 0, Cmd 'POWER', Idx 1, Len 2, Pld 1, Data 'ON'
14:17:56.370 MQT: stat/heatpump/RESULT = {"POWER":"ON"}
14:17:56.375 MQT: stat/heatpump/POWER = ON
14:17:56.462 MiElHVAC: sending FC41013010 01010001000000000000000000000000 7b
14:17:56.564 MiElHVAC: response data 020000000307030500000CB000000000
14:17:56.566 SRC: Switch
14:17:56.574 MQT: stat/heatpump/RESULT = {"POWER":"OFF"}
14:17:56.578 MQT: stat/heatpump/POWER = OFF

TO REPRODUCE

Steps to reproduce the behavior: Power ON or power OFF via MQTT sometimes works. Others a SRC SWITCH toggles power again

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. No SRC Switch toggling power when sending a mqtt command

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

sfromis commented 2 years ago

You did not provide the template asked for in the template, and thus your GPIO configuration is not visible, as other messages indicate that you with Module 0 use the template for this part of the config.

SRC: Switch should indicate that a gpio pin defined as a "Switch" had activity, with the default action of Tasmota being to switch the power output. What is the purpose of the Switch pin you have defined? If you have no use for it, you could consider removing this config.

logon84 commented 2 years ago

You did not provide the template asked for in the template, and thus your GPIO configuration is not visible, as other messages indicate that you with Module 0 use the template for this part of the config.

SRC: Switch should indicate that a gpio pin defined as a "Switch" had activity, with the default action of Tasmota being to switch the power output. What is the purpose of the Switch pin you have defined? If you have no use for it, you could consider removing this config.

Is not the output of "Backlog Template; Module; GPIO 255" what you asking for? It is present in my first message. No switches defined. I have been digging in the code, seems that SRC SWITCH in this case is a interpretation of the phisical button attached to the HVAC machine, not the esp8266. So for me it seems that the code maybe needs a delay after changing the power state: it seems to me that after changing the power via mqtt, the code compares this mqtt command with the received frames too soon, and as they don't match, the power is toggled again via SRC_SWITCH (line 967 of xdrv_44_miel_hvac.ino)

sfromis commented 2 years ago

Yes, that was what I was missing. You only provided the output of the last of those 3 commands.

Anyway, I did also a bit later notice that misleading usage of SRC_SWITCH the driver, and without using that specific device, I cannot have anything to add about what the root cause of the confusion may be. You seem to be getting there :-)

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 2 years ago

This issue was automatically closed because of being stale. Feel free to open a new one if you still experience this problem.