[EDGE] 3rd Reality MK1 Keyboard as 10 button device

Sigh … Completely the wrong direction

2 Likes

It is not quite like it sounds. They only have one TH device being handled by the Matter Switch driver (the Aqara Climate Sensor), and the obvious way to look at it is as a TH sensor that also has three buttons on it. The next device that comes along with TH endpoints might have a completely different character. It might, for example, be more obvious to consider it as a switch or button that also has secondary TH functions. So currently they are using the vendor and product ID to identify a particular device rather than inferring anything specific from the presence of the TH endpoints.

1 Like

It’s more about the grand scheme of things.

The simple question if this device is a button/switch or a sensor.

Should the button logic be integrated into the Matter sensor driver or the temp/humidity into the Matter switch driver? That was quite a dilemma as you can see here:

Originally, the device was added to the Matter sensor driver.

And these discussions and decisions will come up more frequently in the future. imagine the same device but with some kind of light or an integrated thermostat.

The aforementioned PR was just an example for the limitations of the current architecture.

Sooner than later, every Matter driver will have support for every EP/cluster/capability.

(Limiting this here to Matter, because there was a chance to learn from the mistakes made in the other drivers.)


Another example: in a different world, all these directories in the Matter thermostat driver should be in the top level directory:

To be reused wherever they are needed. They are very nicely done generic cluster definitions and attribute mappings.

Those are the cluster definitions for new Matter versions that are eventually included in the hub firmware so they don’t really belong to drivers except for a brief period of time until hubs are updated. There’s so much redundant code and handlers in drivers that is already present in the hub libraries.

That reminds me there are still bugs in the clusters, like not supporting nullable attributes, but I guess they won’t fix it unless a WWST certified device needs them.

Finally got a chance to re-add the keyboard to SmartThings. Unfortunately I can’t get it to join picking up your driver. It always grabs the ST matter switch driver. And changing the driver to yours doesn’t generate the 10 buttons.

Can you please post the vendorId, productId, and Endpoints found in the Detail tab of the device in the API Browser+?

Do you also have the other driver installed that I gave you for your Aqara H2 US? If yes, this driver is picked first and it doesn’t include the necessary profiles for your keyboard.

I can also check if I have to add your device’s VID/PID to the driver, but I don’t really think so, because the EP discovery should happen anyway.

I’m back home at the computer in about five hours… Maybe my german-hating, always tired stalker shows up in the meantime and helps you out - he’s a “developer”, the “de facto boss” after all.

wow, surprised this site still works for me after the PAT mess.

Vendor ID 0xFFF1
Product ID 0x8005
[{“endpointId”:0x00,“deviceTypes”:[{“deviceTypeId”:0x16}]},{“endpointId”:0x01,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x02,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x03,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x04,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x05,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x06,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x07,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x08,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x09,“deviceTypes”:[{“deviceTypeId”:0x0F}]},{“endpointId”:0x0A,“deviceTypes”:[{“deviceTypeId”:0x0F}]}]

Driver ID would be more interesting, because “my” (modified stock) driver has additional profiles for button 9 and 10.

You basically have three Matter switch drivers installed: stock, mine and one from the PR channel for the Aqara H2 US.

If you remove the two devices and the two additional Matter switch drivers and add them (drivers and devices) back in a logical order, it should work.

Was it in this thread where I mentioned that the logcat might be interesting?

If your keyboard works, but shows only 8 out of 10 buttons, it’s because of the missing profiles in the current stock driver (and the H2 US PR driver). See above - it has been discussed four, five weeks ago already.

In short: make sure that “my” driver is the only additional Matter switch driver installed when you add the keyboard.


And regarding the Aqara H2 US: the PR is two weeks old, pending:

Two weeks for a handful of PIDs, 7 lines changed.

My existing PATs are still working.

The good news is that all of the non-root endpoints all identify as generic switches (0x000F).

@Andreas_Roedl Can you add a specific vendorId and productId for his device so that it matches the fingerprint for your 9-10 button profile? That should allow it to be selected during device pairing.

1 Like

I can do that later tonight (1 am local time - public transportation on strike…).

I could also add the PR for the Aqara H2 for good measure… Let’s see…

Updated the driver:

───────────────────────────────────────────────────
 Driver Id    34f1d631-ff12-4286-996e-5ae1554b3f62 
 Name         Matter Switch (AR)                   
 Package Key  matter-switch-ar                     
 Version      2025-02-21T00:40:43.131573001        
───────────────────────────────────────────────────

If you know how to (re-)install/update the driver with the CLI, do it. Otherwise just delete and re-install the driver.

It’s the very latest version of the stock driver with added profiles, Aqara H2 US IDs included. To add a fingerprint for your keyboard, it would be helpful to know the current profile of the main device. Maybe you’ve provided this information in the other thread, but I’m too tired now… :wink:

So this driver should work for both of your devices. If it doesn’t: well, it was worth a try. It’s not sustainable anyway, because I won’t update the driver in the future. Makes no sense for Matter drivers.


Someone should create a PR against the stock driver to add the profiles for button #9 and button #10. I would, but I can only imagine what discussion ensues…

PR: Add two profiles for two buttons

“Why only two buttons?”

“Because I only need two buttons!”

“Wouldn’t it make sense to add two more - four in total?”

“That would be overkill!”

[Two weeks later]

“… 3?”

“Deal!”

[Merged into main]

Looks like my installed version updated on its own overnight. I’ll give the keyboard and H2 switch another try today. Thanks!

1 Like

Haha… And I thought I was crazy when I tried to package the driver last night:

Threw an error because of a duplicate fp and I could swear that I didn’t touch it.

1 Like

Unfortunately the keyboard isn’t behaving any better with the new driver. Now shows one button with every key press option available. Confirmed it is using teh AR version of the matter switch driver.

Three days later… :wink:

Without the device in hand or logs, it would take a while to get it right. Until now, all I had where some screenshots from the AWA.

We can’t do anything anyway because standalone community developed Matter drivers don’t make much sense. It’s against the philosophy of Matter.

If 3rd Reality wants the device supported in ST, they should create a PR with the necessary changes or ask someone to do it for them.

It’s not even certified yet. Who knows what’s going to change in-between.


If such a simple device with 10 buttons doesn’t work out of the box without modifications to the existing Matter switch driver, there might be something wrong with the whole architecture. The same thing with the Aqara W100 with its 3 buttons and temperature/humidity. Platform and device are Matter (1.3) certified, yet the device wouldn’t work with the Matter switch driver from four weeks ago…

2 Likes

Agreed on all points!

1 Like

Looks like modular profiles are on their way…

Matter switch:

2 Likes

There it is:

2 Likes