Pir ts0202 tz3000

Team,

Brought some of these Tuya WiFi Zigbee PIR Motion Sensor

When I try to connect to home assistant on my PI I see the logs

Received message from unsupported device with Zigbee model 'TS0202' and manufacturer name '_TZ3000_lf56vpxj'

TS0202_TZ3000

So my question do I need to flash the firmware here or is there another way? I have only just brought a few of these and dont want to brick but they are unsupported device with Zigbee model.

Any advice would be appreciated.

If you’re using ZHA you could post a device support request:

There seem to be a couple already, but not for that manufacturer name.

There are lots of Tuya motion sensors on Z2M

(You have to search for TuYa, not Tuya… :roll_eyes:)

thanks trying to submit a device support request but I cant find how to get the Device signature code.

Go to the device page and click on the three dots next to “reconfigure”, then “Manage zigbee device”.

If you then click on “Signature” (top right):

You can copy the signature code:

Thanks I am using the zigbee2mqtt addon here is a example I dont see Manage zigbee device

You’re using Zigbee2MQTT - you have to find a device handler there.

Thats part of the issue I guess I dont see it to then get the details?

image

[New device support]: Motion Sensor TS0202, _TZ3000_lf56vpxj · Issue #19105 · Koenkk/zigbee2mqtt · GitHub seems to have the same

Some guidance here please my-motion.js below

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: [
        {modelID: 'TS0202', manufacturerName: '_TZ3000_lf56vpxj'},
        ],
    model: 'ZP01',
    vendor: 'TuYa',
    description: 'Motion sensor',
    fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery, fz.ignore_basic_report, fz.ias_occupancy_alarm_1_report],
    toZigbee: [],
    exposes: [e.occupancy(), e.battery_low(), e.battery(), e.battery_voltage()],
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
        try {
            await reporting.batteryPercentageRemaining(endpoint);
        } catch (error) {/* Fails for some https://github.com/Koenkk/zigbee2mqtt/issues/13708*/}
    },
};

module.exports = definition;

Tells me to add to configuration.yaml

external_converters:
  - my-motion.js

Check config in Dev tools

Error
Configuration invalid! Integration error: external_converters - Integration 'external_conv

Tried [Zigbee2MQTT - Tuya 4-button Scene Switch (TS0044) - #20 by daniguarana](https://this link)

Added my-motion.js to config/zigbee2mqtt/my-motion.js restarted zigbee2mqtt

image

Check yaml view
data_path: /config/zigbee2mqtt
external_converters:
  - my-motion.js
devices: devices.yaml
groups: groups.yaml

Restarted zigbee2mqtt service

Error

[services.d] done.
[17:01:58] INFO: Handing over control to Zigbee2mqtt Core ...

> [email protected] start /app
> node index.js

(node:353) UnhandledPromiseRejectionWarning: internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'zigbee-herdsman-converters/lib/extend'
Require stack:
- /app/lib/util/utils.js
- /app/lib/util/settings.js
- /app/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at /app/lib/util/externally-loaded.js:5:16
    at Script.runInContext (vm.js:143:18)
    at Script.runInNewContext (vm.js:148:17)
    at Object.runInNewContext (vm.js:303:38)
    at loadModuleFromText (/app/lib/util/utils.js:156:8)
    at loadModuleFromFile (/app/lib/util/utils.js:162:12)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:353) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:353) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[17:02:04] INFO: Handing over control to Zigbee2mqtt Core ...

Ideas? Where or what am I doing wrong here?

image

So why the diff between Zigbee2mqtt Edge (dev) and Zigbee2mqtt that supports this PIR?