EFFICIENT SWARM OPTIMIZED DATA AGGREGATION OF IOT DEVICES AND ITS APPLICATION IN AGRICULTURE