You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KlapProtocol immediate relogin if protocol invalid
In case of HTTP403 response to a request, the binding now executes repeat login and then retries the request, avoiding unnecessary device-offline report.
This situation typically occurs if a Tapo Hub or Tapo-App is also polling the Tapo device.
(Copilot issues addressed 1.0)
Closes#20316
Signed-off-by: David Henshaw <david@henshaws.me>
Copy file name to clipboardExpand all lines: bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/api/protocol/klap/KlapProtocol.java
+6-11Lines changed: 6 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ private void sendRequestRetryable(TapoBaseRequestInterface tapoRequest) throws T
143
143
* (Protocol can be rejected due to polling from another device e.g. Tapo App, or Tapo H100 Hub)
144
144
* For asynchronous use, call on separate thread
145
145
*/
146
-
finalintMAX_ATTEMPTS = 3;
146
+
finalintmaxAttempts = 3;
147
147
intattemptCount = 0;
148
148
Stringurl = getUrl();
149
149
Stringcommand = tapoRequest.method();
@@ -163,14 +163,14 @@ private void sendRequestRetryable(TapoBaseRequestInterface tapoRequest) throws T
0 commit comments