There are many sources for information on the basics of the Playstation controller protocol. There is frustratingly little, however, in the way of comprehensive documentation for the controller's full command set.
This document is a rather loose collection of reverse-engineering notes, documenting a larger subset of the PS2 and Dual Shock