Koenkk / zigbee2mqtt

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

TS0601 / _TZE204_ya4ft0w4 (Human Presence Sensor) - Invalid value for number *** move_sensitivity / presence_sensitivity: 0 (range 1.0 - 10.0) #24049

Closed fabianosan closed 1 month ago

fabianosan commented 1 month ago

What happened?

Home Assistant is displaying the errors below, informing that the entity values ​​must be within a range.

It turns out that when I set these values ​​to within the range, either in Zigbee2MQTT or in Home Assistant, it starts working again, but after a while it seems to lose these values, starts triggering the error again and I need to go there and set it again to the range between 1 and 10, I have to do this a few times a day.

Device Info in Zigbee2mqtt: image image

Before the error: image

After error (in a few hours later) entitie values are reset to 0, but the range is 1 to 10???: image

Range allowed: image

Error in Home Assistant: image

What did you expect to happen?

I would like the device to work as expected, not lose the values ​​of the move_sensitivity and presence_sensitivity entities

How to reproduce it (minimal and precise)

Add the device into zigbee2mqtt, export to Home Assistant and after a few hours the errors will start to appear, probably because the values ​​of these entities have been lost.

Zigbee2MQTT version

1.40.1-dev commit: 7ad51ce

Adapter firmware version

7.4.3 [GA]

Adapter

Sonoff Dongle-E with Ember firmware

Setup

Beelink EQ12 with debian 12 and docker

Debug log

Log from Home Assistant (error appear only in Home Assistant log): zb_ha_log_2.txt

Log from Zigbee2mqtt: zb2mqtt.txt

fabianosan commented 1 month ago

The presence device keeping lost move and presence values and throwing this error!

fear commented 1 month ago

I have the same issue with 2 tuya devices:

ZY-M100-24GV3 ZY-M100-24GV2

Koenkk commented 1 month ago

Fixed! Will be available in todays release.

iamthekings5 commented 1 month ago

Fixed! Will be available in todays release.

I still have this issue. On normal branch latest version.

fabianosan commented 1 month ago

Fixed! Will be available in todays release.

I still have this issue. On normal branch latest version.

As device said, at this moment, is only available on dev branch.

You need to install dev release or wait until it is published as stable release.

iamthekings5 commented 1 month ago

Fixed! Will be available in todays release.

I still have this issue. On normal branch latest version.

As device said, at this moment, is only available on dev branch.

You need to install dev release or wait until it is published as stable release.

I switched to dev (edge) and issue still occurs.

1.40.2-dev commit: 3bb4af2 Screenshot_20241010_150019_Home Assistant.png

Screenshot_20241010_150100_Home Assistant.png

@Koenkk

Koenkk commented 1 month ago

@iamthekings5 do you have a _TZE204_ya4ft0w4?

iamthekings5 commented 1 month ago

@iamthekings5 do you have a _TZE204_ya4ft0w4?

@Koenkk Mine is a _TZE204_7gclukjs recognised as a ZY-M100-24GV2. I saw the model number and assumed it was the same device, do I need to make a separate issue for this?

A side question, may I know why my device shows up as ZY-M100-24GV2 in z2m when it looks more like the picture for ZY-M100-24G (wall mounted rather than ceiling mounted)?

Koenkk commented 1 month ago

That's a different model indeed, fixed it!

Changes will be available in the dev branch in a few hours from now.

iamthekings5 commented 1 month ago

That's a different model indeed, fixed it!

Changes will be available in the dev branch in a few hours from now.

@Koenkk

I'm on the latest dev branch where the issue was fixed and the log spam has stopped but my settings are still periodically being reset to some value.

The screenshot contains all values being reset, only presence timeout retains its settings.

Screenshot_20241013_164924_Home Assistant.png

fabianosan commented 1 month ago

Here is the same.

Koenkk commented 1 month ago

Could you provide the debug log when these values reset? I think it's an issue in the device firmware.

iamthekings5 commented 1 month ago

@Koenkk I had the issue occur again, here are the logs, I'm not sure how much I need to include but I hope this is enough. I'm also using an external converter in these logs trying to fix the issue but the exact same issue occurred so I don't think it matters. If it does let me know and I will recreate the issue without the external converter log.log

Koenkk commented 1 month ago

{"dp":102,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,0]}}]} here you see the device send presence sensitivity 0, so this confirms it's an issue of the device and not of z2m.

fabianosan commented 1 month ago

{"dp":102,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,0]}}]} here you see the device send presence sensitivity 0, so this confirms it's an issue of the device and not of z2m.

But it works fine in Tuya App. Maybe Tuya cloud ignore this values and maintain the current value if zero?

Now I'm using it on Tuya with LocalTuya and it's working flawless.

iamthekings5 commented 1 month ago

Do all ZY-M100-24GV2 have this issue? I might want to get a replacement.

I have tried using the tuya integration but it wouldn't recognise state: presence as me being there, only state:move. Would localtuya solve this issue?

Any idea what my options are now?

kkossev commented 3 weeks ago

The same problem when changing the minimum and the maximum detection distance parameters is confirmed in another hub. We may need a sniff from a Tuya GW on what is actually sent when the distance parameters are changed.

xino222 commented 1 week ago

hello

I have two ZY-M100-24GV3 sensors and the same thing happens, when I disconnect it from the power supply and reconnect it, it loses all the values and they are set to default. This does not happen with the old 5.8G version.

Anyway, although the values are set to 0 I think it is just visual because it really still retains the sensitivity and distances that you set.

I hope it can be fixed, thank you very much.

KeithL52 commented 1 week ago

{"dp":102,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,0]}}]} here you see the device send presence sensitivity 0, so this confirms it's an issue of the device and not of z2m.

I have 2 x Tuya ZY-M100-24GV2 _TZE204_7gclukjs 2 x Tuya ZY-M100-24GV3 _TZE204_ya4ft0w4 they all exhibit the same problem of loosing the settings when the power is turned off then back on.

From your answer above, am I correct in saying that these devices are never going to work correctly with Zigbee2mqtt ?

xino222 commented 1 day ago

Hello, I would like to know if this problem can be solved in the near future or is it not possible? I have several presence sensors with this problem of losing the configured values ​​and it is annoying.