Skip to content

Unstable inputs fix

Choose a tag to compare

@fredsch fredsch released this 24 Aug 14:00
· 17 commits to main since this release
ab90d66
  • Unstable inputs: clicks were lost intermittently (issue #2). The UDP listener
    socket (port 4646) was opened with SO_REUSEPORT; on Linux the kernel then
    spreads incoming datagrams across every socket bound to that port. After a reload,
    an update or a restart, an old socket sometimes stayed bound and "stole" a share
    of the WAGO INT packets, which were silently lost. The socket is now
    exclusive: every input packet reaches the single listening instance.
  • Clean close of the UDP socket on unload (waiting for its actual release) and a
    bind retry at startup, so a reload never leaves two sockets competing for the port.

Added

  • A bus event wago2haddon_event is fired on every decoded action (single /
    double / triple click, long press), in addition to the event entity. An event
    trigger on this event is fully reliable (never de-duplicated) and is a robust
    alternative for automations.
  • Defensive handling of multiple messages per datagram (no message dropped if the
    PLC were to batch them).
  • Clean cancellation of the input decoder timers when an entity is removed (avoids
    an event firing after a reload).