This paper focuses on the coordination of a population of thermostatically controlled loads (TCLs) with unknown parameters to achieve group objectives. The problem involves designing the device bidding and market clearing strategies to motivate self-interested users to realize efficient energy allocation subject to a peak energy constraint. This coordination problem is formulated as a mechanism design problem, and we propose a mechanism to implement the social choice function in dominant strategy equilibrium. The proposed mechanism consists of a novel bidding and clearing strategy that incorporates the internal dynamics of TCLs in the market mechanism design, and we show it can realize the team optimal solution. This paper is divided into two parts. Part I presents a mathematical formulation of the problem and develops a coordination framework using the mechanism design approach. Part II presents a learning scheme to account for the unknown load model parameters, and evaluates the proposed framework through realistic simulations.Index Terms-Demand response, market-based coordination, mechanism design, thermostatically controlled loads.