Iterate response lines instead of chunks (current logic can break if multiple messages received at once)
I was getting frequent Tractive is not available. Internet connection is down? Sleeping 10 seconds and retrying errors in my home assistant.
Turns out, Tractive api occasionally "restarts" the stream by sending a new "handshake" message. In such scenarios, the duration between keep-alive messages is ~10s which is higher than current 7s.
Logs:
KEEP_ALIVE_TIMEOUT
to60s
I was getting frequent
Tractive is not available. Internet connection is down? Sleeping 10 seconds and retrying
errors in my home assistant.Turns out, Tractive api occasionally "restarts" the stream by sending a new "handshake" message. In such scenarios, the duration between keep-alive messages is ~10s which is higher than current 7s. Logs: