How to get device name like whyred für Xiaomi Redmi Note 5? For custom ROMs like LineageOS, the more specific device names are used. So e.g. the Xiaomi Redmi Note 5 is called whyred or Samsung Galaxy S7 Edge goes hero2lte. Having some experience in Android and custom ROMs, I don't know how to find out device names based on the colloquially used device names (Redmi Note 5 ~> whyred).

Neither in specs on e.g. shop sites, nor in the device info. Lets look at the device info  of a Xiamo Redmi Note 5 Pro: 



I only see M1803E7SG as model name here, but no match to the device name used for custom ROMs. Especially on Xiamo it's a big mess to get rich of different model or editions. Sometimes a single model is not equal across different regions. 

Edit

For M1803E7SG I found this article which says: 


  For reference, our review unit is the M1803E7SG. This is also known as
  the Redmi Note 5 AI Dual Camera. It is neither the Redmi 5 Plus, which
  is listed as the Redmi Note 5 on Xiaomi's Mi website, nor is it the
  Redmi Note 5 Pro either. All three devices are powered by a Qualcomm
  Snapdragon 636 SoC, but they feature different camera hardware and
  memory options among other differences.


So is this a flashable device for TWRP/LineageOS? I'm relly confused now and would like to see the device name for this smartphone.
For simplicity, you can either find the device codename from the official Xiaomi forum (which I believe is constantly updated). You can also use a third-party tool Device ID to get your device codename: