Keywords

1 Introduction

SNS, such as Twitter, Facebook, MySpace, and LinkedIn, makes it possible for people to communicate and share information easily. And the SNS can be defined as web-based social spaces concentrating on facilitating communication, collaboration, and content sharing among people who would like to publish, share, and discuss short messages on the web [1]. With web-based WSN, the physical world can interact with the Internet more closely. And in general, system developers will do lots of work and it is hard for system administrators to manage WSN. For example, they have not only to master basic knowledge and web programming skills (e.g., HTML, JavaScript, and PHP) to create their web sites but also to build a web server. Furthermore, security and authorization may need to be considered in most cases. A database server also may be needed in order to save sensor data from WSNs. Consequently, the system design and network management of WSN have become a critical issue.

In China, Twitter and Facebook are unavailable. Sina Weibo is the most popular microblogging service in China and it has over 300 million users. Additionally, Sina Weibo has a stable open SDK that provides rich possibilities to application developers [2]. This chapter proposes an alternative approach that uses Sina Weibo as a platform for sensor network monitoring systems to solve the issues mentioned above. As a case study, a home environment monitoring system employing our proposal method has been developed.

2 Related Works

There are some studies that use SNS as a platform for sensor network systems. However, Twitter or Facebook is generally employed in these researches. Thereinto, a framework to globally share locally measured sensory readings based on Twitter is provided [3]. SoMoS proposed a platform-independent middleware to manage wireless sensor networks by integrating social network services like Twitter and Facebook [4]. Twitter can provide an “open” publish-subscribe infrastructure for sensors and smartphones and also pave the way for ubiquitous crowd-sourced sensing and collaboration applications [5]. The functionality and the Web 2.0 technologies provided by Facebook to transform the interaction with the Smart Home into a shared, social experience have been exploited [6].

Our approach with Sina Weibo is a better choice than the previous researches with Twitter or Facebook which is unavailable in China. This is why we selected Sina Weibo to take advantage of user-friendly functions.

3 The Description of a Typical Architecture of WSN Without SNS

A traditional and typical WSN system toward home environment monitoring through the web without SNS is introduced.

Without SNS’s support, home environment monitoring system based on a typical and traditional architecture is as shown in Fig. 84.1 [79]. Obviously, in order to design and implement the above WSN-based system, we realize that many great efforts have been made by developers, including web programming, maintaining the web server and network security issues of WSN management.

Fig. 84.1
figure 1

Typical architecture of WSN in home environment monitoring system through web

4 The Description of Proposed System

4.1 Architecture of Proposed System with SNS

The structure of our proposed home environment monitoring system employing SNS Sina Weibo is viewed in Fig. 84.2. The data from wireless sensor nodes and USB cameras containing captured image, temperature, humidity, and light intensity in real home environment are transferred to a gateway Raspberry Pi, a low-cost and tiny single-board Linux computer which has recently become very popular, through ZigBee base station, respectively. Afterward, Raspberry Pi periodically posts the data on Sina Weibo. Authorized users on Sina Weibo can remotely have access to the sensor data from home-in environment by laptop computer and other mobile devices such as smartphone and tablet PC.

Fig. 84.2
figure 2

Architecture of our approach

4.2 Hardware Specification

In our proposed system, with ease of use, low-cost, rich libraries and standardized components and programming language are cited as reasons for choosing Arduino [10] and Raspberry Pi [11] platforms. In our work, a Raspberry Pi, with an ARM1176JZF-S core CPU at 700 MHz, 256 MB RAM and Debian Wheezy7.5 Linux operating system, is deployed as a gateway or local manager, not only for hosting the Internet proxy but also for the bridging the gap between SNS Sina Weibo and physical devices.

Meanwhile, in our experiment system, USB cameras and wireless sensor nodes equipped with temperature, humidity, and light sensors are used. Also, the wireless sensor node (Fig. 84.3) is mainly composed of an Arduino microcontroller, a DHT11 which is a low-cost digital temperature-humidity sensor, a DFRobot BH1750 light sensor, and an XBee PRO communication module based on the IEEE ZigBee/IEEE 802.15.4 standards [12]. For easy interfacing with DHT11 sensor, light sensor, and XBee PRO module, Arduino Nano board was used.

Fig. 84.3
figure 3

Wireless sensor networks node

In addition, our system requires a ZigBee base station to be connected to a gateway, namely, Raspberry Pi, via RS-232 serial port. And for capturing images in a house, a plug-and-play camera module from a Logitech C270 webcam which offer a relatively good flexibility and quality, connecting a Raspberry Pi with USB port, is adopted.

