Sayyiduna Abdullah bin Sa'd (may Allah be pleased with him) narrates that I asked the Messenger of Allah (peace and blessings be upon him) about praying in my house and praying in the mosque, and he (peace and blessings be upon him) said: "You can see how close my house is to the mosque; (even so) that I pray in my house is dearer to me than praying in the mosque, except for the obligatory prayer."
Imam Ibn Khuzaymah (may Allah have mercy on him) said: "This is the hadith (the wording) of Bundar."
Related hadith on this topic