Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TuyaMCU 63,X (5 speed buttons for Fan) not working properly or configuration missing #9737

Closed
12 of 13 tasks
vitoralvimb opened this issue Nov 4, 2020 · 8 comments
Closed
12 of 13 tasks
Assignees
Labels
wont/can't fix Result - Requested that can't be fixed/added or it is outside scope

Comments

@vitoralvimb
Copy link

PROBLEM DESCRIPTION

_I am using the AVATTO Fan Light FLS-02 with the tasmota version 8.5.1.

I have the Device integrated with Home Assistant and is working very well. The problem I´ve found is with Tasmota GUI Buttons._

I'd configured a 5 Speeds Fan Controller (FnId 63) to the dpId 3 using "Backlog TuyaMCU 63,3;".
So, I can see the 5 speed buttons in the Tasmota Gui (until now, it´s all OK).

But the problem is:
When we press, on the GUI, one of the 5 speed buttons (0 to 4), Tasmota send a TuyaSend message to the dpId (3 in my case).

Example pressing SPEED 2

23:56:20 SRC: WebGui
23:56:20 CMD: Group 0, Index 2, Command "TUYASEND", Data "3,2"
23:56:21 TYA: Send "55aa00060008030200040000000218"
23:56:21 MQT: stat/switchwall/fanlight1/RESULT = {"TuyaSend":"Done"}

The button is sending TuyaSend2 (Index 2) but the Fan is ENUM and it is waiting for TuyaSend4 (Index 4).
So, the 5 speed buttons are not working. Nothing happen with TuyaSend Index 2.

If I manually send TuyaSend4 3,2 by Console, for example, it works pretty well.
Result

14:18:07 CMD: Group 0, Index 4, Command "TUYASEND", Data "3,2"
14:18:07 TYA: Send "55aa00060005030400010214"
14:18:07 MQT: stat/switchwall/fanlight1/RESULT = {"TuyaSend":"Done"}
14:18:07 {"TuyaReceived":{"Data":"55AA03070005030400010218","Cmnd":7,"CmndData":"0304000102","DpType4Id3":2,"3":{"DpId":3,"DpIdType":4,"DpIdData":"02"}}}

Is it possible to configure the Speed Button to send TuyaSend4 (Index 4)? Or its a problem in Tasmota solution ?

REQUESTED INFORMATION

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

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in the docs
  • Searched the problem in the forum
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): Avatto Fan Light FLS-02
  • Tasmota binary firmware version number used: 8.5.1
    • Pre-compiled
    • [] Self-compiled
      • [] IDE / Compiler used: _____
  • Flashing tools used: Tasmotizer 1.2 for windows
  • Provide the output of command: Backlog Template; Module; GPIO 255:
