A self-moving device configured to be powered by an energy module, the self-moving device (1,200,300,400,500) for moving and working inside a defined working area, wherein the self-moving device (1,200,300,400,500) comprises: a body (10,210,410); a movement module, disposed on the body (10,210,410) and configured to drive the self-moving device (1,200,300,400,500) to move; a task execution module, disposed on the body (10,210,410) and configured to perform a work task; and a control module, configured to: control the movement module to drive the self-moving device (1,200,300,400,500) to move inside a defined area, and control the task execution module to perform the work task, the self-moving device (1,200,300,400,500) is configured to be powered by the detachable energy module, the self-moving device (1,200,300,400,500) comprises an accommodating cavity (101,203,401,501) provided with an inlet (205,405,505) and configured to accommodate the energy module and a protective cover (230,430) configured to operably block the inlet, and the self-moving device (1,200,300,400,500) further comprises a reset structure to restore the protective cover that is open to a water-proof state; the self-moving device being characterized in that the reset structure comprises an automatic reset structure to automatically restore the protective cover (230,430) that is open to the water-proof state; and wherein the self-moving device (1,200,300,400,500) further comprises a pivot portion (240,440) configured to connect the protective cover (230,430) and the body (10,210,410), to enable the protective cover (230,430) to be rotatable around the pivot portion (240,440) to implement opening or closing of the protective cover (230,430). a body (10,210,410); a movement module, disposed on the body (10,210,410) and configured to drive the self-moving device (1,200,300,400,500) to move; a task execution module, disposed on the body (10,210,410) and configured to perform a work task; and a control module, configured to: control the movement module to drive the self-moving device (1,200,300,400,500) to move inside a defined area, and control the task execution module to perform the work task, the self-moving device (1,200,300,400,500) is configured to be powered by the detachable energy module, the self-moving device (1,200,300,400,500) comprises an accommodating cavity (101,203,401,501) provided with an inlet (205,405,505) and configured to accommodate the energy module and a protective cover (230,430) configured to operably block the inlet, and the self-moving device (1,200,300,400,500) further comprises a reset structure to restore the protective cover that is open to a water-proof state; the self-moving device being characterized in that the reset structure comprises an automatic reset structure to automatically restore the protective cover (230,430) that is open to the water-proof state; and wherein the self-moving device (1,200,300,400,500) further comprises a pivot portion (240,440) configured to connect the protective cover (230,430) and the body (10,210,410), to enable the protective cover (230,430) to be rotatable around the pivot portion (240,440) to implement opening or closing of the protective cover (230,430).