I'm using an autopilot panel produced by Realsimgear (GFC500) https://realsimgear.com/products/realsimgear-gfc500-autopilot-for-x-plane-p3d-fsx
... It is recognized by my PC as a USB Serial device (occupying COM 3 port)... Since it's not showing up in my list of joysticks- I can't get it to be recognized by FSUIPC the easy way (press a hardware button and have it recognized by FSUIPC to assign it a function) . Realsimgear uses an exe as its device interface to P3D (in the P3D addon folder).
When P3D is running, pushing a hardware button sends a "Prepar3D Event" through their device interface which has to be one of the Event ID's listed in the P3D SDKs (or so it seems)... I've tried to map event IDs from your FSUIPC list - such as 65792 or the HEX form of that- 0x10100 (this is for AUTOPILOT_ON) but it doesn't seem to do anything. " Flight level change" is another hardware button but P3D doesn't have this in it's event list- so I don't know how I'd handle this.
Support from RealsimGear shed this clue:
"buttons should be mapped to the correct SimConnect id's.
We have not tried this, but it may be possible (we are much more familiar with how X-Plane works). The way our P3D Add-on works, it listens for serial commands coming from the hardware, then does a lookup indexed off that command in the CommandMapping.ini file and then fires the SimConnect event identified there. Now, if FSUIPC can listen to custom off-sets, then you could set custom offsets in CommandMapping.ini as well (we do this for integration with Mindstar G1000 for instance). If you give this a go, we would be interested in knowing how it works for you."
I have tried LINDA to see if it would "hear" the button pushes from my hardware- but it seems to only go through the device interface right to the sim. Otherwise I think FSUIPC would hear it too.
I'm quite a layman with programming- so Lvars, custom offsets are a bit beyond my pay grade here with unsigned bites etc.
Attached are pics of the device interface "in action" when I have a button pushed... as well as the commandMapping.ini that they use to translate hardware button pushes into P3D event commands.
CommandMapping.ini