[APP][Pro] Tuya Local

Andi

Thank you for your reply. Unfortunately, this is what I have been bouncing around for the last seven days with.

Option 1. @tuyapituyapi is requesting “The API key from tuya.com:”. As my project is not linked to the Smart+ app, the credentials don’t work.

Option 2. I can’t get the data centres to match. I’m in the UK and it is selecting EU-West and this is incompatible with the Smart+ app.

As an aside, any thought son the problems I am having with my bulbs

Stephen

Hi Stephen,

Thanks for the detailed follow-up — let me address each point directly.


Getting the Local Key when your app hides it

The LEDVANCE SMART+ app is a Tuya-based OEM app. Its API credentials (API key/secret) belong to LEDVANCE, not to the shared Tuya developer platform, which is why both the tuya-cli wizard and iot.tuya.com struggle to link it.

The most reliable workaround is:

  1. Install the Tuya Smart or Smart Life app alongside LEDVANCE.
  2. In that app, use “Add Home Member” or share the device — or simply re-pair one of the problem devices directly through Tuya Smart / Smart Life instead of the LEDVANCE app. They all run on the same Tuya cloud; the devices don’t care which OEM app paired them.
  3. Once the device is in Tuya Smart / Smart Life, go to iot.tuya.com → Cloud Project → Link Tuya App Account and scan the QR code from Tuya Smart/Smart Life (not LEDVANCE). The region for UK is Central Europe (Frankfurt), not EU-West.
  4. Your devices will now appear under All Devices with a visible Local Key (shown as “Device Secret”).

This sidesteps the LEDVANCE credential problem entirely.


White bulbs failing while colour ones work

The most common cause is a stale Local Key. When a bulb is reset or re-paired, the key changes. If you ever factory-reset the white bulbs to troubleshoot them, the key you copied earlier is no longer valid — re-run the wizard or re-check iot.tuya.com after re-pairing.

A second possibility: leave Protocol Version on Auto-detect rather than picking 3.3 or 3.4 manually. The app tries all versions in sequence and saves whichever works. White LEDVANCE bulbs sometimes negotiate differently from the colour variants.


Pet feeder with no Local Key visible

Same root cause — the Petlibro app is likely another Tuya OEM app that hides the key in the UI. The Tuya Smart / Smart Life transfer method above will work here too, as long as the feeder itself is a Tuya-protocol device (check whether it’s listed on devices.developer.tuya.com).


Hope that unblocks you. Let me know what you find once you try linking through Tuya Smart.

Andi


The key points: swap from LEDVANCE to Tuya Smart for the iot.tuya.com linking step (Frankfurt region for UK), try auto-detect protocol on the white bulbs, and check if the white bulb keys have gone stale from a reset.

Thanks for the fast response.

Sorry if I was not clear. I am using the Tuya Smart+ app to link but I cannot do so because I am connected to EU-West and cannot change this. From what I can see, this is the default data centre for the UK. I’ve tried changing location on IOT.Tuya to Germany but this has still not opened EU-Central.

Approaching things from a different direction, I’m in the middle of setting up a new user in Tuya Smart+ that is based in Ireland, which I am told will connect to the Central data centre. I’ll let you know how I get on.

Stephen

Andi

That was quick. I still have a datacentre mismatch.

That’s what Copilot wants you to do :slight_smile:

:united_kingdom: How to change the Data Center in Tuya Smart / Smart Life / LEDVANCE

1. Important: You cannot directly change the Data Center in the app

Tuya does not allow users to manually select a Data Center in the mobile app.
The Data Center is automatically assigned based on the Region you selected when creating your app account.

2. How to effectively “change” the Data Center

To switch to another Data Center, you must create a new app account with a different region.

Steps

  1. Open Tuya Smart, Smart Life, or LEDVANCE SMART+.

  2. Go to:
    Me → Settings → Account & Security → Region
    (This screen shows your current region, but you cannot change it.)

  3. Log out of your account.

  4. Create a new account and select the desired region during registration.

  5. Re‑add your devices to the new account.

Why this works

Tuya assigns the Data Center based on the region of the app account.
Example:

  • Region = Switzerland → Central Europe Data Center

  • Region = USA → Western America Data Center

3. LEDVANCE SMART+ (Tuya OEM App)

LEDVANCE uses the same Tuya backend, so the rules are identical:

  • The Data Center is tied to the region of your app account.

  • You must create a new account with a different region if you want a different Data Center.

4. Developer Platform (for API / Homey / Home Assistant users)

If you use the Tuya IoT Developer Platform, the Data Center of your cloud project must match the region of your app account:

  • Go to Cloud → Create Cloud Project

  • Select the Data Center that corresponds to your app account’s region

If they don’t match, your devices will not appear in the cloud project.

5. Summary

  • You cannot change the Data Center inside Tuya Smart / Smart Life / LEDVANCE.

  • The Data Center is determined by the region of your app account.

  • To switch Data Centers, you must create a new account and choose a different region.

  • LEDVANCE behaves exactly the same because it is a Tuya OEM app.

  • For API integrations, the Developer Platform project must use the matching Data Center.

I found this on iot.tuya

  • of Nov 25, 2025, new OEM apps for EU countries like Germany (49) are assigned to Western Europe Data Center (Eemshaven, Netherlands), not Central Europe.
  • The EU-Central option is not exposed in the UI, even though Frankfurt exists as an underlying region — it’s reserved for legacy or specific enterprise accounts.

If I read this correctly, I cannot create an account/project using EU-Central under any circumstances.