14:16:12 CMD: Group 0, Index 1, Command "BACKLOG", Data "Template; Module; GPIO 255"
14:16:13 SRC: Backlog
14:16:13 CMD: Group 0, Index 1, Command "TEMPLATE", Data ""
14:16:13 MQT: stat/switchwall/fanlight1/RESULT = {"NAME":"AVATTO Smart Wifi Fan Light","GPIO":[0,107,0,108,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
14:16:13 SRC: Backlog
14:16:13 CMD: Group 0, Index 1, Command "MODULE", Data ""
14:16:13 MQT: stat/switchwall/fanlight1/RESULT = {"Module":{"0":"AVATTO Smart Wifi Fan Light"}}
14:16:13 SRC: Backlog
14:16:13 CMD: Group 0, Index 1, Command "GPIO", Data "255"
14:16:13 MQT: stat/switchwall/fanlight1/RESULT = {"GPIO0":{"0":"None"},"GPIO1":{"107":"Tuya Tx"},"GPIO2":{"0":"None"},"GPIO3":{"108":"Tuya Rx"},"GPIO4":{"0":"None"},"GPIO5":{"0":"None"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"0":"None"},"GPIO13":{"0":"None"},"GPIO14":{"0":"None"},"GPIO15":{"0":"None"},"GPIO16":{"0":"None"}}

  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
    I am using Rules but there is nothing to do with the problem reported. With or without rules the problem is the same.
    Rule1 = Events received from Home Assistant to set Speed and Turn On the Fan
    Rule2 = To send the information to Home Assistant when the Speed is changed in the Phisical Switch
14:29:57 CMD: Group 0, Index 1, Command "BACKLOG", Data "Rule1; Rule2"
14:29:57 SRC: Backlog
14:29:57 CMD: Group 0, Index 1, Command "RULE", Data ""
14:29:57 MQT: stat/switchwall/fanlight1/RESULT = {"Rule1":"ON","Once":"OFF","StopOnError":"OFF","Length":292,"Free":219,"Rules":"ON EVENT#3,0 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,0; Publish stat/%topic%/POWER1 ON endon  ON EVENT#3,2 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,2; Publish stat/%topic%/POWER1 ON endon  ON EVENT#3,4 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,4; Publish stat/%topic%/POWER1 ON endon"}
14:29:58 SRC: Backlog
14:29:58 CMD: Group 0, Index 2, Command "RULE", Data ""
14:29:58 MQT: stat/switchwall/fanlight1/RESULT = {"Rule2":"ON","Once":"OFF","StopOnError":"OFF","Length":433,"Free":78,"Rules":"ON TuyaReceived#Data=55AA03070005030400010016 DO Publish stat/%topic%/SPEED 3,0 endon  ON TuyaReceived#Data=55AA03070005030400010117 DO Publish stat/%topic%/SPEED 3,2 endon  ON TuyaReceived#Data=55AA03070005030400010218 DO Publish stat/%topic%/SPEED 3,2 endon  ON TuyaReceived#Data=55AA03070005030400010319 DO Publish stat/%topic%/SPEED 3,2 endon  ON TuyaReceived#Data=55AA0307000503040001041A DO Publish stat/%topic%/SPEED 3,4 endon"}

  • Provide the output of this command: Status 0:
14:31:41 CMD: Group 0, Index 1, Command "STATUS", Data "0"
14:31:41 MQT: stat/switchwall/fanlight1/STATUS = {"Status":{"Module":0,"DeviceName":"Switch Wall Fan Light 1","FriendlyName":["Switch Wall Fan 1","Switch Wall Fan Light 1"],"Topic":"switchwall/fanlight1","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":1}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS1 = {"StatusPRM":{"Baudrate":9600,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota/release/tasmota.bin","RestartReason":"Power On","Uptime":"0T00:42:43","StartupUTC":"2020-11-04T16:48:58","Sleep":50,"CfgHolder":4617,"BootCount":48,"BCResetTime":"2020-11-03T23:44:20","SaveCount":467,"SaveAddress":"F9000"}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS2 = {"StatusFWR":{"Version":"8.5.1(tasmota)","BuildDateTime":"2020-10-02T10:09:47","Boot":31,"Core":"2_7_4_1","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8266EX","CR":"485/699"}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":4,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["MiniMeNet",""],"TelePeriod":60,"Resolution":"558180C0","SetOption":["00008029","2805C8000100060000005A00000000000000","00000000","00006000","00000000"]}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS4 = {"StatusMEM":{"ProgramSize":596,"Free":404,"Heap":24,"ProgramFlashSize":2048,"FlashSize":2048,"FlashChipId":"1540C8","FlashFrequency":40,"FlashMode":3,"Features":["00000809","8FDAE797","04368001","000000CD","010013C0","C000F981","00004004","00000000"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37","Sensors":"1,2,3,4,5,6"}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS5 = {"StatusNET":{"Hostname":"switchwall/fanlight1-8020","IPAddress":"192.168.86.XX","Gateway":"192.168.86.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.86.1","Mac":"XXXXXXXXXX","Webserver":2,"WifiConfig":4,"WifiPower":17.0}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.86.XX","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_147F54","MqttUser":"XXXXXXX","MqttCount":2,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS7 = {"StatusTIM":{"UTC":"2020-11-04T17:31:41","Local":"2020-11-04T14:31:41","StartDST":"2020-03-29T02:00:00","EndDST":"2020-10-25T03:00:00","Timezone":"-03:00","Sunrise":"03:42","Sunset":"13:24"}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS10 = {"StatusSNS":{"Time":"2020-11-04T14:31:41"}}
14:31:41 MQT: stat/switchwall/fanlight1/STATUS11 = {"StatusSTS":{"Time":"2020-11-04T14:31:41","Uptime":"0T00:42:43","UptimeSec":2563,"Heap":24,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"MiniMeNet","BSSId":"88:3D:24:94:6C:B5","Channel":6,"RSSI":100,"Signal":-40,"LinkCount":2,"Downtime":"0T00:00:23"}}}

  • Provide the output of the Console log output when you experience your issue; if applicable:
    (Please use weblog 4 for more debug information)
  Console output here:


TO REPRODUCE

_Very simple. Just need to execute the command:
TuyaMCU 63,x (replacing x for any dpId you have) _

You will have 5 speed buttons on the Tasmota GUI

Press one of them on the GUI (0 to 4). Tasmota will send a TuyaSend message to the chosen dpId (3 in my case).

Example pressing SPEED 2

23:56:20 SRC: WebGui
23:56:20 CMD: Group 0, Index 2, Command "TUYASEND", Data "3,2"
23:56:21 TYA: Send "55aa00060008030200040000000218"
23:56:21 MQT: stat/switchwall/fanlight1/RESULT = {"TuyaSend":"Done"}

EXPECTED BEHAVIOUR

I expect that the Fan Speed Button could send TuyaSend4 command (Index 4), once the fan is waiting ENUM comand

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)

@effelle
Copy link
Contributor

effelle commented Nov 4, 2020

Thanks for reporting, I already aware of the bug.

The fan controller will be removed from the configuration as soon as I'll have time to do it and will be replaced by up to 3 different enum type4 (range 0 - 10). The webgui buttons will be probably removed because are just a waste of space. Perhaps I'll add some sliders with snap points, didn't decided yet.

As important note you should consider Tuya has almost dropped completely ESP devices and is replacing them with ARM microcontrollers not supported by Tasmota. For that reason I'm not considering the Tuya platform as important as it was.

Closing for now as there is no solution at the moment but fear not, I'll mention this issue in my update when it will be ready so you will have a feedback.

@effelle effelle closed this as completed Nov 4, 2020
@effelle effelle self-assigned this Nov 4, 2020
@ascillato2 ascillato2 added the wont/can't fix Result - Requested that can't be fixed/added or it is outside scope label Nov 4, 2020
@effelle effelle mentioned this issue Nov 7, 2020
6 tasks
@rt400
Copy link
Contributor

rt400 commented Nov 29, 2020

@effelle @vitoralvimb i have also the AVATTO Fan Light FLS-02 and the fan work fine with rules.
my problem is that if i turn on the light from the switch the homeassistant wont update . i try to fix it with rules but with no success . you have the same issue ?

@vitoralvimb
Copy link
Author

vitoralvimb commented Nov 29, 2020

@effelle @vitoralvimb i have also the AVATTO Fan Light FLS-02 and the fan work fine with rules.
my problem is that if i turn on the light from the switch the homeassistant wont update . i try to fix it with rules but with no success . you have the same issue ?

There is no need to use rules for light. Check your MQTT Topic configuration on TASMOTA and check on HASS. Probably the problem is there.
I am using FLS-02 bought on November/2020.

I have no problems and the light works perfectly:

Tasmota Template:
{“NAME”:“AVATTO Smart Wifi Fan Light”,“GPIO”:[0,107,0,108,0,0,0,0,0,0,0,0,0],“FLAG”:0,“BASE”:54}

TOPIC (I use it but you can choose yours):
switchwall/fanlight01

Tasmota CONSOLE:
BackLog TuyaMCU 11,1; TuyaMCU 63,3; TuyaMCU 12,9; WebButton1 Fan; WebButton2 Light;

Rules:
Rule1 ON EVENT#3,0 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,0; POWER1 ON endon
ON EVENT#3,2 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,2; POWER1 ON endon
ON EVENT#3,4 DO Backlog Publish cmnd/%topic%/TuyaSend4 3,4; POWER1 ON endon;

Rule2 ON TuyaReceived#Data=55AA03070005030400010016 DO Publish stat/%topic%/SPEED 3,0 endon ON TuyaReceived#Data=55AA03070005030400010117 DO Publish stat/%topic%/SPEED 3,2 endon ON TuyaReceived#Data=55AA03070005030400010218 DO Publish stat/%topic%/SPEED 3,2 endon ON TuyaReceived#Data=55AA03070005030400010319 DO Publish stat/%topic%/SPEED 3,2 endon ON TuyaReceived#Data=55AA0307000503040001041A DO Publish stat/%topic%/SPEED 3,4 endon;

Rule1 1;
Rule2 1;

On HASS:
fan:

  • platform: mqtt
    name: "MQTT Switch Wall Fan 01"
    qos: 0
    state_topic: "stat/switchwall/fanlight01/POWER1"
    command_topic: "cmnd/switchwall/fanlight01/POWER1"
    speed_state_topic: "stat/switchwall/fanlight01/SPEED"
    speed_command_topic: "cmnd/switchwall/fanlight01/EVENT"
    payload_on: 'ON'
    payload_off: 'OFF'
    payload_low_speed: '3,0'
    payload_medium_speed: '3,2'
    payload_high_speed: '3,4'
    availability_topic: tele/switchwall/fanlight01/LWT
    payload_available: Online
    payload_not_available: Offline
    speeds:
    • low
    • medium
    • high

light:

  • platform: mqtt
    name: "MQTT Switch Wall Fan Light 01"
    qos: 1
    state_topic: "stat/switchwall/fanlight01/POWER2"
    command_topic: "cmnd/switchwall/fanlight01/POWER2"
    payload_on: "ON"
    payload_off: "OFF"
    availability_topic: "tele/switchwall/fanlight01/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"

On the LOVELACE UI I am using a custom component for FAN. Very intersting.
I am using the custom FrontEnd called fan-control-entity-row. You can find it on HACS

ON LOVELACE:
type: entities
title: Fans
show_header_toggle: false
entities:
entity: fan.mqtt_switch_wall_fan_1
type: ‘custom:fan-control-entity-row’
name: Bedroom
customTheme: false

If you press any speed, it will turn on the fan at the right speed.

@rt400
Copy link
Contributor

rt400 commented Nov 30, 2020

yes i did like this. but when i turn on the light from switch in the Homeassistant the state not change.. only if i turn the light from the Homeassistant UI. so i never know if someone turn on the light from the switch. the fan control work grate and update the state in HA.

@vitoralvimb
Copy link
Author

yes i did like this. but when i turn on the light from switch in the Homeassistant the state not change.. only if i turn the light from the Homeassistant UI. so i never know if someone turn on the light from the switch. the fan control work grate and update the state in HA.

Using the Tasmota Device Console and the MQTT Explorer you can debug it.
Check the state and command topic when your turn on the phisical switch. Check if there is something wrong in the topic or other problem. If you can, write here your Console LOG and the Topic when you do this action.

@rt400
Copy link
Contributor

rt400 commented Dec 6, 2020

yes i did like this. but when i turn on the light from switch in the Homeassistant the state not change.. only if i turn the light from the Homeassistant UI. so i never know if someone turn on the light from the switch. the fan control work grate and update the state in HA.

Using the Tasmota Device Console and the MQTT Explorer you can debug it.
Check the state and command topic when your turn on the phisical switch. Check if there is something wrong in the topic or other problem. If you can, write here your Console LOG and the Topic when you do this action.

do you have the same issue ? cause we have the same module...

@vitoralvimb
Copy link
Author

vitoralvimb commented Dec 6, 2020 via email

@rt400
Copy link
Contributor

rt400 commented Dec 8, 2020

Well it's really weird, do not know what I did but suddenly it updates the status.
Really weird ... could it be that a firmware update fixed the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wont/can't fix Result - Requested that can't be fixed/added or it is outside scope
Projects
None yet
Development

No branches or pull requests

4 participants