SmartThings needs to create a profile/plugin for the Matter button driver before this will work correctly. Currently shows up as 1 button in SmartThings. Home Assistant and Apple Home correctly show all 10 buttons.
YesâŚ
⌠but:
If it has more than eight buttons, it seems to fall back to one button profile.
Creating profiles for 9-button and 10-button could solve the issue.
Yes, that would solve it, but shouldnât be necessary. Those are just predefined static profiles that the driver can utilize. If there is not a predefined profile, it should fall back to the Parent/Child method. Further down we see:
if ep ~= main_endpoint then
component_map[string.format("button%d", current_component_number)] = ep
current_component_number = current_component_number + 1
else
component_map["main"] = ep
end
component_map_used = true
else -- use parent/child
if ep ~= main_endpoint then -- don't create a child device that maps to the main endpoint
local name = string.format("%s %d", device.label, current_component_number)
driver:try_create_device(
{
type = "EDGE_CHILD",
label = name,
profile = "button",
parent_device_id = device.id,
parent_assigned_child_key = string.format("%02X", ep),
vendor_provided_label = name
}
)
current_component_number = current_component_number + 1
end
end
end
It should⌠as alwaysâŚ
@Automated_House Do you have the device? Would be very easy to check whatâs going on.
My GUESS would be that only the first endpoint identifies as a button and the rest are something else. Could be wrong, but that would certainly explain the behavior.
To handle devices with up to eight buttons differently to devices with more than eight buttons is kind of ugly anywayâŚ
I think they created profiles for what they thought were some common configurations of switches/buttons; 2 gang, 4 gang, etcâŚ
Yes, I got a test version from CES. Home Assistant and Apple Home each show 10 buttons. Hereâs snippet from the ST Advanced user site. Iâm guessing the numberofbuttons attribute being blank isnât goodâŚ
Only a main component.
A screenshot from the summary section would be helpful.
And the attributes section could be incomplete (more than 10 lines).
Here is a driver with profiles for 9 and 10 buttons:
https://bestow-regional.api.smartthings.com/invite/Pw2DN18eRbj3
But please provide the screenshot and the output first, so we can see how the stock driver handles the device.
To be fair, this keyboard would be of greater interest to me if it were a macropad.
I love mechanical keyboards, huge hobby of mine, currently have 8 in rotation with 3 sitting in a draw somewhere, bringing the total to 10.
That being said I love the idea of rotating keyboards so that kills this for me, and also not a fan of a full keyboard aesthetically.
A macropad however would be dope and would then permanently be a part of my set up.
Did the modified Matter switch driver that I created for you work with the keyboard?
sorry, I missed that. Installed it and switching to the device to use it didnât help. Will try to delete it from SmartThings and re-add it.
I think you have to reinstall it so that the init lifecycle step is executed which will configure the buttons.
This:
And itâs a bit convoluted (three functions deep), but it only happens in init.
Always a good idea to delete the device(s) first. Thereâs a lot of probing going on in the Matter drivers.
Even more convoluted now that the button driver is no longer a standalone driver and has been completely subsumed into the switch driver And itâs not even being loaded as a sub-driver but is completely mashed up in the main init.lua for the driver. UghâŚ
And this:
Temperature and humidity capabilities. But I digress, just like the driverâŚ
Yeah, weâll create one massive multi-endpoint driver that encompasses every imaginable deviceTypeId and all the capability handlers to support themâŚsheesh. This should have morphed into an effort to create a more generalized endpoint discovery mechanism that could identify each endpoint and load subdrivers with the necessary device handlers (and other required pieces) based on the discovered deviceTypeIds. Wasted opportunity.
Check out the Matter thermostat driver!
Preaching to the choir!
They are doing the opposite now. From a recent PR:
Logic for devices with temperature/humidity endpoints should be gated by specific vid/pid rather than the presense of these endpoints. This is to prevent other devices that may contain the endpoints from being affected unintentionally.