Another idea that has worked well for me: get a dog.
It can get lonely working alone at home; dogs keep you company. It can be easy to stay in the house all day; dogs are a good reason to talk walks outside. It can be easy to let the workday roll into the evening; dogs get hungry for dinner and let you know, which serves as a reminder that, yes, you should stop work for the day.