UDP Packet Interface
The udp Packet Interface platform sends and receives packets over the network using
the UDP component. Each packet is sent as one UDP datagram to every address configured in the
udp component, and every datagram received on the listen port is passed on as one packet.
The interface enables both sending and receiving on the udp component it uses.
When the udp component sends to one IPv4 address that is not a broadcast or multicast address, the interface
accepts packets only from that address. It then joins exactly two devices, so no
addressing layer is needed, and one cannot be configured. An address
ending in .255 is taken as a broadcast address; set point_to_point when that guess is wrong for your subnet. A
point-to-point link logs a warning, at most once a minute, when it drops a packet from another sender; set
point_to_point: false to accept packets from every sender, as earlier versions did.
When the udp component sends to a broadcast or multicast address, or to several addresses, every packet received
is accepted, and an addressing layer can tell the devices apart. The
reliability and session
layers, and the rolling code, work between two devices only, so on that kind of link they need an addressing layer
with a destination.
Example Configuration
Section titled “Example Configuration”# Example configuration entryudp: addresses: 192.168.1.255
packet_interface: - platform: udp id: network_linkConfiguration Variables
Section titled “Configuration Variables”- udp_id (Optional, ID): The ID of the UDP component to
use. Required only if more than one
udpcomponent is configured. - max_packet_size (Optional, int): The largest packet, in bytes, that a user of this interface may send. A
larger packet received is dropped. Range is 16 to 508, the largest packet the
udpcomponent can receive. Defaults to508. - point_to_point (Optional, boolean): Whether the one IPv4 address of the
udpcomponent is a single device. Set it tofalsefor a broadcast address on a subnet smaller than /24, such as192.168.1.127on a /25, and totruefor a device whose address ends in.255, which is possible on a subnet larger than /24. By default, an address ending in.255is taken as a broadcast address.trueis rejected unless theudpcomponent sends to one unicast IPv4 address. - id (Optional, ID): Manually specify the ID used for code generation.