Home Assistant Core (Truenas) Aqara M2 setup I'm so sad

I recently decided to install sensors to control my hallways lights (tplink) After doign some research (not enough) I purchased an aqara M2 and sensors. I like the idea of locating the M2 seperate from my server, and think this is my preferred config. This said how the heck do I set this thing up. I tried Homekit (note I don’t have an iphone). Homekit Devices doesn’t detect the device and I’m thinking i need to have the Homekit Iphone app installed. I also tried Matter which doesn’t work with Core. I then tried Xiaomi bbut it fails to detect the M2 on my network. I’m I just not smart, or am I missing something critical.