Skip to content

Instantly share code, notes, and snippets.

@jterrace
Last active September 30, 2025 14:39
Show Gist options
  • Save jterrace/2b036df50d89a2ba5611f4e94d0063f0 to your computer and use it in GitHub Desktop.
Save jterrace/2b036df50d89a2ba5611f4e94d0063f0 to your computer and use it in GitHub Desktop.
Home Assistant ONVIF Troubleshooting

Capturing HTTP traffic for Home Assistant ONVIF

On the Home Assistant host (if you have SSH access):

# Replace 192.168.1.100 with your camera's IP
sudo tcpdump -i any -s 0 -w onvif_capture.pcap host 192.168.1.100

Use Wireshark on any computer on the same network

  • Start capture with filter: host 192.168.1.100 (your camera IP)
  • Restart/reload the ONVIF integration in HA
  • Stop capture after the error occurs
  • Save as .pcapng file

Testing with curl

curl 'http://<user>:<password>@<camera-ip>:<camera-port>/onvif/media_service' --header "Content-Type: application/soap+xml; charset=utf-8" --data '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl"><soap:Body><trt:GetProfiles/></soap:Body></soap:Envelope>' 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment