Page 2 of 2

Re: Generic Scene Switch

Posted: 2026年 Feb 9日 18:07
by fangping.guo

Yes, I used your PID virtual device to conduct a simulation and capture the reported messages. On the Apple Home platform, I verified that single clicks, double clicks, and long presses could all be recognized.

Single Click

Code: Select all

ReportDataMessage =
{
       SubscriptionId = 0xb37d7a9c,
       EventReportIBs =
       [
               EventReportIB =
               {
                       EventDataIB =
                       {
                               EventPath =
                               {
                                       Endpoint = 0x10,
                                       Cluster = 0x3b,
                                       Event = 0x1,
                               },

                           EventNumber = 0x00000000001D000E,
                           PriorityLevel = 0x0000000000000001,
                           SystemTimestamp = 0x00000000000189B3,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                           },
                   },

           },

           EventReportIB =
           {
                   EventDataIB =
                   {
                           EventPath =
                           {
                                   Endpoint = 0x10,
                                   Cluster = 0x3b,
                                   Event = 0x3,
                           },

                           EventNumber = 0x00000000001D000F,
                           PriorityLevel = 0x0000000000000001,
                           DeltaSystemTimestamp = 0x0000000000000001,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                           },
                   },

           },

           EventReportIB =
           {
                   EventDataIB =
                   {
                           EventPath =
                           {
                                   Endpoint = 0x10,
                                   Cluster = 0x3b,
                                   Event = 0x6,
                           },

                           EventNumber = 0x00000000001D0010,
                           PriorityLevel = 0x0000000000000001,
                           DeltaSystemTimestamp = 0x0000000000000001,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                                   0x1 = 1 (signed), 
                           },
                   },

           },

   ],

   InteractionModelRevision = 11
}

Double Click

Code: Select all

ReportDataMessage =
{
       SubscriptionId = 0xb37d7a9c,
       EventReportIBs =
       [
               EventReportIB =
               {
                       EventDataIB =
                       {
                               EventPath =
                               {
                                       Endpoint = 0x10,
                                       Cluster = 0x3b,
                                       Event = 0x1,
                               },

                           EventNumber = 0x00000000001D0011,
                           PriorityLevel = 0x0000000000000001,
                           SystemTimestamp = 0x0000000000031D9B,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                           },
                   },

           },

           EventReportIB =
           {
                   EventDataIB =
                   {
                           EventPath =
                           {
                                   Endpoint = 0x10,
                                   Cluster = 0x3b,
                                   Event = 0x3,
                           },

                           EventNumber = 0x00000000001D0012,
                           PriorityLevel = 0x0000000000000001,
                           DeltaSystemTimestamp = 0x0000000000000002,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                           },
                   },

           },

           EventReportIB =
           {
                   EventDataIB =
                   {
                           EventPath =
                           {
                                   Endpoint = 0x10,
                                   Cluster = 0x3b,
                                   Event = 0x5,
                           },

                           EventNumber = 0x00000000001D0013,
                           PriorityLevel = 0x0000000000000001,
                           DeltaSystemTimestamp = 0x0000000000000001,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                                   0x1 = 2 (signed), 
                           },
                   },

           },

           EventReportIB =
           {
                   EventDataIB =
                   {
                           EventPath =
                           {
                                   Endpoint = 0x10,
                                   Cluster = 0x3b,
                                   Event = 0x3,
                           },

                           EventNumber = 0x00000000001D0014,
                           PriorityLevel = 0x0000000000000001,
                           DeltaSystemTimestamp = 0x0000000000000001,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                           },
                   },

           },

           EventReportIB =
           {
                   EventDataIB =
                   {
                           EventPath =
                           {
                                   Endpoint = 0x10,
                                   Cluster = 0x3b,
                                   Event = 0x6,
                           },

                           EventNumber = 0x00000000001D0015,
                           PriorityLevel = 0x0000000000000001,
                           DeltaSystemTimestamp = 0x0000000000000001,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                                   0x1 = 2 (signed), 
                           },
                   },

           },

   ],

   InteractionModelRevision = 11
}

Long Press

Code: Select all

ReportDataMessage =
{
       SubscriptionId = 0xb37d7a9c,
       EventReportIBs =
       [
               EventReportIB =
               {
                       EventDataIB =
                       {
                               EventPath =
                               {
                                       Endpoint = 0x10,
                                       Cluster = 0x3b,
                                       Event = 0x2,
                               },

                           EventNumber = 0x00000000001D0016,
                           PriorityLevel = 0x0000000000000001,
                           SystemTimestamp = 0x000000000003D740,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                           },
                   },

           },

           EventReportIB =
           {
                   EventDataIB =
                   {
                           EventPath =
                           {
                                   Endpoint = 0x10,
                                   Cluster = 0x3b,
                                   Event = 0x4,
                           },

                           EventNumber = 0x00000000001D0017,
                           PriorityLevel = 0x0000000000000001,
                           DeltaSystemTimestamp = 0x0000000000000002,
                           EventData = 
                           {
                                   0x0 = 0 (signed), 
                           },
                   },

           },

   ],

   InteractionModelRevision = 11
}


Re: Generic Scene Switch

Posted: 2026年 Feb 9日 18:44
by Sugar
Opera Zrzut ekranu_2026-02-09_104251_mail.google.com.png

Thank you for being so helpful. I appreciate it.
I will share further updates when Aqara responds.


Re: Generic Scene Switch

Posted: 2026年 Feb 11日 14:36
by fangping.guo

Thank you for your email. I have understood the difference between TUYA and Aqara when sending events.

I will try to modify the code to make it work properly.

But there is a question: if the value of the event is correct but only the type is wrong (reported as signed), will Aqara accept it?


Re: Generic Scene Switch

Posted: 2026年 Feb 11日 19:38
by Sugar
fangping.guo 2026年 Feb 11日 14:36

Thank you for your email. I have understood the difference between TUYA and Aqara when sending events.

I will try to modify the code to make it work properly.

But there is a question: if the value of the event is correct but only the type is wrong (reported as signed), will Aqara accept it?

Hello :)

Long press is working with reported as signed, but they can't guarantee it will work with single or double press. They follow the matter documentation with their controllers, and in my opinion its not worth trying to make it work, because in future it could cause problems, for example, with Google, or any other matter platforms which will strictly follow matter documentation. It's better to make it as it should be and use it for all of the Tuya momentary switches, than later trying to fix it again, and change so much code for every single switch if it suddenly stops working somewhere due to a mismatch with Matter documentation.

Thank you.


Re: Generic Scene Switch

Posted: 2026年 Feb 16日 18:09
by Sugar

extra information:

Screenshot_20260216-100402.png
Screenshot_20260216-100445.png

GenericSwitchMultiPressComplete, PreviousPosition=0

Change that 0 to 1 and let's see if single press is working with reported as signed.