Engineering IoT systems through agent abstractions: Smart healthcare as a case study