Neo NAS-AB02B0 reset the duration time to zero/null
What happened?
This sirene https://www.zigbee2mqtt.io/devices/NAS-AB02B0.html#neo-nas-ab02b0 exposes the duration time.
I'm executing latest zigbee2mqtt release on RaspberryPi4 : 1.25.1 When I launch the command "duration": 900" on the "set" topic of the siren, I do have a message showing that the value has been took into account like this : {"alarm":false,"battery_low":false,"duration":900,"humidity":64,"humidity_alarm":false,"humidity_max":80,"humidity_min":30,"linkquality":31,"melody":16,"power_type":"battery_high","temperature":22.1,"temperature_alarm":false,"temperature_max":35,"temperature_min":10,"volume":"high"}
But after some seconds, if I wait for new message from the siren, I can see all values on the JSon are ok but not the "duration" which is now "null" : {"alarm":false,"battery_low":false,"duration":null,"humidity":64,"humidity_alarm":false,"humidity_max":80,"humidity_min":30,"linkquality":31,"melody":16,"power_type":"battery_high","temperature":22.1,"temperature_alarm":false,"temperature_max":35,"temperature_min":10,"volume":"high"}
What did you expect to happen?
I do expect that the "duration" value do not disappears on next message like all the other fields.
How to reproduce it (minimal and precise)
Reproduction is 100%.
Send a message with "duration":900, you will get a full json message with all values OK. Then send another command which is anything but duration command like "volume":"high", then the message returned will have all field OK but not the "duration" field which will be "null" value.
Zigbee2MQTT version
1.25.1
Adapter firmware version
20211115
Adapter
zStack12 - CC2531
Debug log
No response
Same here. Duration gets lost. I suppose device reports duration after some time again which leads to null.
Observed duration in my environment and can confirm issue.
I set duration to 10 seconds and then just waited. No further communication with device until 17 mins later it reports new humidity value 29 which also changes duration to null:
debug 2022-06-22 17:59:35: Received MQTT message on 'zigbee2mqtt/Kueche_Sirene/set/duration' with data '10'
debug 2022-06-22 17:59:35: Publishing 'set' 'duration' to 'Kueche_Sirene'
debug 2022-06-22 17:59:37: Received Zigbee message from 'Kueche_Sirene', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,10],"type":"Buffer"},"datatype":2,"dp":103}],"seq":59650}' from endpoint 1 with groupID null
info 2022-06-22 17:59:37: MQTT publish: topic 'zigbee2mqtt/Kueche_Sirene', payload '{"alarm":false,"battery_low":false,"duration":10,"humidity":39,"humidity_alarm":false,"humidity_max":70,"humidity_min":25,"last_seen":"2022-06-22T15:59:37.367Z","linkquality":255,"melody":14,"power_type":"usb","temperature":25.7,"temperature_alarm":false,"temperature_max":26,"temperature_min":18,"volume":"low"}'
debug 2022-06-22 18:16:42: Received Zigbee message from 'Kueche_Sirene', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,29],"type":"Buffer"},"datatype":2,"dp":106}],"seq":59906}' from endpoint 1 with groupID null
info 2022-06-22 18:16:42: MQTT publish: topic 'zigbee2mqtt/Kueche_Sirene', payload '{"alarm":false,"battery_low":false,"duration":null,"humidity":29,"humidity_alarm":false,"humidity_max":70,"humidity_min":25,"last_seen":"2022-06-22T16:16:42.968Z","linkquality":255,"melody":14,"power_type":"usb","temperature":25.7,"temperature_alarm":false,"temperature_max":26,"temperature_min":18,"volume":"low"}'
Involved code for processing incoming dp#106/neoHumidity is here: fromZigbee.js neo_t_h_alarm
const dpValue = tuya.firstDpValue(msg, meta, 'neo_t_h_alarm');
const dp = dpValue.dp;
const value = tuya.getDataValue(dpValue);
switch (dp) {
case tuya.dataPoints.neoAlarm:
return {alarm: value};
[...]
case tuya.dataPoints.neoDuration: // 0x0267 [0,0,0,10] duration alarm in second
return {duration: value};
[...]
case tuya.dataPoints.neoHumidity: // 0x026A [0,0,0,36] humidity
return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
[...]
default: // Unknown code
meta.logger.warn(`fz.neo_t_h_alarm: Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
I have no idea how code for processing dp#106/neoHumidity can change dp#103/neoDuration to null
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days