I’ve tried creating an account in US-EAST based on a Co-Pilot recommendation but when I try and link the app it is taking me back into the EU, despite the fact that I have VPN’d to New York

Ignoring everything that Co-Pilot advised!!!

I created a new Tuya account based in North America, just for safety I also set my VPN to a server in New York.

Created a new project, using EU-Central. Note: All data centres were available for selection not just the EU-West.

Note: You can only use one data centre in a free account, so once it is selected, all of your projects will use the same one. If you get it wrong then you will heve to delete all of your projects and start again.

Linking to the Tuya Smart+ app worked. I added a device to this, and it shows up in my project, and I was able to find the local key using npx @tuyapi/cli wizard that had previously been unavailable.

Bad news I can’t create the device. I’ve had to manually set Protocol to 3.4 but I am now getting an “Invalid Capability - Feed Portions”

Stephen

Hi Stephen

Please provide more information about the device:

Open the API Explorer:

Log in → left sidebar → Cloud → your project → API Explorer

:warning: Select the correct Data Centre at the top-right of the API Explorer page.
It must match the region you used when creating your cloud project (e.g. Central Europe, Western America).
Wrong region = empty results.

Step 1 — Current DP values

API Explorer → Device ControlQuery Properties

Enter your Device ID and click Submit Request.
Paste the full JSON response into the “Step 1 — Current DP values” field below.

Step 2 — DP types & allowed values

API Explorer → Device ControlGet the specifications and properties of the device

Enter your Device ID and click Submit Request.
Paste the full JSON response into the “Step 2 — DP specifications” field below.
This is the most important field — it shows exact data types, enum ranges, and integer min/max/step.

Andi

Data centre is no longer a problem; see the workaround I had to follow in order to use EU-Central that I included in my last post.

I’m not seeing the options you have asked for, so I have snipped everything that was available. Some of the lists are more than a screen long, so I have taken additional screenshots with a one-line overlay.

Hi Stephen,

The screenshots are very helpful. A few findings:

The device is partially compatible with the Pet Feeder driver — here is what works and what needs adjusting:

The main issue causing “Invalid Capability - Feed Portions”: the screenshots show the Standard Instruction Set (named codes like manual_feed), but the app needs the raw DP numbers (integers like 3, 4, 15…). Without the correct DP numbers configured, the initial device snapshot during pairing returns values on the wrong DPs and the capability mapping fails.

To find the raw DP numbers: In the Tuya IoT Device Debugging panel, click “Update Device Status” (top of the DP panel) — this refreshes the raw DP snapshot. The left column shows the names with their actual DP numbers next to them, or switch to “Control Device with DP” mode where the DPs are listed with their numeric IDs.

Once you have the DP numbers, configure these in the Pet Feeder pairing screen:

Setting DP code to find Notes
dp_portions manual_feed DP# Portions 1–12 will work; the feeder supports up to 50 but the app caps at 12
dp_motor_state feed_state DP#
dp_feed_report feed_report DP#
dp_battery battery_percentage DP#
dp_indicator_light indicator DP#
dp_surplus_grain set to 0 The Petlibro reports food level as an enum (full/low/empty), not a number — disable this DP to avoid errors
dp_fault set to 0 No fault DP visible on this device
dp_child_lock set to 0 Not present on this device

Let me know what DP numbers you find and we can verify the mapping together.

Andi

Again, I am not seeing anything that matches your request, so I have snipped everything that is available. I’ switch to DP mode which seems to have more information, also, I’ve captured the info in columns.

Sorry - but I need the values (DPs - and possible values per DP)

I need these infos for the DPs:

Hi Andi

I don’t seem to be able to get to the info you need unless I have missed something.

This is what I am are seeing

This is my project, I am going to click on Open Project

These are the details of the project I am going to click on Devices

This is the device (pet feeder) attached to the project via Tuya Smart+. I am going to select Debug Device on the right-hand side

I have the Basic Information

I then have Device Debugging and we are back into the information you have already seen.

I’m happy to click on anything you think might give you the information you need, but I can’t see anything which might help.

Stephen

Thanks for your patience. I hope this is what you are looking for.

That‘s what we need. Could you please send the content as text and not as Screenshots?

Please test version 1.0.58: Tuya Local | Homey

The Petlibro Granary sends a value of 0 on the portions data point when it first connects (a write-only echo). The app tried to map 0 into the Portions picker — which only accepted 1 through 12 — and rejected it with the “Invalid Capability” error before the device was even created.

What v1.0.58 fixes for your feeder specifically:

  • The 0 echo is now silently ignored on connect, so pairing completes cleanly
  • The Portions picker now goes up to 50 (your feeder supports 1–50, the old limit was 12)
  • The LED indicator (DP 113) is now auto-detected and appears as a toggle tile automatically
  • Food level (“full” / “low” / “empty”) on DP 108 was already being detected correctly — no change needed there

Once the update is available (check Homey → More → Apps → Tuya Local → update), pair the feeder fresh using Protocol 3.4 and leave everything else on auto-detect. You should not need to set any DP numbers manually.

Let me know how it goes.

Andi

Hi Andi

I’ve installed 1..0.58 but I’m afraid I am getting the same error.

I deleted the device I had and created a new one from scratch but immediately got the

Device Unavailable

Invalid Capability: feed_portions

Is there anything else I should have done?

Stephen

PS - do you still need a text version of the DPs

Please provide the Logs from the App: Logs AND DP Debug from that Device

AND: Please create a Diagnostic Report

AND: Yes, it would be great if you could send the text version of the DPs to doublecheck everything