Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.73k stars 1.64k forks source link

ZY M100 Presence Sensors Not Updating - ONLY LUX SENSOR WORKING #19448

Open Adaaks opened 10 months ago

Adaaks commented 10 months ago

What happened?

I tried to change the presence sensitivity to 1 to see the effect it has, and then the presence sensors stopped updated, only the lux sensor works even thought the presence sensitivity is back to max... I tried removing the device, re-installing zigbeem2qtt

The sensor used to kinda work (although I feel like small movements were not detected...)

Model = 24G MmWave radar human presence motion sensor Model = _TZE204_ijxvkhd0

What did you expect to happen?

For presecence sensors to work

How to reproduce it (minimal and precise)

Change presence sensitivity

Zigbee2MQTT version

1.33.1-dev commit: 0e55b38

Adapter firmware version

20210708

Adapter

Sonoff 3.0 zigbee usb dongle

Debug log

image

Fehuv commented 10 months ago

I have the same thing

igoralexeev commented 10 months ago

same thing

Adaaks commented 10 months ago

what fixed it for me is connecting the presence sensor to smart life and pairing it to home assistant again )requires tuya hub...however i stopped using this presence sensor as it detects presence when there is nobody in room sometimes (not even in close to sensor) and literally no movement. this sensor is too much problem, and smart homes are a pain in the ass.

Fehuv commented 10 months ago

то же самое

Hi. I don't remember which forum I got it from, but the seller gave this code to some forum member on Aliexpress. In general, you need to copy the file to this path /config/zigbee2mqtt/ It should be in the same folder with configuration.yaml

ext_converter.js.ts.zip

I copied the permissions ext_converter.js

also in the file configuration.yaml need to add

Снимок экрана 2023-11-04 в 14 20 04
GRamsaroep commented 9 months ago

то же самое

Hi. I don't remember which forum I got it from, but the seller gave this code to some forum member on Aliexpress. In general, you need to copy the file to this path /config/zigbee2mqtt/ It should be in the same folder with configuration.yaml

ext_converter.js.ts.zip

I copied the permissions ext_converter.js

also in the file configuration.yaml need to add

Снимок экрана 2023-11-04 в 14 20 04

Did this work? I have the same problem and want to test this out today.

tjhubz commented 8 months ago

Thank you to @Fehuv for posting a fix to this problem! It works for me now. If someone else happens to stumble upon this issue, make sure that you:

  1. Download the zip file that they posted, unzip it
  2. Copy the code from the ext_converter.ts.js file into a .js file, not a .ts file (I named mine tuya-converter.js for organization).
  3. Upload the new .js file into the ~/zigbee2mqtt/ directory, the same directory that contains the zigbee2mqtt configuration.yaml.
  4. Add the following lines to the zigbee2mqtt configuration.yaml:
    external_converters:
    - tuya-converter.js
  5. Restart zigbee2mqtt, the device should work now! If any values are null, adjust all exposed settings back to normal.

It would be great if this code was built into zigbee2mqtt by default, hopefully it will be added later!

eldonky commented 7 months ago

It works for me.

Alfs04 commented 7 months ago

It works for me. I was trying to fix this for weeks.

Koenkk commented 7 months ago

With z2m 1.35.2, everything should work out-of-the-box, can somebody confirm this?

Biero1 commented 7 months ago

With z2m 1.35.2, everything should work out-of-the-box, can somebody confirm this?

Both sensors work good but it's impossible to change sensitivity. They both return back to default after a few seconds. HAOS, SONOFF Zigbee Dongle Plus-E 7.3.1.0 build 176, Z2M 1.35.3, _TZE204_ijxvkhd0

Fehuv commented 7 months ago
  1. pull it out of the archive
  2. copy along the way /homeassistant/zigbee2mqtt
  3. let's go /homeassistant/zigbee2mqtt/configuration.yaml
  4. external_converters:
    • ZY-M100-24G.js

ZY-M100-24G.js.zip

restart

Carrotpro commented 6 months ago

i still have this issue any one else?

JackTalisker commented 6 months ago

I have the same issue but I only noticed this post today. Didn't try the above ext.converter yet. Maybe this evening.

Carrotpro commented 6 months ago

I have the same issue but I only noticed this post today. Didn't try the above ext.converter yet. Maybe this evening.

Hey I found there using zigbee2mqtt edge it's on the add on page

JackTalisker commented 6 months ago

Yesterday evening I tried to re-pair the device using the above custom converter. Now the radar of my ZY-M100-24G is operational again.

rVlad93 commented 6 months ago

Just got the sensor today but I'm facing the same problem even with the external converter. What's weird is that I managed to change the radar sensitivity to 10 and now I can't change it back to default or any other value.

Carrotpro commented 6 months ago

Just got the sensor today but I'm facing the same problem even with the external converter. What's weird is that I managed to change the radar sensitivity to 10 and now I can't change it back to default or any other value.

Do you have add on zigbee2mqtt edge?

rVlad93 commented 6 months ago

Just got the sensor today but I'm facing the same problem even with the external converter. What's weird is that I managed to change the radar sensitivity to 10 and now I can't change it back to default or any other value.

Do you have add on zigbee2mqtt edge?

No, I'm on the regular version. Do I need that in order for this to work?

Carrotpro commented 6 months ago

Just got the sensor today but I'm facing the same problem even with the external converter. What's weird is that I managed to change the radar sensitivity to 10 and now I can't change it back to default or any other value.

Do you have add on zigbee2mqtt edge?

