Tuya integration keeps logging me off

Hey there!

I’ve been using Home Assistant with HA OS in a Raspberry PI for about two years now and this is happening since a couple of days.

The issue is that, all of the sudden, Tuya integration devices stop responding to my changes from Home Assistant, i.e.: I turn on/off a light, an automation doing some stuff, whatever…

The error displayed once everything is screwed usually looks like this:

Unexpected error for device at pos 1: network error:(-9999999) sign invalid

Another tuya erros I can see in the logs are:

Unexpected disconnection.7

And the one that I get once I’m logged out and I need to do the QR scan again with my SmartLife app is:

net work error = network error:(-9999999) API_QPS_LIMIT_OR_DEGRADE

In the past, this error, the one requesting me to re-authenticate using the SmartLife app in the phone usually happened once every 6 months or so. Now everyday that passes, it gets more frequent, I have had to scan the QR code to re-autheticate me like 4 times in the last 24 hours.

My assumption, based on those errors, is that HomeAssistant is reaching some kind of API rate limit, the process of refreshing the token gets denied due to this API rate, therefore HomeAssistant token gets invalid and I ended up in this situation.

Why it is happening, I have no idea, because once I reauthenticate, everything works like charm, at least for a few hours.

I’ve disabled both checks on the hub configuration for my account in the Tuya integration, I have it in Spanish but I assume they are some kind of polling settings that hit the Tuya API for changes in the states of devices. That haven’t solve the issue. I have 46 devices with 127 entities, that doesn’t sound like a lot to me though.

I’ve disabled also IPv6. I’ve disabled AdGuard, in case there was some kind of blocking happening.

I’ve run out of ideas and I don’t know what I can do to fix this.

Any suggestions? Please, avoid recommending LocalTuya, tested in the past but there is a bunch of my devices that aren’t compatible.

Edit: My HA version is 2026.7.4, the rest of add-ons and integrations are up to date.

Thanks in advance!

I have exactly the same problem as what you describe. 31 devices on HA Yellow. It quite certainly started with the latest upgrade to 2026.8.0. In my case, I’ve to scan the code with Tuya about once a day.

What is also an odd design it that the HA app shows only the QR code but not the code or ID (string) that it represents. So with only one phone, there is now way (at least afaik), to scan the HA-generated code with the Tuya app. This makes the problem just more annoying.
Many other apps also offer a ‘copy text version’ that could be manually pasted in the Tuya app, without the need for a secondary device.

I’ll update if/when I know more.

Just adding my name to the list but at a much lower frequency than you.

For illustrate, at the moment of writing the post it happened. Now, 2h after, I was asked again to log in. Checked the logs, and same error:

Registrador: tuya_sharing
Fuente: /usr/local/lib/python3.14/site-packages/tuya_sharing/customerapi.py:157
Ocurrió por primera vez: 09:24:38 (8 ocurrencias)
Última vez registrado: 14:22:19

net work error = network error:(-9999999) API_QPS_LIMIT_OR_DEGRADE

Curious, but this time just reloading the hub worked, it didn’t asked me to re-authenticate. Still, quite inconvenient.

This is the detailed log of the error I got yesterday, in case it helps someone. I’m too new to HA; it would take me quite some time to go further than this. I suspect that it has something to do with the latest change of certificate (in the GUI now, and I commented out the references to the certificates in the config.yaml file.)

2026-08-05 23:57:29.529 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [546954534064] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 283, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2961, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 3004, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 906, in entity_service_call
    response_data = await _async_handle_entity_calls(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 785, in _async_handle_entity_calls
    single_result = await entity.async_request_call(_with_context(entity, coro))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1710, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 780, in _with_context
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 864, in _handle_single_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 529, in async_handle_light_off_service
    await light.async_turn_off(**filter_turn_off_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/switch_as_x/entity.py", line 158, in async_turn_off
    await self.hass.services.async_call(
    ...<5 lines>...
    )
  File "/usr/src/homeassistant/homeassistant/core.py", line 2961, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 3004, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 906, in entity_service_call
    response_data = await _async_handle_entity_calls(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 785, in _async_handle_entity_calls
    single_result = await entity.async_request_call(_with_context(entity, coro))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1710, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 780, in _with_context
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 864, in _handle_single_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tuya/switch.py", line 997, in async_turn_off
    await self._async_send_wrapper_updates(self._dpcode_wrapper, False)
  File "/usr/src/homeassistant/homeassistant/components/tuya/entity.py", line 107, in _async_send_wrapper_updates
    await self._async_send_commands(
        wrapper.get_update_commands(self.device, value),
    )
  File "/usr/src/homeassistant/homeassistant/components/tuya/entity.py", line 91, in _async_send_commands
    await self.hass.async_add_executor_job(
        self.device_manager.send_commands, self.device.id, commands
    )
  File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 86, in run
    result = ctx.run(self.task)
  File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 73, in run
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.14/site-packages/tuya_sharing/manager.py", line 99, in send_commands
    return self.device_repository.send_commands(device_id, commands)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/site-packages/tuya_sharing/device.py", line 213, in send_commands
    self.api.post(
    ~~~~~~~~~~~~~^
        f"/v1.1/m/thing/{device_id}/commands", None, {"commands": commands}
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.14/site-packages/tuya_sharing/customerapi.py", line 194, in post
    return self.__request("POST", path, params, body)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/site-packages/tuya_sharing/customerapi.py", line 119, in __request
    raise ApiRequestException(error_code=ret["code"], error_message=ret["msg"])
tuya_sharing.exceptions.ApiRequestException: network error:(-9999999) sign invalid

Exactly the same issue here on 2026.7.4 of Home Assistant. Mine has been playing up for a few days. Not sure if its a HA issue or if the integration is broken. Its becoming a massive pain in the butt with automations not working and having to re-authenticate every few hours.

I had 2 “incidents” yesterday, where i had to re-authenticate , when such things happens i used to Clear Browser Caches “ALLn EVERYthing” , meaning logout login , before re-authenticate … been stable since , thou i don’t think i have many “chatty” Devices, as i have an habit of disable all entities i don’t find any use for in HA( I have more Disabled entities Than Enabled ), beside a strict Recorder/Activity setup

NOTE: im on CORE 2026.7.2

Following up on this, since the last authenticate yesterday mid-day, I restarted my HA and it has been working fine since yesterday. Fingers crossed it could have been an issue in Tuya Cloud and maybe HA was not handling it properly?

I experience the same error, HA Green, V2026.7.4, A reload helps for few hours/minutes, than the same problem again

Just to report back, in my case I didn’t got the issue any more and everything has been working smoothly.

One thing I had removed is that in one of my automations I had a step that reloaded the whole Tuya integration. Not sure if it was a coincidence or not, but since I remove that and also a fresh reboot of HA, all is working fine.

My experience: after I had this issue with the invalid sign, I migrated all my devices within one day to “Tuya Local” Version 2026.7.2. I am totally happy, the migration itself was very easy. I can recommend this procedure