With the expansion of smart agriculture, wireless sensor networks are being increasingly applied. These networks collect environmental information, such as temperature, humidity, and CO2 rates. However, if a faulty sensor node operates continuously in the network, unnecessary data transmission adversely impacts the network. Accordingly, a data-based fault-detection algorithm was implemented in this study to analyze data of sensor nodes and determine faults, to prevent the corresponding nodes from transmitting data; thus, minimizing damage to the network. A cloud-based “farm as a service” optimized for smart farms was implemented as an example, and resource management of sensors and actuators was provided using the oneM2M common platform. The effectiveness of the proposed fault-detection model was verified on an integrated management platform based on the Internet of Things by collecting and analyzing data. The results confirm that when a faulty sensor node is not separated from the network, unnecessary data transmission of other sensor nodes occurs due to continuous abnormal data transmission; thus, increasing energy consumption and reducing the network lifetime.