Skip to content

Commit 2e460a8

Browse files
committed
Fix TRADFRI remote control arrow buttons hold/long release events
When pressing the middle button for more than 5 seconds the remote reads the Application Version attribute. If the coordinator doesn't respond with value 17 as indicated in earlier remote firmware versions, the arrow buttons don't send hold/long release commands anymore.
1 parent 29ec9ff commit 2e460a8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

basic.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,22 @@ void DeRestPluginPrivate::sendBasicClusterResponse(const deCONZ::ApsDataIndicati
7979
break;
8080

8181
case 0x0001: // Application Version
82+
{
8283
stream << code;
8384
stream << (quint8) deCONZ::Zcl8BitUint;
84-
stream << (quint8) 0x00;
85+
86+
Sensor *sensor = getSensorNodeForAddressAndEndpoint(ind.srcAddress(), ind.srcEndpoint());
87+
if (sensor && sensor->modelId() == QLatin1String("TRADFRI remote control"))
88+
{
89+
// Since firmware version 2.3.014 when the large middle button is pressed the remote reads this attribute.
90+
// If it isn't 17 as reported by earlier remote firmware, the left/right buttons don't send hold and long press commands anymore.
91+
stream << quint8(17);
92+
}
93+
else
94+
{
95+
stream << quint8(0x00);
96+
}
97+
}
8598
break;
8699

87100
case 0x0002: // Stack Version

0 commit comments

Comments
 (0)