In traditional engineering, technologies are viewed as the core of the engineering design, in a physical world with a large number of diverse technological artefacts. The real world, however, also includes a huge number of social components -people, communities, institutions, regulations and everything that exists in the human mind -that have shaped and been shaped by the technological components. Smart urban ecosystems are examples of large-scale Socio-Technical Systems (STS) that rely on technologies, in particular on the Internet-of-Things (IoT), within a complex social context where the technologies are embedded. Designing applications that embed both social complexity and IoT in large-scale STS requires a Socio-Technical (ST) approach, which has not yet entered the mainstream of design practice. This chapter reviews the literature and presents our experience of adopting an ST approach to the design of a community-oriented smart grid application. It discusses the challenges, process and outcomes of this apporach, and provides a set of lessons learned derived from this experience that are also deemed relevant to the design of other smart urban ecosystems.