A nonintrusive load monitoring (NILM) system analyzes the changes of voltage and current on an electrical circuit and can disaggregate the usage and power consumption of appliances on the same circuit loop according to different power consumption signatures of the appliances. An NILM system is regarded as one of the most important features for energy monitoring and management in a smart home and building. Advances in computing, communication and storage technologies further make an NILM system possible to accommodate a huge amount of power consumption signatures of appliances, and to detect appliances and/or appliance states through database search techniques. In this study, we propose a low-cost NILM system for a smart home and building to facilitate end users contributing the power consumption signatures of their appliances to a datacenter through confirmations or feedbacks of the NILM search. Based on those user contributed datasets, a new NILM search algorithm is then presented in this paper. To evaluate and compare the performance and accuracy of NILM search results by employing the proposed and existing approaches, an evaluation test-bed is established. The experimental results demonstrate that the proposed scheme outperforms the existing algorithms and can achieve 85% to 96% accuracy of appliance state detections.