The home network system (HNS, for short) enables the flexible integration of networked home appliances, which achieves value-added integrated services. Assuring safety within such integrated services is a crucial issue to guarantee a high quality of life in smart home. In this paper, we present a novel framework for the safety of the HNS integrated services. We first propose a way to define safety in the context of the integrated services, which is characterized by local safety, global safety, and environment safety. We then propose a method that can validate the above three kinds of safety for given HNS implementations. Exploiting the concept of Design by Contract (DbC, for short), the proposed method represents every safety property as a contract between a provider and a consumer of an HNS object. The contracts are embedded within the implementations, and then are validated through elaborate testing. We implement the method using Java Modeling Language (JML, for short) and JUnit with a test-case generation tool TOBIAS. Using the proposed framework, one can define and validate the safety of HNS integrated services, systematically and efficiently.