We study a heterogeneous wireless sensor network (WSN) where <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$N$ </tex-math></inline-formula> heterogeneous access points (APs) gather data from densely deployed sensors and transmit their sensed information to <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$M$ </tex-math></inline-formula> heterogeneous fusion centers (FCs) via multi-hop wireless communication. The heterogeneous optimal deployment of APs and FCs is modeled as an optimization problem with total wireless communication power consumption of the network as its objective function. We consider both static WSNs, where APs and FCs retain their deployed position, and mobile WSNs where APs and FCs can move from their initial deployment to their optimal locations. Based on the derived necessary conditions for the optimal deployment in static WSNs, we propose an iterative algorithm to deploy APs and FCs. In addition, we study the necessary conditions of the optimal movement-efficient deployment in mobile WSNs with constrained movement energy and present iterative algorithms to find such deployments, accordingly. Simulation results show that our proposed deployment algorithms outperform the existing methods in the literature, and achieve a lower total wireless communication power in both static and mobile WSNs.