def __init__(self,
                 stack,
                 ha=None,
                 **kwa):
        """
        Initialization method for instance

        Inherited Parameters:
            stack is Stack managing this device required
            name is user friendly name of device
            uid  is unique device id
            ha is device  udp host address, a duple (host,port)
            kind is type of device

        Parameters:


        Inherited Attributes:
            .stack is Stack managing this device required
            .name is user friendly name of device
            .uid  is unique device id per channel or site
            .ha is device udp host address, a duple (host,port)
            .kind is type of device

        Attributes:

        """
        if ha:
            host, port = ha
            host = socket.gethostbyname(host)
            if host in ['0.0.0.0', '']:
                host = '127.0.0.1'
            ha = (host, port)
        else:
            ha = ('127.0.0.1', stack.Port)

        super().__init__(stack=stack, ha=ha, **kwa)
dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/proto/devicing.py/UdpDevice.__init__/original