Pātuhitia tēnei: Adaptive middleware for the internet of things :