Its a butterfly; a resident of my garden.
Giant redeye butterflies (Gangara thyrsis) are dark chocolate brown in colour, with yellowish and reddish patches on the forewings. This is not very much visible in resting position.
The larvae look funny at certain stage, with cottony, thread-like outgrowths. If disturbed they may shed these waxy threads. They are voracious eaters of palm fronds and destroy my ornamental palm plants in no time!
Caterpillar pastes together the edges of the palm leaves to make a pupa (chrysalis) and this is a sort of waterproof chamber.