4.3 ZigBee Wireless Sensor Network

ZigBee is an open specification that enables low power consumption, low cost, and low data rate for short-range wireless connections between various electronic devices. The XBee PRO module is a ZigBee/IEEE 802.15.4 compliant solution for WSNs.

The base station is connected to a gateway Raspberry Pi with a wired serial connection. The gateway runs an application software in Debian Linux, providing web access functionality. This essentially provides Internet access to wireless sensor reading collected via Xbee PRO base station. The gateway serves as an application gateway and interconnects the SNS and ZigBee network. The sensor reading periodically sent by wireless sensor nodes to a gateway through a base station is composed of a header, ID of wireless sensor node, values measured, and checksum.

4.4 Gateway Side Application

The wireless sensor nodes send their measurements periodically to a gateway Raspberry Pi located at the home. Then the information is transmitted to the Sina Weibo via Raspberry Pi. As a result, a gateway side application is necessary. Figure 84.4 shows the relationship among components in our solution.

Fig. 84.4
figure 4

Block diagram of our proposed system

As described above, the data from wireless sensor nodes and cameras is transferred to the Raspberry Pi side gateway application. And the data is saved and processed in order to make text and graph images in this application blending with Sina Weibo Python SDK. After that, the application periodically uploads the processed text and graph images to Sina Weibo. Sina Weibo Python SDK is a key prerequisite for the realization of gateway side application consists of four core features including (1) log in/out, (2) take and renew an access token, (3) post and delete text, and (4) upload images. To use the Python Weibo SDK of Sina Weibo to assist the development, developers have to register as a “developer” in Sina Weibo developer platform and obtain the corresponding app key and app secret to complete the guided registration [3]. Authentication is needed before Sina Weibo SDK works. SDK provides a Weibo class to achieve a new Weibo object and set app key, app secret, and URL. At the same time, web user login and authorization are processed by calling the pages provided by SNS Sina Weibo, but our system doesn’t involve it. We assume that workflow is as illustrated in Fig. 84.5.

Fig. 84.5
figure 5

Flowchart of the gateway side application

4.5 Results of the Case Study

To validate the concept of the proposed system, the developed system is tested by installing the environment condition sensing units and setting up ZigBee networks in a house. The wireless sensor nodes are located in the bedroom, living room, kitchen, and toilet respectively in the house. And several cameras are located close to the veranda, gate, and living room. Figures 84.6, 84.7, 84.8, and 84.9 illustrate the graphical representation of type “#1” wireless sensor node information in gateway side application, and this node is deployed in a living room. Measurements related to temperature, humidity, and light intensity are shown in Figs. 84.6, 84.7, and 84.8, respectively. Moreover, Fig. 84.9 displays a captured image from the camera labeled “#1” in living room.

Fig. 84.6
figure 6

Temperature in a living room

Fig. 84.7
figure 7

Humidity in a living room

Fig. 84.8
figure 8

Light intensity in a living room

Fig. 84.9
figure 9

A captured image in a living room

Figure 84.10 depicts periodically posted pictures and texts including sensor readings of temperature, humidity, and light intensity from a remote home which are revealed on Sina Weibo.

Fig. 84.10
figure 10

Posted text and image on Sina Weibo

4.6 Comparison Between the Traditional and Typical WSN Solution and Our Proposed Approach Based on SNS

As we mentioned earlier, in the traditional and typical WSN solution without SNS, for developers, there are lots of efforts to do in order to build up WSN through the web. Compared with our proposed approach based on SNS, the comparison of two different systems is described as shown in Table 84.1.

Table 84.1 Comparison of two different systems

From the Table 84.1, apparently our proposed approach can reduce the overall system design complexity.

Conclusion

In this chapter, by utilizing Sina Weibo open platform, we proposed an efficient method to monitor the sensor data and manage a WSN. In our study, a gateway application running in Raspberry Pi for integrating WSN to SNS was developed. In addition, we implemented home environment monitoring system as a case study.

In our proposed system, on the one hand, our method can help us save money and time. On the other hand, our proposed solution can provide an alternative common environment for the interaction between SNS and physical world. Our experimental result indicates the feasibility of integrating a WSN monitoring the house into the existing infrastructures of the SNS Sina Weibo by presuming upon its open, web-based SDKs.

As future work, on the basis of the present study, we will intend to incorporate more advanced technology and develop actuator networks aimed at residential smart meters, information household appliance control, etc., which can strengthen the interactive capability between people and connected devices.