A Framework for Personal Data Protection in the IoT