[APP][Pro] Universal TUYA Zigbee Device App - test

All right, did that. But that really scares me. As far as I understand the error messages, looks like people adding code to the program used old node modules. Can you please check the following errors:

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated husl@5.0.3: Project renamed to HSLuv
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm warn deprecated whatwg-encoding@3.1.1: Use @exodus/bytes instead for a more spec-conformant and faster implementation
npm warn deprecated glob@8.1.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated mumath@3.3.4: Redundant dependency in your project.
npm warn deprecated node-domexception@1.0.0: Use your platform’s native DOMException instead
npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see Version Support - ESLint - Pluggable JavaScript Linter for other options.

added 770 packages, and audited 771 packages in 1m

137 packages are looking for funding
run npm fund for details

31 vulnerabilities (5 low, 12 moderate, 12 high, 2 critical)

Is it safe to continue?

Yes, it can’t do much harm since it doesn’t connect to external services (it only connects to Zigbee devices directly via Homey)

Continued, in spite of the error messages.

Went a lot better as before. I even got the saw the normal staps when installing a Homey app. Took quite some time to install the appon my Homey, and then…

✓ Validating app…
✓ App validated successfully against level debug
✓ Packing Homey App…
— App archive size: 62.06 MB, 4028 files
✓ Installing Homey App on Homey Gorissen (https://xxx-xxx-x-xxx.homey.homeylocal.com)…
× Timeout after 300000ms

What setting can I use to lengthen the time to prevent a timeout?

You should just try again, I also sometimes have a timeout message when installing my own apps.

The errors regarding vuilnerabilities in the used versions “glob” aren’t serious enough to warn the developer? I suppose he knows.

These can’t do no harm as long as they don’t contact external servers?

No timeout during installing the app?

Okay, will give it another try. Thanks for your quick answers.

Also, to decrease the app size, you can remove all files in the /drivers/[any driver]/assets/images folders. Those are only needed for the app store publishing. But do not remove the icon.svg! Only xlarge.png, large.png and small.png

No, it doesn’t do anything with external communications (only Zigbee, which is managed by Homey itself and only mappings from Zigbee clusters to Flowcards/capabilities are in this app so you should be safe there). Attackers can’t abuse these vulnerabilities, since there is no way to reach them in the first place

Second time, same error. Timeout.

Any suggestion how to do that in a quick way? 323 Drivers, so 323 times selecting a driver, clicking the folder “assets”, clicking the folder “images” and deleting 3 files in there.

They are approx. 30 kB together, so we’re talking about 9 MB of total 62 MB (4.028 files), it’s about 15% in size and 24% of all files. It will matter. I’m curious…

You might be able to use this:

const fs = require('fs');
const path = require('path');

const driversPath = path.join(__dirname, 'drivers');

if (!fs.existsSync(driversPath)) {
  console.error('drivers directory not found');
  process.exit(1);
}

const driverFolders = fs.readdirSync(driversPath, { withFileTypes: true })
  .filter(d => d.isDirectory())
  .map(d => d.name);

let totalDeleted = 0;

for (const folder of driverFolders) {
  const imagesPath = path.join(driversPath, folder, 'assets', 'images');

  if (!fs.existsSync(imagesPath)) continue;

  const files = fs.readdirSync(imagesPath, { withFileTypes: true })
    .filter(f => f.isFile());

  for (const file of files) {
    fs.unlinkSync(path.join(imagesPath, file.name));
    console.log(`Deleted: drivers/${folder}/assets/images/${file.name}`);
    totalDeleted++;
  }
}

console.log(`\nDone. ${totalDeleted} file(s) deleted.`);

Put this in a clean-images.js file in the root folder (where the app.js file is) and run it in a terminal/CMD with node clean-images.js

Wow it’s so usefull

I will check it it does help

Wow, cool!!

Done,969 files deleted.

During install, size is 43,48 MB, quite some difference.

Bad luck,

× Timeout after 300000ms

@ManuelKugler , how did you succeed in installing the app on your Homey??

I see that the timeout is defined in /lib/api/ApiCommandConstants.mjs

export const DEFAULT_TIMEOUT = 30 * 1000;

export default {
  DEFAULT_TIMEOUT,
};

You need to open this file: %appdata%\npm\node_modules\homey\lib\api\ApiCommandConstants.mjs and change this part:

export const DEFAULT_TIMEOUT = 30 * 1000;

To this:

export const DEFAULT_TIMEOUT = 60 * 1000;

Then, you can save it and try to install again.

Hi, I’ve currently landed on version 5.11.206 and all 15 soil moisture sensors are working as they did 8-9 days ago. I won’t reconnect any other devices until Dylan fixes version 7, and I’m really looking forward to that. I had previously tried version 5.12.2, but there were problems with duplicate IDs during installation.

Attached is the installation guide I used:

Summary

Exact install guide for v5.11.206

1) Check the basics

