Over the last ten years I have had many contract positions. Some allowed work from home (WFH) or telecommuting anytime or at least occasionally with approval. I must say, any freezing cold wintery mix morning that i can grab my computer, phone and a hot cup of something and crawl back under the warm covers instead of standing on the corner shivering waiting for the bus or train is a GOOD day! I do make a promise to myself that I will be dressed and comb my hair before my hubby gets home from work. I try to work from home as if i were in the office. Once each hour, when i would normally take a walk to the cafe or just to stretch my legs at work, I might use the time to throw in a load of wash, or make something to eat.
When I am WFH alone, I usually get A LOT done. When I had children at home with me (or even the hubs)— not so much. You need to be a lot more disciplined about not wasting time. I used to use a chess clock to record my time. On clock-off clock! Or keep a time tally, log in log out, in time increments as your office does (5 min, 15 min, or half hours). And be sure you are accessible; answer emails and Slack or Skype convos, keep your away messages accurate. Mostly be honest and realistic with yourself and your boss/coworkers. Example “I will be working from home because i need 2 hours for a doctor appointment, but I plan to start my day earlier than if i commuted in.” then really follow through.
I have also had the jobs where work hours were billable only if they occurred in the office. In those cases I just had to bite the bullet and not get paid. So instead of taking a day off for one appointment, i would double or triple up and do a bunch of OOO things on the same day.