Incorrect action report for Moes Smart Portable Universal remote (recognized as Tuya TS0044)
What happened?
Moes Smart Portable Universal remote (4-buttons remote, recognized as Tuya TS0044 remote) often sends double action reports when button pressed (like "1_single" and "1_undefined" together). That causes problems for openhab who can't react properly on "X_single" action report because "X_undefined" is received at same time.
I've made hotfix for this to filter out those unwanted reports (seems the remote sends incremental action number or something like that in second message):
*** node_modules/zigbee-herdsman-converters/converters/fromZigbee.js.old Wed Mar 30 15:30:51 2022
--- node_modules/zigbee-herdsman-converters/converters/fromZigbee.js Wed Mar 30 15:31:43 2022
***************
*** 2611,2616 ****
--- 2611,2617 ----
type: 'raw',
convert: (model, msg, publish, options, meta) => {
if (hasAlreadyProcessedMessage(msg, msg.data[1])) return;
+ if (msg.data[3] > 2) return;
const clickMapping = {0: 'single', 1: 'double', 2: 'hold'};
let buttonMapping = null;
if (model.model === 'TS0042') {
What did you expect to happen?
No response
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
1.23.0
Adapter firmware version
20211217
Adapter
Sonoff Zigbee 3.0
Debug log
No response
Do you mean this one? https://banggood.onelink.me/zMT7/l9amh0us Other than being picked up as the wrong device as you've said but this works fine in HA. I'm using single and double clicks without an issue. I do find battery status is odd mind, it stays at 100%, never changes but dies in weeks. Changed 5 batteries since Christmas.
Do you mean this one? https://banggood.onelink.me/zMT7/l9amh0us
Yes, this one.
Other than being picked up as the wrong device as you've said but this works fine in HA. I'm using single and double clicks without an issue.
Perhaps HA works in synchronous way, reacting on every change. Openhab misses one of status change if two (1_single+1_undefined) or more comes at same time. It reflects both changes in events log when they come from MQTT broker but processes only last one.
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