As a very import part of the Internet of Things (IoT), smart buildings usually consist of wireless sensor network (WSN) and many
radio-frequency identification devices for data collection instantly. This paper presents a real time data collection and visualization
scheme for smart buildings. We propose a framework that uses both open source hardware and software to collect the event driven
data from a WSN and subsequently convert them to the query-based data which is needed by cloud server. Experiment results
demonstrated that the proposed framework is feasible for efficiently visualizing data locally and preparing query-based data for
cloud storage server.