Resetting a HP 1810-24 or -24G to factory defaults is easy:
With the switch powered on, using both ends of a paperclip (or two separate paperclips), press and hold down the Reset and Clear buttons.
Release the Reset button, but keep the Clear button held down.
When all three mode LEDs (Act, FDx, and Spd) begin to blink, release the Clear button as well. When the self-test completes, the switch will be reset to factory defaults. Its IP address will be obtained through DHCP, or if there's no DHCP, it will be set to 192.168.2.10. The password will be blank.