You need:

  • a Homey Pro

  • a PC/Mac on the same network as Homey, or directly connected where supported

  • Node.js v22+

  • the Homey CLI installed globally

2) Install Node.js

Install Node.js 22 or newer first. Homey’s getting-started guide lists Node.js v22 or higher as a prerequisite.

3) Install Homey CLI

Open Terminal / PowerShell and run:

npm install -g homey

Homey’s docs state that installing the CLI globally exposes the homey command.

4) Log in to your Athom/Homey account

Run:

homey login

The CLI uses your Athom account login and can open the OAuth login flow in your browser.

5) Download the app source for the exact release

Use either git or the GitHub Source code ZIP for tag v5.11.206.

Option A — git

git clone --branch v5.11.206 https://github.com/dlnraja/com.tuya.zigbee.git
cd com.tuya.zigbee

Option B — ZIP

  • Open the release page for v5.11.206

  • download the Source code (zip)

  • extract it

  • open Terminal in the extracted folder

6) Install the app dependencies

Inside the app folder, run:

npm install

This installs the project dependencies needed before sideloading the app. The repo/community install flow for this Tuya fork uses npm install before homey app install.

7) Install the app on Homey

Still inside that folder, run:

homey app install

Homey’s official docs say homey app install installs an app on Homey for longer-term testing, without keeping the command running.

8) Select your Homey

If prompted, select your Homey Pro from the list. On first use, the CLI may ask you to authenticate and choose the Homey device.

9) Verify install in Homey

In the Homey app/web app:

  • go to Apps

  • find the Tuya Zigbee app

  • confirm it is installed

  • then go to Devices → Add device

  • search for the Tuya Zigbee app and pair your device


Commands in one block

npm install -g homey
homey login
git clone --branch v5.11.206 https://github.com/dlnraja/com.tuya.zigbee.git
cd com.tuya.zigbee
npm install
homey app install

If it fails

homey: command not found

Your CLI is not installed correctly or not in PATH.

Run:

npm install -g homey

Then test:

homey --help

This exact error also shows up in community discussion around this app.

Login/auth issues

Run:

homey logout
homey login

Homey documents both commands as standard CLI account actions.

You only want the latest test version, not the exact GitHub tag

Then use the app’s test channel instead of sideloading. Multiple issue templates for this app point users to the test install URL for the latest test build, which is a different path than pinning v5.11.206.

Important reality check

If your goal is exactly v5.11.206, use the CLI method above.

If your goal is just “get this Tuya Zigbee fork on Homey”, the test channel is easier, but it will not guarantee that exact version.

If you want, I’ll give you the Windows-only version or the Mac/Linux version with copy-paste commands adjusted for your system.

Applause for finding this!

Changed the tineout settings as you described, but still the old timeout. Do I have to point to this nvm version or so?

I have found the app install timeout, it’s in this file instead:
%appdata%\npm\node_modules\homey\lib\AthomApi.js
On line 139, change this:
1000 * 60 * 5,
To this:
1000 * 120 * 5,

This doubles the app install timeout (from 300000 ms to 600000 ms)

I’m getting really impressed…

Changing line `39, “homey app install” after that, waiting, but really fast (faster than the previous waiting time) appeared this error message:

✓ Validating app…
✓ App validated successfully against level debug
✓ Packing Homey App…
— App archive size: 43.48 MB, 3060 files
✓ Installing Homey App on Homey Gorissen (https://xxx-xxx-x-xxx.homey.homeylocal.com)…
× Missing File

I think I’ll unzip the previous downloaded code, including the removed images, so that the code to install is exactly what is has to be. Will come back with the results.

EDIT: YES, app completely installed.

@smarthomesven , check your code to remove the image files. apparently it deletes too much, taking the error message into account.

@dlnraja ,I try to configure your app, but the blank screen doesn’t show anything else than a spinning “wheel”, saying I have to wait. But it takes forever.

@dlnraja try to install a new device, but a lot of devices (drivers as you call them) show a red exclamation mark. Something you know of, or do I have to make print screens so you know what devices?

@dlnraja trying to install a smart plug with energy metering, Blitzwolf BW-SHP13. In your app several options, so I choose one. Unfortunately, not recognized. A universal device instead.

Try another smart plug in your app, same message.

But when I install the Nous app, the plug is at least recognized as anothyer plug, but with the same capabilities. That’s how the Homey is supposed to work.

I think the power of version 7.x.x, the universal drivers, doesn’t work yet.

Hi,

Trying to add some Avatto TRV06 radiator thermostat, but when adding the device there are a lot of Red exclamation marks and I cannot add it.

How can I fix this?

Thanks and kind regards

Cilmate sensor (TZ3000_tsgqxdb4) stops showing measurements, so i remove device and connected again.. AND now its unknown Zigbee device again, not working anymore.
Sended Daignostic report

9000dcb1-c8ed-4671-8d9f-2e388cb651be