Koenkk/zigbee-herdsman-converters

tuya ZG-204ZM setting motion detection mode fails (pull request #7553)

rolfvreijdenberger opened this issue · 6 comments

in the new zigbee2mqtt release https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.38.0 a feature was introduced via pull request #7553 where detection modes can be set.

After updating zigbee2mqtt, restarting the service, making sure I have the correct firmware as specified for the functionality, I get an error when trying to use the new detection mode settings.

It seems to me a mapping from the frontend button input to the actual settings is going wrong.

error message + debug from log after pressing button in zb2mqtt frontend.
image

Debug 2024-06-01 14:35:45Received MQTT message on 'zigbee2mqtt/presence sensor 7/set' with data '{"motion_detection_mode":"PIR+Dadar"}'
Debug 2024-06-01 14:35:45Publishing 'set' 'motion_detection_mode' to 'presence sensor 7'

Error 2024-06-01 14:35:45Publish 'set' 'motion_detection_mode' to 'presence sensor 7' failed: 'Error: Value: 'PIR+Dadar' not found in: [only_pir, pir_and_dadar, only_dadar]'
Debug 2024-06-01 14:35:45Error: Value: 'PIR+Dadar' not found in: [only_pir, pir_and_dadar, only_dadar] at Object.getFromLookup (/app/node_modules/zigbee-herdsman-converters/src/lib/utils.ts:581:15) at Object.to (/app/node_modules/zigbee-herdsman-converters/src/lib/tuya.ts:436:53) at Object.convertSet (/app/node_modules/zigbee-herdsman-converters/src/lib/tuya.ts:1157:57) at Publish.onMQTTMessage (/app/lib/extension/publish.ts:259:52) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:23) at EventEmitter.emit (node:events:529:35) at EventBus.emitMQTTMessage (/app/lib/eventBus.ts:115:22) at MQTT.onMessage (/app/lib/mqtt.ts:147:27) at WebSocket.<anonymous> (/app/lib/extension/frontend.ts:130:27) at WebSocket.emit (node:events:517:28)

correct firmware
image

correct zb2mqtt release
image

error from gui
image

Fixed!

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

I couldn't figure it out, how should it be done? Can you explain in detail?

Should I always keep static detection at 10?

Also, how can I reduce the refresh rate of the lux value?

@Koenkk do you intended to keep "Dadar" instead of "Radar"? ;)
The sensor also is not very reliable, the presence is not beeing updated to away untill I change a setting of the sensor. I guess we have no control over that, right?

Fixed the typo

The sensor also is not very reliable, the presence is not beeing updated to away untill I change a setting of the sensor. I guess we have no control over that, right?

It looks like the sensor doesn't send updates, so I don't think so.