My C-7 running 2.5.1.183 has started failing to send UDP notifications with this warning:
Error occured with UDP message: SocketException: maximum number of DatagramSockets reached
I use a small custom Notification driver that sends a UDP message to my PC, where a Python script turns it into a Windows notification. This previously worked through many days of hub uptime.
The first failure I found was at 1:03 AM on October 13, and subsequent attempts continued failing for hours, including attempts separated by more than an hour. Representative logs, in chronological order:
2026-10-13 1:03:02.397 am debug sendNotification(Motion detected in hall!)
2026-10-13 1:03:02.437 am warn Error occured with UDP message: SocketException: maximum number of DatagramSockets reached
2026-10-13 4:15:09.688 am debug sendNotification(Motion detected in hall!)
2026-10-13 4:15:09.696 am warn Error occured with UDP message: SocketException: maximum number of DatagramSockets reached
2026-10-13 5:42:00.548 am debug sendNotification(Motion detected in hall!)
2026-10-13 5:42:00.572 am warn Error occured with UDP message: SocketException: maximum number of DatagramSockets reached
Here is the complete driver. It already sets ignoreResponse: true and has no polling, retries, or scheduled tasks:
import hubitat.device.HubAction
import hubitat.device.Protocol
metadata {
definition(
name: "UDP Notification",
) {
capability "Notification"
}
preferences {
input name: "host", type: "text", title: "Host",
description: "Enter the host address", required: true
input name: "port", type: "number", title: "Port",
description: "Enter the port number",
required: true, defaultValue: 9999
}
}
def installed() {
log.debug "installed()"
}
def updated() {
log.debug "updated()"
}
def deviceNotification(message) {
log.debug "sendNotification(${message})"
def ha = new HubAction(message, Protocol.LAN, [
type: HubAction.Type.LAN_TYPE_UDPCLIENT,
destinationAddress: "${host}:${port}",
ignoreResponse: true
])
sendHubCommand(ha)
}
I’m not aware of any integrations polling frequently.
Could this indicate sockets not being released by the platform or another integration? Is there a way to identify what is consuming the UDP sockets, or capture useful diagnostics before rebooting?