No, I'm on the regular version. Do I need that in order for this to work?

In my case yes don't no about everyone else

rVlad93 commented 6 months ago

I can confirm it's working on the latest verion without the need for the external converter. Thank you!

Carrotpro commented 6 months ago

I can confirm it's working on the latest verion without the need for the external converter. Thank you!

Your welcome 😁

alexianos11 commented 3 months ago

as of 1.37.1, it does not work, the same symptoms. Reverting to 1.36.0 works with forementioned external converter. Could anyone tell me which version works without external converter? "latest" does not help.

Th3M1k3y commented 3 months ago

I am on 1.38.0 and getting this error

Exception while calling fromZigbee converter: Value '5' is not allowed, expected one of 0,1,2}

jesmnm23 commented 2 months ago

en la actualización lo reconoce pero no funciona la presencia...Alguien conoce solucion? Gracias

eldonky commented 2 months ago

Thank you to @Fehuv for posting a fix to this problem! It works for me now. If someone else happens to stumble upon this issue, make sure that you:

  1. Download the zip file that they posted, unzip it
  2. Copy the code from the ext_converter.ts.js file into a .js file, not a .ts file (I named mine tuya-converter.js for organization).
  3. Upload the new .js file into the ~/zigbee2mqtt/ directory, the same directory that contains the zigbee2mqtt configuration.yaml.
  4. Add the following lines to the zigbee2mqtt configuration.yaml:
external_converters:
  - tuya-converter.js
  1. Restart zigbee2mqtt, the device should work now! If any values are null, adjust all exposed settings back to normal.

It would be great if this code was built into zigbee2mqtt by default, hopefully it will be added later!

A mi me funcionó esto.

Mrsash2020 commented 2 months ago

On 1.38.0-1

Ok so I have these sensors previously. Had the issue where I could not change sensitivity. Seller on Aliexpress provided the above .js file which I am not sure did much apart from able to being able to commit slider.

Yesterday tried to add 2 more(brand new) of these presence sensors. OMG what a pain Exception while calling fromZigbee converter: Value '5' is not allowed, expected one of 0,1,2}

Thought it was me. Followed a lot of suggestions, did not help.

This morning went to Edge and had to reboot VirtualBox instance and it finally started showing presence and movement data. Something in the normal version still is a problem

Update: devices do show up as ZY-M100-24GV2 as opposed to ZY-M100-24G but ZY-M100-24GV2 link broken.

Update 2: Spoke two soon. The distance measurements aren't correct. Went back to non dev version and the error above is back.

anoblet commented 2 months ago

I'm receiving this error on Z2M Edge without the external converter: Invalid value for number.bedroom_presence_presence_sensitivity: 0.6 (range 1.0 - 10.0)

Mrsash2020 commented 2 months ago

For me it works in the Edge but the distance needs to be multiplied by 10 to correct it with our without the external converter js file. The extrenal converter however was causing the time stamp of last motion to showing as 10 hours off. So dropped the external converter.

Th3M1k3y commented 2 months ago

Trying to use the converter on 1.38.0 is giving me this error

2024-06-26 17:32:36] error:     z2m: Failed to load external converter file 'tuya-converter.js' (Cannot find module 'zigbee-herdsman-converters/lib/extend'
Require stack:
- /app/dist/util/utils.js
- /app/dist/util/settings.js
- /app/index.js)
[2024-06-26 17:32:36] error:    z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version
[2024-06-26 17:32:36] error:    z2m: Note that external converters are not meant for long term usage, it's meant for local testing after which a pull request should be created to add out-of-the-box support for the device

After some searching I found the mention of having to change a bit in the top of the converter, so it looks like this

const {} = require('zigbee-herdsman-converters/lib/modernExtend');

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 e = exposes.presets;
const ea = exposes.access;
const legacy = require('zigbee-herdsman-converters/lib/legacy');

const tuya = require('zigbee-herdsman-converters/lib/tuya');

After that change the error has gone away, including the note about the usage of external converters, and the sensor still isn't working.

This error is still showing in the log Exception while calling fromZigbee converter: Value '5' is not allowed, expected one of 0,1,2}

Mrsash2020 commented 2 months ago

I was provided this one a few days ago for the ZY-M100-24GV2, remove the .txt

ms.zy24g.js.txt

Works with Edge but not 1.38.01

Th3M1k3y commented 2 months ago

After updating mine is now detecting movement and such, and is identified as ZY-M100-24GV2, but move and presence sensitivity is acting up.

Setting it to anything over 1 will revert it to 1, and setting it to 0 leaves it at 0.

tanus10 commented 2 months ago

try to set the sensitivity value x 10. Like 30 or 50 or 60. It settles with 3, 5, 6 respectively. Not sure why.

I have ditched the device because of MQTT message flooding problem and moved on to FP1. My system became too unstable, such as slow responses, z2m container crashes, restarts. Especially when log is set to INFO.

Irrelevant but, I am still using wifi version of the same product (locally controlled with LocalTuya and TuyaLocal), it works without such problems.

Mrsash2020 commented 2 months ago

I was provided this yesterday 2ms.zy24g.js.txt

Seems to correct the distance but some unit naming issues

anoblet commented 2 months ago

For me, these units behave under par. I wish I didn't go for Zigbee. I bought an LD-2410C and it's so much better.

jonny190 commented 1 month ago

I'm also getting the log spam with image From the same device, the roof mounted ZY-M100-24G Could it just be a case of amending the device template?