External integration - Tuya v1.11.0

:bell: Tuya (external integration) — v1.11.0: « first-class » doorbell + air conditioning ventilation/oscillation

Hello everyone :waving_hand:

A new version 1.11.0 of the Tuya external integration has just been released. It is based on the new features of Gladys 4.84.2 core (thanks to @pierre-gilles!).

:sparkles: New features

  • Doorbell (intercom) — real « Doorbell » category instead of a repurposed button: dedicated scene trigger « If the doorbell rings », « Ringing » badge on the dashboard then the time of the last press, readable history (« Doorbell activated »).
  • Air conditioner — fan speed + oscillations (horizontal/vertical), in the cloud and in LAN, with only the options really supported by your model.
    For reference (already in place): the motion detection of cameras/doorbells is a real motion sensor.

:warning: Prerequisites to enjoy the new features
These new functions (doorbell + air conditioning fan speed/oscillation) require Gladys ≥ 4.84.2.

:backhand_index_pointing_right: Recommended procedure:

  1. First, update Gladys to the latest version (≥ 4.84.2).
  2. Then update the Tuya integration image (or install it) to 1.11.0.
  3. Restart a Tuya discovery (« Search for devices » button).

:green_circle: Good to know — no breakage if you update the image before Gladys

The v1.11.0 automatically detects the version of your Gladys:

  • On Gladys ≥ 4.84.2 → doorbell + air conditioning fan speed/oscillation available.
  • On an older Gladys → the integration continues to work normally: the doorbell remains a button and the air conditioner keeps its current functions (the new features will appear automatically once Gladys is updated + a new discovery). Nothing is broken, discovery is never blocked.

:counterclockwise_arrows_button: Already created devices (doorbell / air conditioner)

For a doorbell or air conditioner already added to switch to the new categories/functions, you need to delete it and recreate it from the discovery screen (the features of an already created device are not rewritten during a rediscovery).

:test_tube: Feedback welcome

If you test, these points are of particular interest to me:

  • Doorbell: does the « Ringing » badge + the dedicated scene trigger work?
  • Motion detection: does the scene retrigger properly with each detection?
  • Air conditioner: reading and controlling the fan speed (and oscillations if your model supports them), in the cloud and locally. For the latter, it works for me.

Thanks in advance for your feedback :folded_hands:

Hello!

I updated and restarted the container and… It’s pretty cool:

Fully functional!

Edit: Removing the device wasn’t enough. I had to delete it, restart the container, and add it again. The « doorbell » feature appeared « later ».

I love it!!^^ And have you tested the scenes? I tested in MQTT simulation, but as it’s a new trigger, a real usage test would be better ^^

So yes indeed, I haven’t yet reported this issue to @pierre-gilles, but there’s no loader on external integrations while waiting for feedback from discovered devices!! So we think it’s fast, but as Tuya does a UDP scan, it can take 30s… sorry

So with all that, I don’t know where we stand anymore ^^ Do you now have all your Tuya devices??

Yep, scenes tested and functional (button, motion detection - The neighbors must be wondering what I’m doing walking around my doorbell at 11 p.m…).

There must be a minimum delay between two detections (about a minute it seems) but it matches exactly the behavior of the Tuya app!

Next up, I have the PTZ cameras (some features are already present) but it’s a major ongoing project I see!

My son has an RGB LED strip LSC-TUYA if you’re interested in adding it (but he’s not asking for it yet)…

Welcome back, I’ll talk to Claude about it!

I installed the external app, created the Tuya dev account, and retrieved all the configuration parameters. I also linked my Smartlife account. But the connection is not working.

