Decode a message from command string.

def decode(self, data, delimiter=';'):
        """Decode a message from command string."""
        try:
            list_data = data.rstrip().split(delimiter)
            self.payload = list_data.pop()
            (self.node_id,
             self.child_id,
             self.type,
             self.ack,
             self.sub_type) = [int(f) for f in list_data]
        except ValueError:
            _LOGGER.warning('Error decoding message from gateway, '
                            'bad data received: %s', data.rstrip())
            raise