With the rapid growth of Internet of Things (IoT), the idea of integrating a variety of IoTs has been proposed to support a variety of novel applications. However, IoT devices are often deployed in an open environment in which IoTs are inclined to be malfunctioned. Although data reliability can be achieved by data recovery with conventional replication, the communication between IoTs is susceptible to eavesdropping. Since most of the current work focuses on designing the architectures for IoTs under the specific scenarios, the eavesdropping prevention for heterogeneous IoT systems remains unexplored. Therefore, in this paper, we consider using the network-coding-based distributed storage systems for security and show that repair bandwidth can be reduced by increasing storage per node. Moreover, we theoretically derive the relation between repair bandwidth and storage in heterogeneous IoT systems. Finally, we show the relation between storage cost and reliability with regard to different amounts of IoT devices.