yes. the same here. homekit using catalyst and compiled on ventura currently does not work on any ventura version, using made for ipad works fine. catalyst version compiled on mac os 12 also works on ventura.
Post
Replies
Boosts
Views
Activity
a use case for this would be a context menu for an image that allows the user to change this icon by choosing from a list of sf symbol images.
or something like an emoji picker
i have found the current limitations for catalyst swiftui context menus are a problem more than once.
i'm running into the same problem.
none of the subscribe methods work. the primary one mentioned above gives error 48, the other ones never confirm subscription or give any other results.
during my trials yesterday i might have seen a single subscription confirmation from one of them but unfortunately i can't reproduce the circumstances. also there i never got a change reported.
sorry. yes. i was talking about MTRAttributeNameForID. but with swift. from the documentation here: https://developer.apple.com/documentation/matter/mtrattributenameforid(::)
if i read the documentation correctly your example should read
MTRAttributeNameForID(MTRClusterIDType.basicInformationID, MTRAttributeIDType.clusterApplicationBasicAttributeVendorNameID
which gives <Unknown clusterID 40> for me.
and i have the same behaviour for every MTRClusterIDType and MTRAttributeIDType initialised from raw values.
on the other hand MTRClusterNameForID with a MTRClusterIDType initialised the same way gives a reasonable result.
does anyone know what is supposed to be working for an MTRBaseDevice initialised from homekit?
i did some more test...
i can use readAttributes and read everything from the device. good.
except: i never get data for attribute 0xFFFA which should be the EventList.
does this indicate that the MTRBaseDevice initialised from HomeKit is not capable of generating events?
all other global attributes 0xFFF8-0xFFFD except 0xFFFA return the expected data.
also: when i try to use invokeCommand to initiate an identify or off command. this also does not work and results in
Error Domain=MTRErrorDomain Code=4 "An argument is invalid." UserInfo={NSLocalizedDescription=An argument is invalid.}. does this indicate that the MTRBaseDevice initialised from HomeKit is readonly?
on the other hand using an MTRBaseClusterOnOff initialised from the same MTRBaseDevice allows me to use toggle without any problems. so it seems not to be readonly...
the invokeCommand error from above might have been a problrm with the commanfFields. now that i changed this a little i get absolutely no reaction. no error, no data. like subscribe. so again the question: is anything besides reading the attributes supposed to work when using the homekit provided data?
i did another fix to the commanfFields to get on/off/toggle to work. basically every command without data fields.
but i can not figure out how to encode a parameter...
besides the encoding only the subscription seems to be still open for me.
found the correct encoding for parameters. so invokeCommand now works for me also.
so the only one still missing is subscription to events. and the missing data for attribute 0xFFFA
thank you for checking this out. actually this is my bug report also :)
in the meantime i have implemented my own version. so i can continue while waiting for an official fix.
could you please also have a look here: https://developer.apple.com/forums/thread/757458?answerId=810679022#810679022
i can‘t get subscription to events working.
this is the last puzzle piece and stumbling block for my project now that i can read all attributes and write commands with and without parameters for homekit initialized matter devices.
or would it be better to open a new post instead of reusing the old one?
thank you again. very much appreciated.
i will check and report back / file reports.