Tuya-Convert might not be possible for this device if the manufacturer started using newest Tuya firmware since this template was published (2020-06-20).
TuyaMCU 11,7 to move the relay to an uncontrollable dpId. WebUI toggle will have no effect.
TuyaMCU 21,2 maps the position command to dimmer, will not update position state on its own without the following rule.
Feedback is sent on dpId 3 while the position is controlled using dpId 2. To have regular dimmer updates use:
Rule1 ON TuyaReceived#DpType2Id3 DO Dimmer %value% ENDON
Enable the rule with
Rule1 1. The rule watches dimmer status dpId and forwards them to Dimmer command.
This setup might create some micromovements on reboot or certain value dimmer commands due to difference in how the MCU calculates position value!
dpID 1 motor control:
0 = open / 1 = stop / 2 = close / 3 = continue
dpID 2 set position:
0 .. 100
dpID 3 current position:
0 .. 100 *report only
dpID 5 set motor direction:
0 = forward / 1 = back
dpID 7 working state:
0 = opening / 1 = closing *report only, only appears when using remote
dpID 10 error notification:
0x00 = ok / ??? = error` *report only