Proxy method to unregister the device with the parent.

def unregister(self):
        """Proxy method to unregister the device with the parent.
        """
        if self.registered:
            #Only if we have not received any message recently.
            if datetime.datetime.now()-datetime.timedelta(seconds=self.unregister_timeout) > self.lastmsg:
                self.registered = False
                if self.parent:
                    self.parent.unregister(self)