I've been using this plugin with homebridge, and it seems to work most of the time. Once in a while, when the thermostat is updated, I get errors like this in the logs:
Sun, 30 Jan 2022 21:36:50 GMT tcc-lib ERROR: _UpdateThermostat InvalidSessionID <?xml version="1.0" encoding="utf-8"?>REDACTEDREDACTED111601741721721212</soap:Body></soap:Envelope>
ChangeThermostat Error: Error: ERROR: _UpdateThermostat %s
at /opt/homebrew/lib/node_modules/homebridge-tcc/lib/tcc.js:134:20
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
It looks like when this happens, the session ID is then cleared, and if the session ID is empty, a new login will be performed on the next api call. So, since the code should already self-heal, I'm attempting to add retries.
Tks to @atlcoder for this work and PR #110
I've been using this plugin with homebridge, and it seems to work most of the time. Once in a while, when the thermostat is updated, I get errors like this in the logs:
Sun, 30 Jan 2022 21:36:50 GMT tcc-lib ERROR: _UpdateThermostat InvalidSessionID <?xml version="1.0" encoding="utf-8"?>REDACTED REDACTED 1 1 1 60 1 74 1 72 1 72 1 2 1 2 </soap:Body></soap:Envelope>
ChangeThermostat Error: Error: ERROR: _UpdateThermostat %s
at /opt/homebrew/lib/node_modules/homebridge-tcc/lib/tcc.js:134:20
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
It looks like when this happens, the session ID is then cleared, and if the session ID is empty, a new login will be performed on the next api call. So, since the code should already self-heal, I'm attempting to add retries.
Potential resolution for https://github.com/NorthernMan54/homebridge-tcc/issues/109