[2026-08-04T14:14:38.514Z] [INFO] Starting the Tuya integration...
[2026-08-04T14:14:38.757Z] [INFO] [gladys-sdk] connected to Gladys (http://172.30.0.1:80)
[2026-08-04T14:14:38.757Z] [INFO] WebSocket connected to Gladys
[2026-08-04T14:14:38.773Z] [WARN] Tuya is not configured yet: fill in the integration settings in Gladys
[2026-08-04T14:14:38.804Z] [WARN] Tuya discovery skipped (status=not_initialized)
[2026-08-04T17:06:00.804Z] [WARN] WebSocket disconnected - the SDK will try to reconnect
[2026-08-04T17:06:00.804Z] [WARN] [gladys-sdk] connection to Gladys lost (close code 1006)
[2026-08-04T17:06:00.805Z] [WARN] [gladys-sdk] not connected to Gladys (ws://172.30.0.1:80), retrying in 1000 ms (attempt 1)
[2026-08-04T17:06:01.810Z] [ERROR] [gladys-sdk] websocket error on ws://172.30.0.1:80: connect ECONNREFUSED 172.30.0.1:80
[2026-08-04T17:06:01.811Z] [WARN] [gladys-sdk] not connected to Gladys (ws://172.30.0.1:80), retrying in 2000 ms (attempt 2)
[2026-08-04T17:06:03.814Z] [ERROR] [gladys-sdk] websocket error on ws://172.30.0.1:80: connect ECONNREFUSED 172.30.0.1:80
[2026-08-04T17:06:03.814Z] [WARN] [gladys-sdk] not connected to Gladys (ws://172.30.0.1:80), retrying in 4000 ms (attempt 3)
[2026-08-04T17:06:07.815Z] [ERROR] [gladys-sdk] websocket error on ws://172.30.0.1:80: connect ECONNREFUSED 172.30.0.1:80
[2026-08-04T17:06:07.816Z] [WARN] [gladys-sdk] not connected to Gladys (ws://172.30.0.1:80), retrying in 8000 ms (attempt 4)
[2026-08-04T17:06:09.531Z] [INFO] Received SIGTERM -> graceful shutdown
[2026-08-04T17:06:09.531Z] [INFO] [tuya] Disconnecting from Tuya... (manual=false)
[2026-08-04T17:06:10.812Z] [INFO] Starting the Tuya integration...
[2026-08-04T17:06:10.824Z] [ERROR] [gladys-sdk] websocket error on ws://172.30.0.1:80: connect ECONNREFUSED 172.30.0.1:80
[2026-08-04T17:06:10.824Z] [WARN] [gladys-sdk] not connected to Gladys (ws://172.30.0.1:80), retrying in 1000 ms (attempt 1)
[2026-08-04T17:06:11.827Z] [ERROR] [gladys-sdk] websocket error on ws://172.30.0.1:80: connect ECONNREFUSED 172.30.0.1:80
[2026-08-04T17:06:11.827Z] [WARN] [gladys-sdk] not connected to Gladys (ws://172.30.0.1:80), retrying in 2000 ms (attempt 2)
[2026-08-04T17:06:13.976Z] [INFO] [gladys-sdk] connected to Gladys (http://172.30.0.1:80)
[2026-08-04T17:06:13.977Z] [INFO] WebSocket connected to Gladys
[2026-08-04T17:06:14.011Z] [WARN] Tuya is not configured yet: fill in the integration settings in Gladys
[2026-08-04T17:06:14.015Z] [WARN] Tuya discovery skipped (status=not_initialized)
[2026-08-05T11:39:31.742Z] [INFO] onConfigUpdated -> new configuration received
[2026-08-05T11:39:31.743Z] [INFO] [tuya] Disconnecting from Tuya... (manual=false)
[2026-08-05T11:39:31.744Z] [INFO] [tuya] Connecting to Tuya...
[2026-08-05T11:39:32.008Z] [ERROR] [tuya] Error connecting to Tuya: IoT Core service subscription has expired. Error: IoT Core service subscription has expired.
    at validateAppAccount (file:///app/src/tuya/cloud/tuya.connect.js:92:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async TuyaHandler.connect (file:///app/src/tuya/cloud/tuya.connect.js:125:5)
    at async connectTuya (file:///app/index.js:142:3)
    at async file:///app/index.js:378:7
    at async GladysIntegration._runHandler (/app/node_modules/@gladysassistant/integration-sdk/lib/gladys-integration.js:1166:7)
    at async GladysIntegration._handleMessage (/app/node_modules/@gladysassistant/integration-sdk/lib/gladys-integration.js:1038:9) {
  code: 28841002
}
[2026-08-05T11:39:32.016Z] [WARN] Tuya discovery skipped (status=error)
[2026-08-05T11:40:11.655Z] [INFO] onScanRequest -> discovering Tuya devices
[2026-08-05T11:40:11.656Z] [WARN] Tuya discovery skipped (status=error)
[2026-08-05T11:41:14.494Z] [INFO] onConfigUpdated -> new configuration received
[2026-08-05T11:41:14.494Z] [INFO] [tuya] Disconnecting from Tuya... (manual=false)
[2026-08-05T11:41:14.494Z] [INFO] [tuya] Connecting to Tuya...
[2026-08-05T11:41:14.660Z] [ERROR] [tuya] Error connecting to Tuya: IoT Core service subscription has expired. Error: IoT Core service subscription has expired.
    at validateAppAccount (file:///app/src/tuya/cloud/tuya.connect.js:92:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async TuyaHandler.connect (file:///app/src/tuya/cloud/tuya.connect.js:125:5)
    at async connectTuya (file:///app/index.js:142:3)
    at async file:///app/index.js:378:7
    at async GladysIntegration._runHandler (/app/node_modules/@gladysassistant/integration-sdk/lib/gladys-integration.js:1166:7)
    at async GladysIntegration._handleMessage (/app/node_modules/@gladysassistant/integration-sdk/lib/gladys-integration.js:1038:9) {
  code: 28841002
}
[2026-08-05T11:41:14.661Z] [WARN] Tuya discovery skipped (status=error)
[2026-08-05T11:44:28.221Z] [INFO] Received SIGTERM -> graceful shutdown
[2026-08-05T11:44:28.221Z] [INFO] [tuya] Disconnecting from Tuya... (manual=false)
[2026-08-05T11:44:28.225Z] [WARN] WebSocket disconnected - the SDK will try to reconnect
[2026-08-05T11:44:29.630Z] [INFO] Starting the Tuya integration...
[2026-08-05T11:44:29.948Z] [INFO] [gladys-sdk] connected to Gladys (http://172.30.0.1:80)
[2026-08-05T11:44:29.949Z] [INFO] WebSocket connected to Gladys
[2026-08-05T11:44:30.014Z] [INFO] [tuya] Connecting to Tuya...
[2026-08-05T11:44:30.856Z] [ERROR] [tuya] Error connecting to Tuya: IoT Core service subscription has expired. Error: IoT Core service subscription has expired.
    at validateAppAccount (file:///app/src/tuya/cloud/tuya.connect.js:92:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async TuyaHandler.connect (file:///app/src/tuya/cloud/tuya.connect.js:125:5)
    at async connectTuya (file:///app/index.js:142:3)
    at async GladysIntegration.<anonymous> (file:///app/index.js:415:5) {
  code: 28841002
}
[2026-08-05T11:44:30.868Z] [WARN] Tuya discovery skipped (status=error)

I saw the supported devices, I have an LSC camera from Action and a cat feeder. Do you think I could get them in Gladys?

Hi @elfedagger,

Good news: your configuration is correct, and the integration works (it is properly connected to Gladys).

The issue comes from the Tuya cloud itself:
« IoT Core service subscription has expired » (code 28841002)

On the Tuya IoT Platform, the IoT Core service is offered as a free trial
limited in time (1 month initially). Once expired, Tuya rejects
all API calls from the cloud project — so no device accessible,
regardless of the integration used.

The good news: the renewal is FREE and immediate.

  1. Go to https://iot.tuya.com/ and log in.
  2. Open Cloud → Development → your project → « Service API » tab
    (or directly Cloud → Cloud Services → IoT Core).
  3. Locate « IoT Core »: its status should be expired.
  4. Click on « Extend Trial Period » (or « Free Trial » / « Subscribe »)
    and confirm — it’s free, extended for 6 months, effective immediately.
  5. Go back to Gladys: the connection will automatically restore
    (otherwise, click on « Restart » in the Supervision card).

Note: this extension must be renewed every 6 months, Tuya does not
offer a permanent free subscription. Set a reminder:
when the trial expires, your Tuya devices will suddenly disconnect.

For your devices:

• LSC Camera (Action): yes, it should work. Tuya cameras are
supported — private mode, motion detection (with a real
motion sensor usable in scenes), siren, motion tracking,
human filter, recording, image flip. Two LSC
models are already identified in the integration.
:warning: Warning: no live video stream — Tuya does not expose any stable local RTSP/
ONVIF. We retrieve commands and events, not the live image.

• Pet Feeder: not yet supported, it will appear
in the discovery but without exploitable functionality. It’s
addable! Once your connection is restored, run a discovery then
check the integration logs: you will see lines
« Tuya function with « xxx » code is not managed ». Copy them here (or
in a GitHub issue on Issues · Terdious/gladys-tuya · GitHub) with the exact model, and I’ll look into adding
support.

I extended it for 6 months and they told me my request will be reviewed. I’m waiting for Tuya’s response.

Normally it’s quick ^^ For info, it took me less than 1 hour

ok, I see my 3 devices. The camera has multiple connector features and one motion detector. F14 is the kibble dispenser.


Thanks for your help.

I have this info about the distributor in the logs, I didn’t find the code you’re asking for.

[2026-08-05T14:09:13.775Z] [WARN] [tuya] [Tuya][poll] local mode on but LAN info incomplete for device=bffc52d5f1c50572406mee (ip/protocol/local_key missing) — using cloud; set the IP to enable local
[2026-08-05T14:09:35.748Z] [INFO] [tuya] [Tuya][localSession] device=bfc15bb8b2ab6c69f5wgtr connected (192.168.1.139, 3.3)
[2026-08-05T14:11:26.072Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:12:26.316Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:12:35.965Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:14:20.747Z] [INFO] [tuya] [Tuya][poll] device=bf15bc151aba2c4bb4bjap local parked 300s after 3 failures (Local session connect timeout) -> cloud
[2026-08-05T14:14:43.774Z] [WARN] [tuya] [Tuya][poll] local mode on but LAN info incomplete for device=bffc52d5f1c50572406mee (ip/protocol/local_key missing) — using cloud; set the IP to enable local
[2026-08-05T14:14:45.756Z] [INFO] [tuya] [Tuya][localSession] device=bfc15bb8b2ab6c69f5wgtr connected (192.168.1.139, 3.3)
[2026-08-05T14:16:14.788Z] [INFO] onScanRequest -> discovering Tuya devices
[2026-08-05T14:16:14.898Z] [INFO] [tuya] 3 Tuya devices found
[2026-08-05T14:16:15.647Z] [INFO] [tuya] [Tuya][localScan] Starting mediated udp-broadcast scan for 10s
[2026-08-05T14:16:25.659Z] [INFO] [tuya] [Tuya][localScan] Found device bf15bc151aba2c4bb4bjap ip=192.168.1.199 version=3.4
[2026-08-05T14:16:25.659Z] [INFO] [tuya] [Tuya][localScan] Found device bfc15bb8b2ab6c69f5wgtr ip=192.168.1.139 version=3.3
[2026-08-05T14:16:25.660Z] [INFO] [tuya] [Tuya][localScan] Scan complete. Found 2 device(s).
[2026-08-05T14:19:25.786Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:19:43.778Z] [WARN] [tuya] [Tuya][poll] local mode on but LAN info incomplete for device=bffc52d5f1c50572406mee (ip/protocol/local_key missing) — using cloud; set the IP to enable local
[2026-08-05T14:19:55.793Z] [INFO] [tuya] [Tuya][localSession] device=bfc15bb8b2ab6c69f5wgtr connected (192.168.1.139, 3.3)
[2026-08-05T14:20:26.525Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:20:36.753Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:22:26.444Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:22:36.359Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:22:46.496Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)
[2026-08-05T14:24:32.313Z] [INFO] onDeviceDeleted <- ext:ext-terdious-gladys-tuya:device:bf15bc151aba2c4bb4bjap
[2026-08-05T14:24:32.314Z] [INFO] [tuya] [Tuya][cleanup] released per-device state for bf15bc151aba2c4bb4bjap
[2026-08-05T14:24:43.781Z] [WARN] [tuya] [Tuya][poll] local mode on but LAN info incomplete for device=bffc52d5f1c50572406mee (ip/protocol/local_key missing) — using cloud; set the IP to enable local
[2026-08-05T14:25:05.778Z] [INFO] [tuya] [Tuya][localSession] device=bfc15bb8b2ab6c69f5wgtr connected (192.168.1.139, 3.3)
[2026-08-05T14:26:00.331Z] [INFO] onDeviceCreated <- ext:ext-terdious-gladys-tuya:device:bf15bc151aba2c4bb4bjap
[2026-08-05T14:26:00.352Z] [INFO] [tuya] [Tuya][localSession] device=bf15bc151aba2c4bb4bjap connected (192.168.1.199, 3.4)

@elfedagger,

Thanks for your feedback, it was very helpful :folded_hands:

:warning: First, an important point: I edited your previous message to
replace your screenshot. It revealed three pieces of information
that are better not to share publicly:

• LOCAL_KEY — this is the key that allows you to control your device directly
on your local network. It’s a secret, just like a password.
• DEVICE_ID — your device’s identifier at Tuya.
• CLOUD_IP — and this is the most sensitive: it’s the public IP
address of your Internet connection, so of your box. Published in plain text,
it allows someone to locate and target your home.

Nothing serious here, but the reflex to take: before posting a screenshot
of the « Technical Settings » or logs, mask these fields. If you
want to be completely at ease, you can delete and then re-pair the
dispenser in the Smart Life app: this generates a new local key.


:tada: Good news next: thanks to your report, version 1.12.0
just came out and adds support for Tuya kibble dispensers. It will be offered in your Gladys within about an hour
once the store references it.

Your F14-W should then expose:
• Distribute — a button that gives a portion (usable in a scene,
for example every day at 8:00 a.m.)
• Last distributed quantity
• Slow distribution
• Indicator light
• Battery

Steps to follow once 1.12.0 is installed: go to the Discovery tab and click on « Refresh ». Your dispenser, already created, will display an « Update » button: one click is enough for it to retrieve its new features. Nothing to delete.


:wrench: A small favor to ask, if you don’t mind

For now, the dispenser only works via the cloud. The local (LAN) mode is not yet active for this type of device: the internal command numbers vary from one model to another, and I have no real data to rely on.

I just added an automatic log in this version. Once in
1.12.0, with the local mode activated and your dispenser created, you will find
in the Logs a line like this:

[Tuya][poll][local] device=bf15… DPS snapshot: 1=… (UNMAPPED) | 3=… (manual_feed) | …

If you copy it here (the one that contains « DPS snapshot »), I’ll activate the
local mode for your model right away :slightly_smiling_face:


Two other improvements from our exchanges:

• Unrecognized devices are now reported at each discovery,
with the list of their unsupported commands — no need to
restart the container to find them, as was the case
for you. It was my side that was stuck.
• The message displayed when the IoT Core trial expires now explains
how to extend it for free, instead of sending the raw
message from Tuya. Remember to renew it in 6 months!

The integration documentation has also been updated: it finally lists
cameras, doorbells, and dispensers, and warns about the IoT Core trial.

Thanks again for your feedback :ok_hand:

So I don’t have any Tuya products because in my mind Tuya → Cloud → to be banned from my home automation.
But with all the work that @Terdious is doing and all the tests and additions from other users, to have cloud and then local (true for all products :wink: )? I think I’ll test a few things when I get the chance to buy some.

So a big bravo to @Terdious :ok_hand: :raising_hands:

If this interests anyone, this distributor is supported in the cloud and soon locally.


https://www.amazon.fr/gp/product/B0DJVKDBXT/ref=ox_sc_act_image_1?th=1

The distributor does not display everything it should, only the distribution button.


For what you asked me, I found this.

[2026-08-05T18:08:07.095Z] [INFO] [tuya] [Tuya][poll][local] device=bf15bc151aba2c4bb4bjap DPS snapshot: 4="standby" (UNMAPPED) | 106=2957 (UNMAPPED) | 108="" (UNMAPPED) | 114=0 (UNMAPPED)

Isn’t there a way to simulate the demand every 6 months automatically? xD
Making a scene that reminds me every 6 months sounds like a lot of work XD

Thanks for the integration

Hi @Terdious!

Do you think it would be possible to add the energy tracking calculation feature?

@pierre-gilles, is the energy tracking calculation in the spec?

Hi @Terdious

Would it be possible to add support for robot vacuums?
Indeed, mine is from the brand Ultenic and does not offer an API to control the vacuum directly. (Verified with claude)
I managed to integrate it directly into Tuya cloud and, having started developing an integration with claude, I see that the integration offers to go through Tuya, so to avoid duplication, I think it would be a good idea to integrate robot vacuums here :slight_smile:

Here are the features that were reported in the first version of the integration that I had started to develop:

Thanks

Yes, it’s up to external integration to handle that.