Add heartbeat serialization