HA WebSocket API - Ping/Pong

The HA WebSocket API documentation talks about periodically sending a ping and receiving a pong in response to keep the connection alive between an external system and HA. However, there isn’t any guidance included in the documentation on how often a ping needs to be sent.

So, how often should a ping be sent to keep the connection alive between an external system and HA when using the WebSocket API?

Thanks in advance for the help

Looking at the debug log of one of my add-ons, it seems to be every 20 seconds. I believe network idle timeouts are usually around 60 seconds.

Thanks @jackjourneyman !

I’ve been running mine at 5 minutes and haven’t seen a disconnect (yet :grinning:). I’m just not sure what HA is really looking for.
Thanks again.

I don’t think it’s looking for anything - just trying to prevent a timeout by the external system.

Thanks @jackjourneyman . Sorry I wasn’t being clear. What I meant to say was that I’m not sure how often HA expects to receive a PING to keep the connection alive.
Thanks again