I presume from what you said that you intend to be in Thailand from
*****
to
*****
, if that is the case you do not need to renew your passport before you come. It will only have about 5 months on it when you fly home, but as you are returning to your home country it's not a problem.
If you renew before coming you will lose an entire year, the passport office no longer transfer any unused time from the old to the new passport